From a597b3547bd58e8470e63bd0e9ef6224bf5d5354 Mon Sep 17 00:00:00 2001 From: Michael Nahkies Date: Sat, 6 Apr 2024 12:10:44 +0100 Subject: [PATCH] chore: refresh data (#142) `./scripts/refresh-data.sh && yarn ci-pipeline` --- .../api.github.com.yaml | 15459 +++++---- integration-tests-definitions/stripe.yaml | 27371 ++++++++++++---- .../api.github.com.yaml/client.service.ts | 1828 +- .../generated/api.github.com.yaml/models.ts | 561 +- .../generated/stripe.yaml/client.service.ts | 5233 ++- .../src/generated/stripe.yaml/models.ts | 1340 +- .../generated/api.github.com.yaml/client.ts | 1825 +- .../generated/api.github.com.yaml/models.ts | 561 +- .../src/generated/stripe.yaml/client.ts | 3999 ++- .../src/generated/stripe.yaml/models.ts | 1340 +- .../generated/api.github.com.yaml/client.ts | 1369 +- .../generated/api.github.com.yaml/models.ts | 561 +- .../src/generated/stripe.yaml/client.ts | 3996 ++- .../src/generated/stripe.yaml/models.ts | 1340 +- .../api.github.com.yaml/generated.ts | 10403 +++--- .../generated/api.github.com.yaml/models.ts | 894 +- .../generated/api.github.com.yaml/schemas.ts | 873 +- .../src/generated/stripe.yaml/generated.ts | 10461 +++++- .../src/generated/stripe.yaml/models.ts | 3699 ++- .../src/generated/stripe.yaml/schemas.ts | 1880 +- 20 files changed, 72014 insertions(+), 22979 deletions(-) diff --git a/integration-tests-definitions/api.github.com.yaml b/integration-tests-definitions/api.github.com.yaml index bec7541f..e147387a 100644 --- a/integration-tests-definitions/api.github.com.yaml +++ b/integration-tests-definitions/api.github.com.yaml @@ -85,6 +85,8 @@ tags: description: Owner or admin management of users interactions. - name: classroom description: Interact with GitHub Classroom. +- name: desktop + description: Desktop specific endpoints. servers: - url: https://api.github.com externalDocs: @@ -158,20 +160,7 @@ paths: in: query description: If specified, only advisories for these ecosystems will be returned. schema: - type: string - enum: - - actions - - composer - - erlang - - go - - maven - - npm - - nuget - - other - - pip - - pub - - rubygems - - rust + "$ref": "#/components/schemas/security-advisory-ecosystems" - name: severity in: query description: If specified, only advisories with these severities will be returned. @@ -242,7 +231,8 @@ paths: - "$ref": "#/components/parameters/pagination-after" - "$ref": "#/components/parameters/direction" - name: per_page - description: The number of results per page (max 100). + description: The number of results per page (max 100). For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer @@ -618,9 +608,9 @@ paths: 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. + + 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/list-installations @@ -716,10 +706,33 @@ paths: "/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. + 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. \n\nOptionally, + you can use the `repositories` or `repository_ids` body parameters to specify + individual repositories that the installation access token can access. If + you don't use `repositories` or `repository_ids` to grant access to specific + repositories, the installation access token will have access to all repositories + that the installation was granted access to. The installation access token + cannot be granted access to repositories that the installation was not granted + access to. Up to 500 repositories can be listed in this manner.\n\nOptionally, + use the `permissions` body parameter to specify the permissions that the installation + access token should have. If `permissions` is not specified, the installation + access token will have all of the permissions that were granted to the app. + The installation access token cannot be granted permissions that the app was + not granted.\n\nWhen using the repository or permission parameters to reduce + the access of the token, the complexity of the token is increased due to both + the number of permissions in the request and the number of repositories the + token will have access to. If the complexity is too large, the token will + fail to be issued. If this occurs, the error message will indicate the maximum + number of repositories that should be requested. For the average application + requesting 8 permissions, this limit is around 5000 repositories. With fewer + permissions requested, more repositories are supported. \n\nYou must 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/create-installation-access-token @@ -755,7 +768,8 @@ paths: examples: default: value: - repository: Hello-World + repositories: + - Hello-World permissions: issues: write contents: read @@ -1018,13 +1032,16 @@ paths: "/applications/{client_id}/token/scoped": post: summary: Create a scoped access token - description: Use a non-scoped user access token to create a repository scoped - and/or permission scoped user 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 `client_id` and `client_secret` of - the GitHub App as the username and password. Invalid tokens will return `404 - NOT FOUND`. + description: |- + Use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specify + which repositories the token can access and which permissions are granted to the + token. + + Invalid tokens will return `404 NOT FOUND`. + + You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) + when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App + as the username and password. tags: - apps operationId: apps/scope-token @@ -1111,10 +1128,9 @@ paths: "/apps/{app_slug}": 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. + 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`)." tags: - apps operationId: apps/get-by-slug @@ -1429,9 +1445,12 @@ paths: summary: List Dependabot alerts for an enterprise description: |- Lists Dependabot alerts for repositories that are owned by the specified enterprise. - 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. + + The authenticated user must be a member of the enterprise to use this endpoint. + Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + + OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. tags: - dependabot operationId: dependabot/list-alerts-for-enterprise @@ -1483,7 +1502,12 @@ paths: 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). + + Alerts are only returned for organizations in the enterprise for which the authenticated user is 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). + + The authenticated user must be a member of the enterprise in order to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope or `security_events` scope to use this endpoint. tags: - secret-scanning operationId: secret-scanning/list-alerts-for-enterprise @@ -1500,6 +1524,7 @@ paths: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/pagination-before" - "$ref": "#/components/parameters/pagination-after" + - "$ref": "#/components/parameters/secret-scanning-alert-validity" responses: '200': description: Response @@ -1566,16 +1591,18 @@ paths: 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: + Lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs. * **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) + * **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-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. + By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + **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. tags: - activity @@ -1734,7 +1761,7 @@ paths: 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. + Note: With [pagination](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api), 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: - gists operationId: gists/list-public @@ -1814,7 +1841,13 @@ paths: "/gists/{gist_id}": get: summary: Get a gist - description: '' + description: |- + Gets a specified gist. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. + - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. tags: - gists operationId: gists/get @@ -1847,8 +1880,16 @@ paths: patch: 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. + 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. + At least one of `description` or `files` is required. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. + - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. tags: - gists operationId: gists/update @@ -1962,7 +2003,13 @@ paths: "/gists/{gist_id}/comments": get: summary: List gist comments - description: '' + description: |- + Lists the comments on a gist. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. + - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. tags: - gists operationId: gists/list-comments @@ -2001,7 +2048,13 @@ paths: subcategory: comments post: summary: Create a gist comment - description: '' + description: |- + Creates a comment on a gist. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. + - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. tags: - gists operationId: gists/create-comment @@ -2058,7 +2111,13 @@ paths: "/gists/{gist_id}/comments/{comment_id}": get: summary: Get a gist comment - description: '' + description: |- + Gets a comment on a gist. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. + - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. tags: - gists operationId: gists/get-comment @@ -2091,7 +2150,13 @@ paths: subcategory: comments patch: summary: Update a gist comment - description: '' + description: |- + Updates a comment on a gist. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. + - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. tags: - gists operationId: gists/update-comment @@ -2319,7 +2384,7 @@ paths: 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)." + out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." tags: - gists operationId: gists/star @@ -2370,7 +2435,13 @@ paths: "/gists/{gist_id}/{sha}": get: summary: Get a gist revision - description: '' + description: |- + Gets a specified gist revision. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. + - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. tags: - gists operationId: gists/get-revision @@ -2447,8 +2518,11 @@ paths: get: summary: Get a gitignore template 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. + Get the content of a gitignore template. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw .gitignore contents. operationId: gitignore/get-template tags: - gitignore @@ -2481,10 +2555,7 @@ paths: "/installation/repositories": get: summary: List repositories accessible to the app installation - description: |- - 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. + description: List repositories that an app installation can access. tags: - apps operationId: apps/list-repos-accessible-to-installation @@ -2538,8 +2609,6 @@ 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/apps/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 @@ -2563,11 +2632,17 @@ paths: 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 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/pulls/pulls#list-pull-requests)" endpoint. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/list @@ -3212,7 +3287,8 @@ paths: - "$ref": "#/components/parameters/before" - "$ref": "#/components/parameters/page" - name: per_page - description: The number of results per page (max 50). + description: The number of results per page (max 50). For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer @@ -3366,6 +3442,26 @@ paths: enabledForGitHubApps: false category: activity subcategory: notifications + delete: + summary: Mark a thread as done + description: 'Marks a thread as "done." Marking a thread as "done" is equivalent + to marking a notification in your notification inbox on GitHub as done: https://github.com/notifications.' + tags: + - activity + operationId: activity/mark-thread-as-done + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/activity/notifications#mark-a-thread-as-done + parameters: + - "$ref": "#/components/parameters/thread-id" + responses: + '204': + description: No content + 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 @@ -3519,7 +3615,7 @@ paths: get: summary: List organizations description: |- - Lists all organizations, in the order that they were created on GitHub. + Lists all organizations, in the order that they were created. **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. tags: @@ -3559,9 +3655,26 @@ paths: get: 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/). + Gets information about an organization. + + 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/). + + To see the full details about an organization, the authenticated user must be an organization owner. + + The values returned by this endpoint are set by the "Update an organization" endpoint. If your organization set a default security configuration (beta), the following values retrieved from the "Update an organization" endpoint have been overwritten by that configuration: + + - advanced_security_enabled_for_new_repositories + - dependabot_alerts_enabled_for_new_repositories + - dependabot_security_updates_enabled_for_new_repositories + - dependency_graph_enabled_for_new_repositories + - secret_scanning_enabled_for_new_repositories + - secret_scanning_push_protection_enabled_for_new_repositories - 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." + For more information on security configurations, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. + + To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. tags: - orgs operationId: orgs/get @@ -3592,7 +3705,22 @@ paths: 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 or the `repo` scope to update the organization's profile and member privileges. + Updates the organization's profile and member privileges. + + With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration: + + - advanced_security_enabled_for_new_repositories + - dependabot_alerts_enabled_for_new_repositories + - dependabot_security_updates_enabled_for_new_repositories + - dependency_graph_enabled_for_new_repositories + - secret_scanning_enabled_for_new_repositories + - secret_scanning_push_protection_enabled_for_new_repositories + + For more information on setting a default security configuration, see "[Enabling security features at scale](https://docs.github.com/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale)." + + The authenticated user must be an organization owner to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. tags: - orgs operationId: orgs/update @@ -3628,7 +3756,8 @@ paths: description: The shorthand name of the company. description: type: string - description: The description of the company. + description: The description of the company. The maximum size is + 160 characters. has_organization_projects: type: boolean description: Whether an organization can use organization projects. @@ -3849,7 +3978,8 @@ paths: 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. + + OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. tags: - actions operationId: actions/get-actions-cache-usage-for-org @@ -3882,7 +4012,8 @@ paths: 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. + + OAuth tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. tags: - actions operationId: actions/get-actions-cache-usage-by-repo-for-org @@ -3926,8 +4057,8 @@ paths: summary: Get the customization template for an OIDC subject claim for an organization description: |- Gets the customization template for an OpenID Connect (OIDC) subject claim. - You must authenticate using an access token with the `read:org` scope to use this endpoint. - GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. tags: - oidc operationId: oidc/get-oidc-custom-sub-template-for-org @@ -3954,8 +4085,8 @@ paths: summary: Set the customization template for an OIDC subject claim for an organization description: |- Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. - You must authenticate using an access token with the `write:org` scope to use this endpoint. - GitHub Apps must have the `admin:org` permission to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. tags: - oidc operationId: oidc/update-oidc-custom-sub-template-for-org @@ -3998,7 +4129,7 @@ paths: description: |- Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows 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. + OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. operationId: actions/get-github-actions-permissions-organization tags: - actions @@ -4027,7 +4158,7 @@ paths: description: |- Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows 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. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. operationId: actions/set-github-actions-permissions-organization tags: - actions @@ -4068,7 +4199,7 @@ paths: 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. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. operationId: actions/list-selected-repositories-enabled-github-actions-organization tags: - actions @@ -4109,7 +4240,8 @@ paths: 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. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. operationId: actions/set-selected-repositories-enabled-github-actions-organization tags: - actions @@ -4153,7 +4285,7 @@ paths: 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. + OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. operationId: actions/enable-selected-repository-github-actions-organization tags: - actions @@ -4176,7 +4308,7 @@ paths: 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. + OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. operationId: actions/disable-selected-repository-github-actions-organization tags: - actions @@ -4198,9 +4330,9 @@ paths: get: summary: Get allowed actions and reusable workflows for an organization description: |- - Gets the selected actions and reusable workflows 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)."" + Gets the selected actions and reusable workflows 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. + OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. operationId: actions/get-allowed-actions-organization tags: - actions @@ -4229,7 +4361,7 @@ paths: description: |- Sets the actions and reusable workflows 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. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. operationId: actions/set-allowed-actions-organization tags: - actions @@ -4263,7 +4395,7 @@ paths: 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/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. + OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - actions operationId: actions/get-github-actions-default-workflow-permissions-organization @@ -4294,7 +4426,7 @@ paths: can submit approving pull request reviews. For more information, see "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/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. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - actions operationId: actions/set-github-actions-default-workflow-permissions-organization @@ -4326,10 +4458,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/list-self-hosted-runners-for-org @@ -4379,10 +4510,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/list-runner-applications-for-org @@ -4414,10 +4544,9 @@ paths: description: |- Generates a configuration that can be passed to the runner application at startup. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + The authenticated user must have admin access to the organization. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/generate-runner-jitconfig-for-org @@ -4482,17 +4611,18 @@ paths: "/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.\n\nYou must authenticate using an access token - with the `admin:org` scope to use this endpoint.\nIf the repository is private, - you must use an access token with the `repo` scope.\nGitHub Apps must have - the `administration` permission for repositories and the `organization_self_hosted_runners` - permission for organizations.\nAuthenticated users must have admin access - to repositories or organizations, or the `manage_runners:enterprise` scope - for enterprises, to use these endpoints.\n\nExample 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 - --token TOKEN\n```" + description: |- + Returns a token that you can pass to the `config` script. The token expires after one hour. + + For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner: + + ``` + ./config.sh --url https://github.com/octo-org --token TOKEN + ``` + + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/create-registration-token-for-org @@ -4522,19 +4652,15 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. - - Example using remove token: - - To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this - endpoint. + For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization: ``` ./config.sh remove --token TOKEN ``` + + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/create-remove-token-for-org @@ -4564,10 +4690,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/get-self-hosted-runner-for-org @@ -4597,10 +4722,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-self-hosted-runner-from-org @@ -4624,10 +4748,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/list-labels-for-self-hosted-runner-for-org @@ -4650,12 +4773,11 @@ paths: 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. + Adds custom labels to a self-hosted runner configured in an organization. + + Authenticated users must have admin access to the organization to use this endpoint. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - actions operationId: actions/add-custom-labels-to-self-hosted-runner-for-org @@ -4705,10 +4827,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/set-custom-labels-for-self-hosted-runner-for-org @@ -4759,10 +4880,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/remove-all-custom-labels-from-self-hosted-runner-for-org @@ -4792,10 +4912,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/remove-custom-label-from-self-hosted-runner-for-org @@ -4825,10 +4944,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `secrets` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/list-org-secrets @@ -4874,10 +4992,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `secrets` organization permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read secrets. + The authenticated user must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-org-public-key @@ -4907,10 +5024,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `secrets` organization permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read secrets. + The authenticated user must have collaborator access to a repository to create, update, or read secrets + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-org-secret @@ -4941,10 +5057,9 @@ paths: Creates or updates an organization secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `secrets` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/create-or-update-org-secret @@ -5025,10 +5140,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `secrets` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-org-secret @@ -5053,10 +5167,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `secrets` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/list-selected-repos-for-org-secret @@ -5100,10 +5213,9 @@ paths: for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/actions/secrets#create-or-update-an-organization-secret). - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `secrets` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/set-selected-repos-for-org-secret @@ -5151,13 +5263,12 @@ paths: 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 + repository access is set to `selected`. For more information about setting the visibility, see [Create or update an organization secret](https://docs.github.com/rest/actions/secrets#create-or-update-an-organization-secret). - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `secrets` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/add-selected-repo-to-org-secret @@ -5189,10 +5300,9 @@ paths: for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/actions/secrets#create-or-update-an-organization-secret). - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `secrets` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/remove-selected-repo-from-org-secret @@ -5222,7 +5332,10 @@ paths: summary: List organization variables description: |- Lists all organization variables. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/list-org-variables @@ -5266,10 +5379,9 @@ paths: description: |- Creates an organization variable that you can reference in a GitHub Actions workflow. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/create-org-variable @@ -5341,10 +5453,9 @@ paths: description: |- Gets a specific variable in an organization. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read variables. + The authenticated user must have collaborator access to a repository to create, update, or read variables. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-org-variable @@ -5374,10 +5485,9 @@ paths: description: |- Updates an organization variable that you can reference in a GitHub Actions workflow. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/update-org-variable @@ -5438,10 +5548,9 @@ paths: description: |- Deletes an organization variable using the variable name. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-org-variable @@ -5466,10 +5575,9 @@ paths: Lists all repositories that can access an organization variable that is available to selected repositories. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/list-selected-repos-for-org-variable @@ -5516,11 +5624,9 @@ paths: to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `organization_actions_variables:write` organization permission to use this - endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/set-selected-repos-for-org-variable @@ -5568,10 +5674,9 @@ paths: Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read variables. + Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/add-selected-repo-to-org-variable @@ -5604,10 +5709,9 @@ paths: available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required. tags: - actions operationId: actions/remove-selected-repo-from-org-variable @@ -5742,11 +5846,9 @@ paths: 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/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. - - For public repositories, you may instead use the `public_repo` scope. + The authenticated user must be an owner or security manager for the organization to use this endpoint. - GitHub Apps must have the `security_events` read permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo`s cope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. tags: - code-scanning operationId: code-scanning/list-alerts-for-org @@ -5816,7 +5918,7 @@ paths: description: |- Lists the codespaces associated to a specified organization. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/list-in-organization @@ -5867,7 +5969,7 @@ paths: summary: Manage access control for organization codespaces description: |- Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/set-codespaces-access @@ -5938,7 +6040,7 @@ paths: To use this endpoint, the access settings for the organization must be set to `selected_members`. For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/rest/codespaces/organizations#manage-access-control-for-organization-codespaces)." - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/set-codespaces-access-users @@ -5996,7 +6098,7 @@ paths: To use this endpoint, the access settings for the organization must be set to `selected_members`. For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/rest/codespaces/organizations#manage-access-control-for-organization-codespaces)." - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/delete-codespaces-access-users @@ -6050,8 +6152,10 @@ paths: get: summary: List organization secrets description: |- - Lists all Codespaces secrets available at the organization-level without revealing their encrypted values. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + Lists all Codespaces development environment secrets available at the organization-level without revealing their encrypted + values. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/list-org-secrets @@ -6093,10 +6197,9 @@ paths: "/orgs/{org}/codespaces/secrets/public-key": get: summary: Get an organization public key - description: Gets a public key for an organization, which is required in order - to encrypt secrets. You need to encrypt the value of 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. + description: |- + Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/get-org-public-key @@ -6124,8 +6227,9 @@ paths: get: summary: Get an organization secret description: |- - Gets an organization secret without revealing its encrypted value. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + Gets an organization development environment secret without revealing its encrypted value. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/get-org-secret @@ -6156,11 +6260,10 @@ paths: put: summary: Create or update an organization secret description: |- - Creates or updates an organization secret with an encrypted value. Encrypt your secret using + Creates or updates an organization development environment secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." - You must authenticate using an access - token with the `admin:org` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/create-or-update-org-secret @@ -6242,9 +6345,10 @@ paths: subcategory: organization-secrets delete: summary: Delete an organization secret - description: Deletes an organization secret using the secret name. You must - authenticate using an access token with the `admin:org` scope to use this - endpoint. + description: |- + Deletes an organization development environment secret using the secret name. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/delete-org-secret @@ -6267,9 +6371,11 @@ paths: "/orgs/{org}/codespaces/secrets/{secret_name}/repositories": 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. + description: |- + Lists all repositories that have been selected when the `visibility` + for repository access to a secret is set to `selected`. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/list-selected-repos-for-org-secret @@ -6310,11 +6416,12 @@ paths: subcategory: organization-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/codespaces/organization-secrets#create-or-update-an-organization-secret). - You must authenticate using an access token with the `admin:org` scope to - use this endpoint. + description: |- + Replaces all repositories for an organization development environment 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/codespaces/organization-secrets#create-or-update-an-organization-secret). + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/set-selected-repos-for-org-secret @@ -6364,11 +6471,9 @@ paths: "/orgs/{org}/codespaces/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/codespaces/organization-secrets#create-or-update-an-organization-secret). - You must authenticate using an access token with the `admin:org` scope to - use this endpoint. + description: |- + Adds a repository to an organization development environment 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/codespaces/organization-secrets#create-or-update-an-organization-secret). + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/add-selected-repo-to-org-secret @@ -6399,11 +6504,12 @@ paths: subcategory: organization-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/codespaces/organization-secrets#create-or-update-an-organization-secret). - You must authenticate using an access token with the `admin:org` scope to - use this endpoint. + description: |- + Removes a repository from an organization development environment 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/codespaces/organization-secrets#create-or-update-an-organization-secret). + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/remove-selected-repo-from-org-secret @@ -6434,22 +6540,23 @@ paths: subcategory: organization-secrets "/orgs/{org}/copilot/billing": get: - summary: Get Copilot for Business seat information and settings for an organization + summary: Get Copilot seat information and settings for an organization description: |- **Note**: This endpoint is in beta and is subject to change. - Gets information about an organization's Copilot for Business subscription, including seat breakdown + Gets information about an organization's Copilot subscription, including seat breakdown and code matching policies. To configure these settings, go to your organization's settings on GitHub.com. - For more information, see "[Configuring GitHub Copilot settings in your organization](https://docs.github.com/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization)". + For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)". - Only organization owners and members with admin permissions can configure and view details about the organization's Copilot for Business subscription. You must - authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. + Only organization owners can configure and view details about the organization's Copilot Business subscription. + + OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. tags: - copilot operationId: copilot/get-copilot-organization-details externalDocs: description: API method documentation - url: https://docs.github.com/rest/copilot/copilot-for-business#get-copilot-for-business-seat-information-and-settings-for-an-organization + url: https://docs.github.com/rest/copilot/copilot-user-management#get-copilot-seat-information-and-settings-for-an-organization parameters: - "$ref": "#/components/parameters/org" responses: @@ -6470,32 +6577,36 @@ paths: "$ref": "#/components/responses/forbidden" '404': "$ref": "#/components/responses/not_found" + '422': + description: There is a problem with your account's associated payment method. x-github: githubCloudOnly: false enabledForGitHubApps: true category: copilot - subcategory: copilot-for-business + subcategory: copilot-user-management "/orgs/{org}/copilot/billing/seats": get: - summary: List all Copilot for Business seat assignments for an organization + summary: List all Copilot seat assignments for an organization description: |- **Note**: This endpoint is in beta and is subject to change. - Lists all Copilot for Business seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). + Lists all Copilot seat assignments for an organization that are currently being billed (either active or pending cancellation at the start of the next billing cycle). + + Only organization owners can configure and view details about the organization's Copilot Business or Enterprise subscription. - Only organization owners and members with admin permissions can configure and view details about the organization's Copilot for Business subscription. You must - authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. tags: - copilot operationId: copilot/list-copilot-seats externalDocs: description: API method documentation - url: https://docs.github.com/rest/copilot/copilot-for-business#list-all-copilot-for-business-seat-assignments-for-an-organization + url: https://docs.github.com/rest/copilot/copilot-user-management#list-all-copilot-seat-assignments-for-an-organization parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/page" - name: per_page - description: The number of results per page (max 100). + description: The number of results per page (max 100). For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer @@ -6510,8 +6621,8 @@ paths: properties: total_seats: type: integer - description: Total number of Copilot For Business seats for the - organization currently being billed. + description: Total number of Copilot seats for the organization + currently being billed. seats: type: array items: @@ -6534,28 +6645,29 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: copilot - subcategory: copilot-for-business + subcategory: copilot-user-management "/orgs/{org}/copilot/billing/selected_teams": post: - summary: Add teams to the Copilot for Business subscription for an organization + summary: Add teams to the Copilot subscription for an organization description: |- **Note**: This endpoint is in beta and is subject to change. - Purchases a GitHub Copilot for Business seat for all users within each specified team. - The organization will be billed accordingly. For more information about Copilot for Business pricing, see "[About billing for GitHub Copilot for Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-for-business)". + Purchases a GitHub Copilot seat for all users within each specified team. + The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". - Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You must - authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. + Only organization owners can configure GitHub Copilot in their organization. - In order for an admin to use this endpoint, the organization must have a Copilot for Business subscription and a configured suggestion matching policy. - For more information about setting up a Copilot for Business subscription, see "[Setting up a Copilot for Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-for-business-subscription-for-your-organization)". - For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". + For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + + OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. tags: - copilot - operationId: copilot/add-copilot-for-business-seats-for-teams + operationId: copilot/add-copilot-seats-for-teams externalDocs: description: API method documentation - url: https://docs.github.com/rest/copilot/copilot-for-business#add-teams-to-the-copilot-for-business-subscription-for-an-organization + url: https://docs.github.com/rest/copilot/copilot-user-management#add-teams-to-the-copilot-subscription-for-an-organization parameters: - "$ref": "#/components/parameters/org" requestBody: @@ -6607,7 +6719,7 @@ paths: '404': "$ref": "#/components/responses/not_found" '422': - description: Copilot for Business is not enabled for this organization, + description: Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured. @@ -6615,27 +6727,28 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: copilot - subcategory: copilot-for-business + subcategory: copilot-user-management delete: - summary: Remove teams from the Copilot for Business subscription for an organization + summary: Remove teams from the Copilot subscription for an organization description: |- **Note**: This endpoint is in beta and is subject to change. - Cancels the Copilot for Business seat assignment for all members of each team specified. + Cancels the Copilot seat assignment for all members of each team specified. This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. - For more information about Copilot for Business pricing, see "[About billing for GitHub Copilot for Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-for-business)". + For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + + For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". - For more information about disabling access to Copilot for Business, see "[Disabling access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization#disabling-access-to-github-copilot-for-specific-users-in-your-organization)". + Only organization owners can configure GitHub Copilot in their organization. - Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You must - authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. tags: - copilot operationId: copilot/cancel-copilot-seat-assignment-for-teams externalDocs: description: API method documentation - url: https://docs.github.com/rest/copilot/copilot-for-business#remove-teams-from-the-copilot-for-business-subscription-for-an-organization + url: https://docs.github.com/rest/copilot/copilot-user-management#remove-teams-from-the-copilot-subscription-for-an-organization parameters: - "$ref": "#/components/parameters/org" requestBody: @@ -6687,7 +6800,7 @@ paths: '404': "$ref": "#/components/responses/not_found" '422': - description: Copilot for Business is not enabled for this organization, + description: Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured. @@ -6695,28 +6808,29 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: copilot - subcategory: copilot-for-business + subcategory: copilot-user-management "/orgs/{org}/copilot/billing/selected_users": post: - summary: Add users to the Copilot for Business subscription for an organization + summary: Add users to the Copilot subscription for an organization description: |- **Note**: This endpoint is in beta and is subject to change. - Purchases a GitHub Copilot for Business seat for each user specified. - The organization will be billed accordingly. For more information about Copilot for Business pricing, see "[About billing for GitHub Copilot for Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-for-business)". + Purchases a GitHub Copilot seat for each user specified. + The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". - Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You must - authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. + Only organization owners can configure GitHub Copilot in their organization. - In order for an admin to use this endpoint, the organization must have a Copilot for Business subscription and a configured suggestion matching policy. - For more information about setting up a Copilot for Business subscription, see "[Setting up a Copilot for Business subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise#setting-up-a-copilot-for-business-subscription-for-your-organization)". - For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)". + For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)". + + OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. tags: - copilot - operationId: copilot/add-copilot-for-business-seats-for-users + operationId: copilot/add-copilot-seats-for-users externalDocs: description: API method documentation - url: https://docs.github.com/rest/copilot/copilot-for-business#add-users-to-the-copilot-for-business-subscription-for-an-organization + url: https://docs.github.com/rest/copilot/copilot-user-management#add-users-to-the-copilot-subscription-for-an-organization parameters: - "$ref": "#/components/parameters/org" requestBody: @@ -6768,7 +6882,7 @@ paths: '404': "$ref": "#/components/responses/not_found" '422': - description: Copilot for Business is not enabled for this organization, + description: Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured. @@ -6776,27 +6890,28 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: copilot - subcategory: copilot-for-business + subcategory: copilot-user-management delete: - summary: Remove users from the Copilot for Business subscription for an organization + summary: Remove users from the Copilot subscription for an organization description: |- **Note**: This endpoint is in beta and is subject to change. - Cancels the Copilot for Business seat assignment for each user specified. + Cancels the Copilot seat assignment for each user specified. This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users. - For more information about Copilot for Business pricing, see "[About billing for GitHub Copilot for Business](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#pricing-for-github-copilot-for-business)" + For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)". + + For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)". - For more information about disabling access to Copilot for Business, see "[Disabling access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/configuring-github-copilot/configuring-github-copilot-settings-in-your-organization#disabling-access-to-github-copilot-for-specific-users-in-your-organization)". + Only organization owners can configure GitHub Copilot in their organization. - Only organization owners and members with admin permissions can configure GitHub Copilot in their organization. You must - authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. tags: - copilot operationId: copilot/cancel-copilot-seat-assignment-for-users externalDocs: description: API method documentation - url: https://docs.github.com/rest/copilot/copilot-for-business#remove-users-from-the-copilot-for-business-subscription-for-an-organization + url: https://docs.github.com/rest/copilot/copilot-user-management#remove-users-from-the-copilot-subscription-for-an-organization parameters: - "$ref": "#/components/parameters/org" requestBody: @@ -6848,7 +6963,7 @@ paths: '404': "$ref": "#/components/responses/not_found" '422': - description: Copilot for Business is not enabled for this organization, + description: Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, the seat management setting is set to enable Copilot for all users or is unconfigured, or a user's @@ -6857,18 +6972,16 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: copilot - subcategory: copilot-for-business + subcategory: copilot-user-management "/orgs/{org}/dependabot/alerts": get: summary: List Dependabot alerts for an organization description: |- Lists Dependabot alerts for an 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. + The authenticated user must be an owner or security manager for the organization to use this endpoint. - For public repositories, you may instead use the `public_repo` scope. - - GitHub Apps must have **Dependabot alerts** read permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. tags: - dependabot operationId: dependabot/list-alerts-for-org @@ -6919,10 +7032,11 @@ paths: "/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. + description: |- + Lists all secrets available in an organization without revealing their + encrypted values. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - dependabot operationId: dependabot/list-org-secrets @@ -6964,11 +7078,11 @@ paths: "/orgs/{org}/dependabot/secrets/public-key": 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. + description: |- + Gets your public key, which you need to encrypt secrets. You need to + encrypt a secret before you can create or update secrets. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - dependabot operationId: dependabot/get-org-public-key @@ -6995,10 +7109,10 @@ paths: "/orgs/{org}/dependabot/secrets/{secret_name}": 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. + description: |- + Gets a single organization secret without revealing its encrypted value. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - dependabot operationId: dependabot/get-org-secret @@ -7029,9 +7143,7 @@ paths: Creates or updates an organization secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." - 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. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - dependabot operationId: dependabot/create-or-update-org-secret @@ -7109,10 +7221,10 @@ paths: 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. + description: |- + Deletes a secret in an organization using the secret name. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - dependabot operationId: dependabot/delete-org-secret @@ -7133,11 +7245,11 @@ paths: "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": 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. + description: |- + Lists all repositories that have been selected when the `visibility` + for repository access to a secret is set to `selected`. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - dependabot operationId: dependabot/list-selected-repos-for-org-secret @@ -7176,12 +7288,12 @@ paths: 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/dependabot/secrets#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. + 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/dependabot/secrets#create-or-update-an-organization-secret). + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - dependabot operationId: dependabot/set-selected-repos-for-org-secret @@ -7227,12 +7339,12 @@ paths: "/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/rest/dependabot/secrets#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. + 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/dependabot/secrets#create-or-update-an-organization-secret). + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - dependabot operationId: dependabot/add-selected-repo-to-org-secret @@ -7259,12 +7371,12 @@ paths: 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/dependabot/secrets#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. + 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/dependabot/secrets#create-or-update-an-organization-secret). + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - dependabot operationId: dependabot/remove-selected-repo-from-org-secret @@ -7294,7 +7406,8 @@ paths: summary: Get list of conflicting packages during Docker migration for organization description: |- Lists all packages that are in a specific organization, are readable by the requesting user, and that encountered a conflict during a Docker migration. - To use this endpoint, you must authenticate using an access token with the `read:packages` scope. + + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. tags: - packages operationId: packages/list-docker-migration-conflicting-packages-for-organization @@ -7396,7 +7509,10 @@ paths: "/orgs/{org}/hooks": get: summary: List organization webhooks - description: '' + description: "You must be an organization owner to use this endpoint. \n\nOAuth + app tokens and personal access tokens (classic) need `admin:org_hook` scope. + OAuth apps cannot list, view, or edit \nwebhooks that they did not create + and users cannot list, view, or edit webhooks that were created by OAuth apps." tags: - orgs operationId: orgs/list-webhooks @@ -7431,8 +7547,11 @@ paths: subcategory: webhooks post: summary: Create an organization webhook - description: 'Here''s how you can create a hook that posts payloads in JSON - format:' + description: "Create a hook that posts payloads in JSON format.\n\nYou must + be an organization owner to use this endpoint. \n\nOAuth app tokens and personal + access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, + view, or \nedit webhooks that they did not create and users cannot list, view, + or edit webhooks that were created by OAuth apps." tags: - orgs operationId: orgs/create-webhook @@ -7526,8 +7645,12 @@ paths: "/orgs/{org}/hooks/{hook_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/orgs/webhooks#get-a-webhook-configuration-for-an-organization)." + description: "Returns a webhook configured in an organization. To get only the + webhook\n`config` properties, see \"[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization). + \n\nYou must be an organization owner to use this endpoint. \n\nOAuth app + tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth + apps cannot list, view, or edit \nwebhooks that they did not create and users + cannot list, view, or edit webhooks that were created by OAuth apps." tags: - orgs operationId: orgs/get-webhook @@ -7556,11 +7679,15 @@ paths: 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/orgs/webhooks#update-a-webhook-configuration-for-an-organization)." + description: "Updates a webhook configured in an organization. When you update + a webhook,\nthe `secret` will be overwritten. If you previously had a `secret` + set, you must\nprovide the same `secret` or set a new `secret` or the secret + will be removed. If\nyou are only updating individual webhook `config` properties, + use \"[Update a webhook\nconfiguration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)\". + \n\nYou must be an organization owner to use this endpoint. \n\nOAuth app + tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth + apps cannot list, view, or edit \nwebhooks that they did not create and users + cannot list, view, or edit webhooks that were created by OAuth apps." tags: - orgs operationId: orgs/update-webhook @@ -7634,7 +7761,10 @@ paths: subcategory: webhooks delete: summary: Delete an organization webhook - description: '' + description: "You must be an organization owner to use this endpoint. \n\nOAuth + app tokens and personal access tokens (classic) need `admin:org_hook` scope. + OAuth apps cannot list, view, or edit \nwebhooks that they did not create + and users cannot list, view, or edit webhooks that were created by OAuth apps." tags: - orgs operationId: orgs/delete-webhook @@ -7657,10 +7787,13 @@ paths: "/orgs/{org}/hooks/{hook_id}/config": get: summary: Get a webhook configuration for 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/orgs/webhooks#get-an-organization-webhook)." - - Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + 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/orgs/webhooks#get-an-organization-webhook).\"\n\nYou + must be an organization owner to use this endpoint. \n\nOAuth app tokens and + personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot + list, view, or edit \nwebhooks that they did not create and users cannot list, + view, or edit webhooks that were created by OAuth apps." tags: - orgs operationId: orgs/get-webhook-config-for-org @@ -7687,10 +7820,13 @@ paths: subcategory: webhooks patch: summary: Update a webhook configuration for 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/orgs/webhooks#update-an-organization-webhook)." - - Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + 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/orgs/webhooks#update-an-organization-webhook).\"\n\nYou + must be an organization owner to use this endpoint. \n\nOAuth app tokens and + personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot + list, view, or edit \nwebhooks that they did not create and users cannot list, + view, or edit webhooks that were created by OAuth apps." tags: - orgs operationId: orgs/update-webhook-config-for-org @@ -7741,8 +7877,12 @@ paths: "/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. + description: "Returns a list of webhook deliveries for a webhook configured + in an organization.\n\nYou must be an organization owner to use this endpoint. + \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` + scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not + create and users cannot list, view, or edit webhooks that were created by + OAuth apps." tags: - orgs operationId: orgs/list-webhook-deliveries @@ -7783,7 +7923,11 @@ paths: "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": get: summary: Get a webhook delivery for an organization webhook - description: Returns a delivery for a webhook configured in an organization. + description: "Returns a delivery for a webhook configured in an organization.\n\nYou + must be an organization owner to use this endpoint. \n\nOAuth app tokens and + personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot + list, view, or edit \nwebhooks that they did not create and users cannot list, + view, or edit webhooks that were created by OAuth apps." tags: - orgs operationId: orgs/get-webhook-delivery @@ -7816,7 +7960,11 @@ paths: "/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. + description: "Redeliver a delivery for a webhook configured in an organization.\n\nYou + must be an organization owner to use this endpoint. \n\nOAuth app tokens and + personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot + list, view, or edit \nwebhooks that they did not create and users cannot list, + view, or edit webhooks that were created by OAuth apps." tags: - orgs operationId: orgs/redeliver-webhook-delivery @@ -7842,8 +7990,12 @@ paths: "/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. + description: "This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event)\nto + be sent to the hook.\n\nYou must be an organization owner to use this endpoint. + \n\nOAuth app tokens and personal access tokens (classic) need `admin:org_hook` + scope. OAuth apps cannot list, view, or edit \nwebhooks that they did not + create and users cannot list, view, or edit webhooks that were created by + OAuth apps." tags: - orgs operationId: orgs/ping-webhook @@ -7896,9 +8048,13 @@ paths: "/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. + description: |- + Lists all GitHub Apps in an organization. The installation count includes + all GitHub Apps installed on repositories in the organization. + + The authenticated user must be an organization owner to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:read` scope to use this endpoint. tags: - orgs operationId: orgs/list-app-installations @@ -8101,7 +8257,8 @@ paths: 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. - 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/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." tags: - orgs operationId: orgs/create-invitation @@ -8134,11 +8291,15 @@ paths: - 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." + of your organization. \n * `reinstate` - The previous role assigned + to the invitee before they were removed from your organization. + Can be one of the roles listed above. Only works if the invitee + was previously part of your organization." enum: - admin - direct_member - billing_manager + - reinstate default: direct_member team_ids: type: array @@ -8251,6 +8412,13 @@ paths: 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/pulls/pulls#list-pull-requests)" endpoint. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/list-for-org @@ -8449,7 +8617,7 @@ paths: description: |- Lists the codespaces that a member of an organization has for repositories in that organization. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/get-codespaces-for-user-in-org @@ -8502,7 +8670,7 @@ paths: description: |- Deletes a user's codespace. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/delete-from-organization @@ -8537,7 +8705,7 @@ paths: description: |- Stops a user's codespace. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - codespaces operationId: codespaces/stop-in-organization @@ -8575,19 +8743,21 @@ paths: subcategory: organizations "/orgs/{org}/members/{username}/copilot": get: - summary: Get Copilot for Business seat assignment details for a user + summary: Get Copilot seat assignment details for a user description: |- **Note**: This endpoint is in beta and is subject to change. - Gets the GitHub Copilot for Business seat assignment details for a member of an organization who currently has access to GitHub Copilot. + Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot. - Organization owners and members with admin permissions can view GitHub Copilot seat assignment details for members in their organization. You must authenticate using an access token with the `manage_billing:copilot` scope to use this endpoint. + Organization owners can view GitHub Copilot seat assignment details for members in their organization. + + OAuth app tokens and personal access tokens (classic) need the `manage_billing:copilot` scope to use this endpoint. tags: - copilot - operationId: copilot/get-copilot-seat-assignment-details-for-user + operationId: copilot/get-copilot-seat-details-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/copilot/copilot-for-business#get-copilot-for-business-seat-assignment-details-for-a-user + url: https://docs.github.com/rest/copilot/copilot-user-management#get-copilot-seat-assignment-details-for-a-user parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/username" @@ -8610,13 +8780,13 @@ paths: '404': "$ref": "#/components/responses/not_found" '422': - description: Copilot for Business is not enabled for this organization or - the user has a pending organization invitation. + description: Copilot Business or Enterprise is not enabled for this organization + or the user has a pending organization invitation. x-github: githubCloudOnly: false enabledForGitHubApps: true category: copilot - subcategory: copilot-for-business + subcategory: copilot-user-management "/orgs/{org}/memberships/{username}": get: summary: Get organization membership for a user @@ -8858,9 +9028,8 @@ paths: 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"`.' + description: Exclude related items from being returned in the response + in order to improve performance of the request. items: type: string enum: @@ -9054,6 +9223,610 @@ paths: enabledForGitHubApps: false category: migrations subcategory: orgs + "/orgs/{org}/organization-fine-grained-permissions": + get: + summary: List organization fine-grained permissions for an organization + description: |- + Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." + + To use this endpoint, the authenticated user must be one of: + + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/list-organization-fine-grained-permissions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#list-organization-fine-grained-permissions-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/organization-fine-grained-permission" + examples: + default: + "$ref": "#/components/examples/organization-fine-grained-permission-example" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + "/orgs/{org}/organization-roles": + get: + summary: Get all organization roles for an organization + description: |- + Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + To use this endpoint, the authenticated user must be one of: + + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/list-org-roles + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#get-all-organization-roles-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + responses: + '200': + description: Response - list of organization roles + content: + application/json: + schema: + type: object + properties: + total_count: + type: integer + description: The total number of organization roles available + to the organization. + roles: + type: array + description: The list of organization roles available to the organization. + items: + "$ref": "#/components/schemas/organization-role" + examples: + default: + "$ref": "#/components/examples/organization-role-list" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + post: + summary: Create a custom organization role + description: |- + Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + To use this endpoint, the authenticated user must be one of: + + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/create-custom-organization-role + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#create-a-custom-organization-role + parameters: + - "$ref": "#/components/parameters/org" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the custom role. + description: + type: string + description: A short description about the intended usage of this + role or what permissions it grants. + permissions: + type: array + description: A list of additional permissions included in this role. + items: + type: string + required: + - name + - permissions + examples: + default: + value: + name: Custom Role Manager + description: Permissions to manage custom roles within an org + permissions: + - write_organization_custom_repo_role + - write_organization_custom_org_role + - read_organization_custom_repo_role + - read_organization_custom_org_role + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/organization-role" + examples: + default: + value: + id: 8030 + name: Custom Role Manager + description: Permissions to manage custom roles within an org + permissions: + - write_organization_custom_repo_role + - write_organization_custom_org_role + - read_organization_custom_repo_role + - read_organization_custom_org_role + 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 + created_at: '2022-07-04T22:19:11Z' + updated_at: '2022-07-04T22:19:11Z' + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + "/orgs/{org}/organization-roles/teams/{team_slug}": + delete: + summary: Remove all organization roles for a team + description: |- + Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + The authenticated user must be an administrator for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/revoke-all-org-roles-team + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#remove-all-organization-roles-for-a-team + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + "/orgs/{org}/organization-roles/teams/{team_slug}/{role_id}": + put: + summary: Assign an organization role to a team + description: |- + Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + The authenticated user must be an administrator for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/assign-team-to-org-role + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#assign-an-organization-role-to-a-team + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/role-id" + responses: + '204': + description: Response + '404': + description: Response if the organization, team or role does not exist. + '422': + description: Response if the organization roles feature is not enabled for + the organization, or validation failed. + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + delete: + summary: Remove an organization role from a team + description: |- + Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + The authenticated user must be an administrator for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/revoke-org-role-team + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#remove-an-organization-role-from-a-team + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/role-id" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + "/orgs/{org}/organization-roles/users/{username}": + delete: + summary: Remove all organization roles for a user + description: |- + Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + The authenticated user must be an administrator for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/revoke-all-org-roles-user + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#remove-all-organization-roles-for-a-user + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/username" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + "/orgs/{org}/organization-roles/users/{username}/{role_id}": + put: + summary: Assign an organization role to a user + description: |- + Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + The authenticated user must be an administrator for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/assign-user-to-org-role + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#assign-an-organization-role-to-a-user + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/role-id" + responses: + '204': + description: Response + '404': + description: Response if the organization, user or role does not exist. + '422': + description: Response if the organization roles feature is not enabled enabled + for the organization, the validation failed, or the user is not an organization + member. + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + delete: + summary: Remove an organization role from a user + description: |- + Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + The authenticated user must be an administrator for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/revoke-org-role-user + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#remove-an-organization-role-from-a-user + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/role-id" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + "/orgs/{org}/organization-roles/{role_id}": + get: + summary: Get an organization role + description: |- + Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + To use this endpoint, the authenticated user must be one of: + + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/get-org-role + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#get-an-organization-role + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/role-id" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/organization-role" + examples: + default: + "$ref": "#/components/examples/organization-role" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + patch: + summary: Update a custom organization role + description: |- + Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + + To use this endpoint, the authenticated user must be one of: + + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/patch-custom-organization-role + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#update-a-custom-organization-role + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/role-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the custom role. + description: + type: string + description: A short description about the intended usage of this + role or what permissions it grants. + permissions: + type: array + description: A list of additional permissions included in this role. + items: + type: string + examples: + default: + value: + description: Permissions to manage custom roles within an org. + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/organization-role" + examples: + default: + value: + id: 8030 + name: Custom Role Manager + description: Permissions to manage custom roles within an org + permissions: + - write_organization_custom_repo_role + - write_organization_custom_org_role + - read_organization_custom_repo_role + - read_organization_custom_org_role + 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 + created_at: '2022-07-04T22:19:11Z' + updated_at: '2022-07-04T22:19:11Z' + '422': + "$ref": "#/components/responses/validation_failed" + '409': + "$ref": "#/components/responses/conflict" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + delete: + summary: Delete a custom organization role. + description: |- + Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + To use this endpoint, the authenticated user must be one of: + + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/delete-custom-organization-role + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#delete-a-custom-organization-role + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/role-id" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + "/orgs/{org}/organization-roles/{role_id}/teams": + get: + summary: List teams that are assigned to an organization role + description: |- + Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + To use this endpoint, you must be an administrator for the organization. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/list-org-role-teams + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#list-teams-that-are-assigned-to-an-organization-role + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/role-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response - List of assigned teams + content: + application/json: + schema: + type: array + description: List of teams assigned to the organization role + items: + "$ref": "#/components/schemas/team" + examples: + default: + "$ref": "#/components/examples/team-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + description: Response if the organization or role does not exist. + '422': + description: Response if the organization roles feature is not enabled or + validation failed. + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles + "/orgs/{org}/organization-roles/{role_id}/users": + get: + summary: List users that are assigned to an organization role + description: |- + Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + To use this endpoint, you must be an administrator for the organization. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + tags: + - orgs + operationId: orgs/list-org-role-users + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/organization-roles#list-users-that-are-assigned-to-an-organization-role + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/role-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response - List of assigned users + content: + application/json: + schema: + type: array + description: List of users assigned to the organization role + items: + "$ref": "#/components/schemas/simple-user" + examples: + default: + "$ref": "#/components/examples/simple-user-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + description: Response if the organization or role does not exist. + '422': + description: Response if the organization roles feature is not enabled or + validation failed. + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: organization-roles "/orgs/{org}/outside_collaborators": get: summary: List outside collaborators for an organization @@ -9209,7 +9982,7 @@ paths: description: |- Lists packages in an organization readable by the user. - To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/list-packages-for-organization @@ -9237,13 +10010,15 @@ paths: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/package-visibility" - name: page - description: Page number of the results to fetch. + description: The page number of the results to fetch. For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer default: 1 - name: per_page - description: The number of results per page (max 100). + description: The number of results per page (max 100). For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer @@ -9277,7 +10052,7 @@ paths: description: |- Gets a specific package in an organization. - To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/get-package-for-organization @@ -9308,9 +10083,9 @@ paths: 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. - To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `read:packages` and `delete:packages` scopes. In addition: - - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/delete-package-for-org @@ -9345,9 +10120,9 @@ paths: - 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 `read:packages` and `write:packages` scopes. In addition: - - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/restore-package-for-org @@ -9384,7 +10159,7 @@ paths: description: |- Lists package versions for a package owned by an organization. - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/get-all-package-versions-for-package-owned-by-org @@ -9436,7 +10211,7 @@ paths: description: |- Gets a specific package version in an organization. - You must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/get-package-version-for-organization @@ -9468,9 +10243,9 @@ paths: 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 `read:packages` and `delete:packages` scopes. In addition: - - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/delete-package-version-for-org @@ -9506,9 +10281,9 @@ paths: - 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 `read:packages` and `write:packages` scopes. In addition: - - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/restore-package-version-for-org @@ -9539,10 +10314,9 @@ paths: summary: List requests to access organization resources with fine-grained personal access tokens description: |- - Lists requests from organization members to access organization resources with a fine-grained personal access token. Only GitHub Apps can call this API, - using the `organization_personal_access_token_requests: read` permission. + Lists requests from organization members to access organization resources with a fine-grained personal access token. - **Note**: Fine-grained PATs are in public beta. Related APIs, events, and functionality are subject to change. + Only GitHub Apps can use this endpoint. tags: - orgs operationId: orgs/list-pat-grant-requests @@ -9592,10 +10366,9 @@ paths: summary: Review requests to access organization resources with fine-grained personal access tokens description: |- - Approves or denies multiple pending requests to access organization resources via a fine-grained personal access token. Only GitHub Apps can call this API, - using the `organization_personal_access_token_requests: write` permission. + Approves or denies multiple pending requests to access organization resources via a fine-grained personal access token. - **Note**: Fine-grained PATs are in public beta. Related APIs, events, and functionality are subject to change. + Only GitHub Apps can use this endpoint. tags: - orgs operationId: orgs/review-pat-grant-requests-in-bulk @@ -9664,10 +10437,9 @@ paths: summary: Review a request to access organization resources with a fine-grained personal access token description: |- - Approves or denies a pending request to access organization resources via a fine-grained personal access token. Only GitHub Apps can call this API, - using the `organization_personal_access_token_requests: write` permission. + Approves or denies a pending request to access organization resources via a fine-grained personal access token. - **Note**: Fine-grained PATs are in public beta. Related APIs, events, and functionality are subject to change. + Only GitHub Apps can use this endpoint. tags: - orgs operationId: orgs/review-pat-grant-request @@ -9731,10 +10503,9 @@ paths: summary: List repositories requested to be accessed by a fine-grained personal access token description: |- - Lists the repositories a fine-grained personal access token request is requesting access to. Only GitHub Apps can call this API, - using the `organization_personal_access_token_requests: read` permission. + Lists the repositories a fine-grained personal access token request is requesting access to. - **Note**: Fine-grained PATs are in public beta. Related APIs, events, and functionality are subject to change. + Only GitHub Apps can use this endpoint. tags: - orgs operationId: orgs/list-pat-grant-request-repositories @@ -9783,10 +10554,9 @@ paths: summary: List fine-grained personal access tokens with access to organization resources description: |- - Lists approved fine-grained personal access tokens owned by organization members that can access organization resources. Only GitHub Apps can call this API, - using the `organization_personal_access_tokens: read` permission. + Lists approved fine-grained personal access tokens owned by organization members that can access organization resources. - **Note**: Fine-grained PATs are in public beta. Related APIs, events, and functionality are subject to change. + Only GitHub Apps can use this endpoint. tags: - orgs operationId: orgs/list-pat-grants @@ -9836,10 +10606,9 @@ paths: summary: Update the access to organization resources via fine-grained personal access tokens description: |- - Updates the access organization members have to organization resources via fine-grained personal access tokens. Limited to revoking a token's existing access. Only GitHub Apps can call this API, - using the `organization_personal_access_tokens: write` permission. + Updates the access organization members have to organization resources via fine-grained personal access tokens. Limited to revoking a token's existing access. - **Note**: Fine-grained PATs are in public beta. Related APIs, events, and functionality are subject to change. + Only GitHub Apps can use this endpoint. tags: - orgs operationId: orgs/update-pat-accesses @@ -9902,10 +10671,9 @@ paths: summary: Update the access a fine-grained personal access token has to organization resources description: |- - Updates the access an organization member has to organization resources via a fine-grained personal access token. Limited to revoking the token's existing access. Limited to revoking a token's existing access. Only GitHub Apps can call this API, - using the `organization_personal_access_tokens: write` permission. + Updates the access an organization member has to organization resources via a fine-grained personal access token. Limited to revoking the token's existing access. Limited to revoking a token's existing access. - **Note**: Fine-grained PATs are in public beta. Related APIs, events, and functionality are subject to change. + Only GitHub Apps can use this endpoint. tags: - orgs operationId: orgs/update-pat-access @@ -9955,10 +10723,9 @@ paths: get: summary: List repositories a fine-grained personal access token has access to description: |- - Lists the repositories a fine-grained personal access token has access to. Only GitHub Apps can call this API, - using the `organization_personal_access_tokens: read` permission. + Lists the repositories a fine-grained personal access token has access to. - **Note**: Fine-grained PATs are in public beta. Related APIs, events, and functionality are subject to change. + Only GitHub Apps can use this endpoint. tags: - orgs operationId: orgs/list-pat-grant-repositories @@ -10110,6 +10877,377 @@ paths: enabledForGitHubApps: true category: projects subcategory: projects + "/orgs/{org}/properties/schema": + get: + summary: Get all custom properties for an organization + description: |- + Gets all custom properties defined for an organization. + Organization members can read these properties. + tags: + - orgs + operationId: orgs/get-all-custom-properties + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/custom-properties#get-all-custom-properties-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/org-custom-property" + examples: + default: + "$ref": "#/components/examples/org-custom-properties" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: custom-properties + patch: + summary: Create or update custom properties for an organization + description: |- + Creates new or updates existing custom properties defined for an organization in a batch. + + To use this endpoint, the authenticated user must be one of: + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. + tags: + - orgs + operationId: orgs/create-or-update-custom-properties + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + properties: + type: array + description: The array of custom properties to create or update. + items: + "$ref": "#/components/schemas/org-custom-property" + minItems: 1 + maxItems: 100 + required: + - properties + examples: + default: + value: + properties: + - property_name: environment + value_type: single_select + required: true + default_value: production + description: Prod or dev environment + allowed_values: + - production + - development + values_editable_by: org_actors + - property_name: service + value_type: string + - property_name: team + value_type: string + description: Team owning the repository + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/org-custom-property" + examples: + default: + "$ref": "#/components/examples/org-custom-properties" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: custom-properties + "/orgs/{org}/properties/schema/{custom_property_name}": + get: + summary: Get a custom property for an organization + description: |- + Gets a custom property that is defined for an organization. + Organization members can read these properties. + tags: + - orgs + operationId: orgs/get-custom-property + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/custom-properties#get-a-custom-property-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/custom-property-name" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/org-custom-property" + examples: + default: + "$ref": "#/components/examples/org-custom-property" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: custom-properties + put: + summary: Create or update a custom property for an organization + description: |- + Creates a new or updates an existing custom property that is defined for an organization. + + To use this endpoint, the authenticated user must be one of: + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. + tags: + - orgs + operationId: orgs/create-or-update-custom-property + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/custom-properties#create-or-update-a-custom-property-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/custom-property-name" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + value_type: + type: string + example: single_select + enum: + - string + - single_select + description: The type of the value for the property + required: + type: boolean + description: Whether the property is required. + default_value: + oneOf: + - type: string + - type: array + items: + type: string + nullable: true + description: Default value of the property + description: + type: string + nullable: true + description: Short description of the property + allowed_values: + type: array + items: + type: string + maxLength: 75 + maxItems: 200 + nullable: true + description: |- + An ordered list of the allowed values of the property. + The property can have up to 200 allowed values. + required: + - value_type + examples: + default: + value: + value_type: single_select + required: true + default_value: production + description: Prod or dev environment + allowed_values: + - production + - development + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/org-custom-property" + examples: + default: + "$ref": "#/components/examples/org-custom-property" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: custom-properties + delete: + summary: Remove a custom property for an organization + description: |- + Removes a custom property that is defined for an organization. + + To use this endpoint, the authenticated user must be one of: + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization. + tags: + - orgs + operationId: orgs/remove-custom-property + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/custom-properties#remove-a-custom-property-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/custom-property-name" + responses: + '204': + "$ref": "#/components/responses/no_content" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: custom-properties + "/orgs/{org}/properties/values": + get: + summary: List custom property values for organization repositories + description: |- + Lists organization repositories with all of their custom property values. + Organization members can read these properties. + tags: + - orgs + operationId: orgs/list-custom-properties-values-for-repos + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/custom-properties#list-custom-property-values-for-organization-repositories + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - name: repository_query + description: Finds repositories in the organization with a query containing + 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 the web interface for GitHub. To learn more about the format + of the query, see [Constructing a search query](https://docs.github.com/rest/search/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: false + schema: + type: string + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/org-repo-custom-property-values" + examples: + default: + "$ref": "#/components/examples/org-repo-custom-property-values" + headers: + Link: + "$ref": "#/components/headers/link" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: custom-properties + patch: + summary: Create or update custom property values for organization repositories + description: |- + Create new or update existing custom property values for repositories in a batch that belong to an organization. + Each target repository will have its custom property values updated to match the values provided in the request. + + A maximum of 30 repositories can be updated in a single request. + + Using a value of `null` for a custom property will remove or 'unset' the property value from the repository. + + To use this endpoint, the authenticated user must be one of: + - An administrator for the organization. + - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_values_editor` in the organization. + tags: + - orgs + operationId: orgs/create-or-update-custom-properties-values-for-repos + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-property-values-for-organization-repositories + parameters: + - "$ref": "#/components/parameters/org" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + repository_names: + type: array + description: The names of repositories that the custom property + values will be applied to. + items: + type: string + minItems: 1 + maxItems: 30 + properties: + type: array + description: List of custom property names and associated values + to apply to the repositories. + items: + "$ref": "#/components/schemas/custom-property-value" + required: + - repository_names + - properties + examples: + default: + "$ref": "#/components/examples/org-repo-update-custom-property-values" + responses: + '204': + description: No Content when custom property values are successfully created + or updated + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: custom-properties "/orgs/{org}/public_members": get: summary: List public organization members @@ -10173,7 +11311,7 @@ paths: 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)." + Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." tags: - orgs operationId: orgs/set-public-membership-for-authenticated-user @@ -10292,12 +11430,7 @@ paths: 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 + OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. tags: - repos operationId: repos/create-in-org @@ -10459,6 +11592,12 @@ paths: - `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. + custom_properties: + type: object + description: The custom properties for the new repository. The keys + are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true required: - name examples: @@ -10477,10 +11616,10 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/repository" + "$ref": "#/components/schemas/full-repository" examples: default: - "$ref": "#/components/examples/repository" + "$ref": "#/components/examples/full-repository" headers: Location: example: https://api.github.com/repos/octocat/Hello-World @@ -10623,6 +11762,79 @@ paths: "$ref": "#/components/responses/not_found" '500': "$ref": "#/components/responses/internal_error" + "/orgs/{org}/rulesets/rule-suites": + get: + summary: List organization rule suites + description: |- + Lists suites of rule evaluations at the organization level. + For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." + tags: + - repos + operationId: repos/get-org-rule-suites + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/repository-name-in-query" + - "$ref": "#/components/parameters/time-period" + - "$ref": "#/components/parameters/actor-name-in-query" + - "$ref": "#/components/parameters/rule-suite-result" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/rule-suites" + examples: + default: + "$ref": "#/components/examples/rule-suite-items" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: rule-suites + "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}": + get: + summary: Get an organization rule suite + description: |- + Gets information about a suite of rule evaluations from within an organization. + For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." + tags: + - repos + operationId: repos/get-org-rule-suite + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/rule-suites#get-an-organization-rule-suite + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/rule-suite-id" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/rule-suite" + examples: + default: + "$ref": "#/components/examples/rule-suite" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: rule-suites "/orgs/{org}/rulesets/{ruleset_id}": get: summary: Get an organization repository ruleset @@ -10790,10 +12002,10 @@ paths: 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. - 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. + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. tags: - secret-scanning operationId: secret-scanning/list-alerts-for-org @@ -10811,6 +12023,7 @@ paths: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/secret-scanning-pagination-before-org-repo" - "$ref": "#/components/parameters/secret-scanning-pagination-after-org-repo" + - "$ref": "#/components/parameters/secret-scanning-alert-validity" responses: '200': description: Response @@ -10841,7 +12054,9 @@ paths: description: |- Lists repository security advisories for an 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 `repository_advisories:write` permission. + The authenticated user must be an owner or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. tags: - security-advisories operationId: security-advisories/list-org-repository-advisories @@ -10865,7 +12080,8 @@ paths: - "$ref": "#/components/parameters/pagination-before" - "$ref": "#/components/parameters/pagination-after" - name: per_page - description: The number of advisories to return per page. + description: The number of advisories to return per page. For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query required: false schema: @@ -10912,9 +12128,9 @@ paths: description: |- Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](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 an administrator or security manager for the organization, and you must use an access token with the `read:org` scope. + The authenticated user must be an administrator or security manager for the organization to use this endpoint. - GitHub Apps must have the `administration` organization read permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. tags: - orgs operationId: orgs/list-security-manager-teams @@ -10947,9 +12163,9 @@ paths: description: |- Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." - To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope. + The authenticated user must be an administrator for the organization to use this endpoint. - GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. tags: - orgs operationId: orgs/add-security-manager-team @@ -10976,9 +12192,9 @@ paths: description: |- Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." - To use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope. + The authenticated user must be an administrator for the organization to use this endpoint. - GitHub Apps must have the `administration` organization read-write permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. tags: - orgs operationId: orgs/remove-security-manager-team @@ -11005,7 +12221,7 @@ paths: 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. + OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. operationId: billing/get-github-actions-billing-org tags: - billing @@ -11037,7 +12253,7 @@ paths: 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. + OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. operationId: billing/get-github-packages-billing-org tags: - billing @@ -11069,7 +12285,7 @@ paths: 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. + OAuth app tokens and personal access tokens (classic) need the `repo` or `admin:org` scope to use this endpoint. operationId: billing/get-shared-storage-billing-org tags: - billing @@ -11392,9 +12608,11 @@ paths: get: summary: List discussions 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 all discussions on a team's page. **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + + OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - teams operationId: teams/list-discussions-in-org @@ -11436,11 +12654,13 @@ paths: 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/). + Creates a new discussion post on a team's page. - 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/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/create-discussion-in-org @@ -11498,9 +12718,11 @@ paths: 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/). + Get a specific discussion on a team's page. **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}`. + + OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - teams operationId: teams/get-discussion-in-org @@ -11529,9 +12751,11 @@ paths: 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/). + Edits the title and body text of a discussion post. Only the parameters you provide are updated. **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}`. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/update-discussion-in-org @@ -11577,9 +12801,11 @@ paths: delete: summary: Delete a discussion 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/). + Delete a discussion from a team's page. **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}`. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/delete-discussion-in-org @@ -11602,9 +12828,11 @@ paths: 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/). + List all comments on a team discussion. **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`. + + OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - teams operationId: teams/list-discussion-comments-in-org @@ -11641,11 +12869,13 @@ paths: 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/). + Creates a new comment on a team discussion. - 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/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." **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`. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/create-discussion-comment-in-org @@ -11692,9 +12922,11 @@ paths: get: summary: Get a discussion comment 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/). + Get a specific comment on a team discussion. **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}`. + + OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - teams operationId: teams/get-discussion-comment-in-org @@ -11724,9 +12956,11 @@ paths: 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/). + Edits the body text of a discussion comment. **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}`. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/update-discussion-comment-in-org @@ -11772,9 +13006,11 @@ paths: 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/). + Deletes a comment on a team discussion. **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}`. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/delete-discussion-comment-in-org @@ -11798,9 +13034,11 @@ paths: get: summary: List reactions for a team discussion comment description: |- - List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). 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/rest/teams/discussion-comments#get-a-discussion-comment). **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`. + + OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/list-for-team-discussion-comment-in-org @@ -11853,9 +13091,13 @@ paths: post: summary: Create reaction for a team discussion comment description: |- - Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). 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/rest/teams/discussion-comments#get-a-discussion-comment). + + 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`. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/create-for-team-discussion-comment-in-org @@ -11924,7 +13166,9 @@ paths: 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/teams/discussion-comments#get-a-discussion-comment). 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/rest/teams/discussion-comments#get-a-discussion-comment). + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/delete-for-team-discussion-comment @@ -11949,9 +13193,11 @@ paths: get: summary: List reactions for a team discussion description: |- - List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). 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/rest/teams/discussions#get-a-discussion). **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`. + + OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/list-for-team-discussion-in-org @@ -12003,9 +13249,13 @@ paths: post: summary: Create reaction for a team discussion description: |- - Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). 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/rest/teams/discussions#get-a-discussion). + + 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`. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/create-for-team-discussion-in-org @@ -12072,7 +13322,9 @@ paths: 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/teams/discussions#get-a-discussion). 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/rest/teams/discussions#get-a-discussion). + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/delete-for-team-discussion @@ -12415,7 +13667,7 @@ paths: 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/rest/overview/resources-in-the-rest-api#http-verbs)."' + information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."' enum: - read - write @@ -12522,6 +13774,8 @@ paths: If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, 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: - teams @@ -12558,7 +13812,7 @@ paths: 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/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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." **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}`. @@ -12672,14 +13926,11 @@ paths: post: summary: Enable or disable a security feature for an organization description: |- - Enables or disables the specified security feature for all eligible repositories in an organization. + Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](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 an organization owner or be member of a team with the security manager role. - A token with the 'write:org' scope is also required. + The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint. - GitHub Apps must have the `organization_administration:write` permission to use this endpoint. - - For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. tags: - orgs operationId: orgs/enable-or-disable-security-product-on-all-org-repos @@ -12706,8 +13957,7 @@ paths: - extended examples: default: - value: - query_suite: default + value: responses: '204': description: Action started @@ -13744,7 +14994,7 @@ paths: Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories: * The `core` object provides your rate limit status for all non-search-related resources in the REST API. - * The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/rest/search)." + * The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/rest/search/search)." * The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/rest/search/search#search-code)." * The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/graphql/overview/resource-limitations#rate-limit)." * The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)." @@ -14071,10 +15321,12 @@ paths: delete: summary: Delete a repository description: |- - Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + Deleting a repository requires admin access. If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, you will get a `403 Forbidden` response. + + OAuth app tokens and personal access tokens (classic) need the `delete_repo` scope to use this endpoint. tags: - repos operationId: repos/delete @@ -14117,10 +15369,12 @@ paths: "/repos/{owner}/{repo}/actions/artifacts": 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. + description: |- + Lists all artifacts for a repository. + + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/list-artifacts-for-repo @@ -14164,10 +15418,12 @@ paths: "/repos/{owner}/{repo}/actions/artifacts/{artifact_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. + 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-artifact @@ -14195,9 +15451,9 @@ paths: 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. + description: |- + Deletes an artifact for a workflow run. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-artifact @@ -14223,8 +15479,7 @@ paths: 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`. - 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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/download-artifact @@ -14259,7 +15514,10 @@ paths: 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. + + Anyone with read access to the repository can use this endpoint. + + If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-actions-cache-usage @@ -14289,8 +15547,8 @@ paths: summary: List GitHub Actions caches for a repository description: |- Lists the GitHub Actions caches 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. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-actions-cache-list @@ -14330,9 +15588,7 @@ paths: description: |- Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. - 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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-actions-cache-by-key @@ -14365,9 +15621,7 @@ paths: description: |- Deletes a GitHub Actions cache for a repository, using a cache 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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-actions-cache-by-id @@ -14389,10 +15643,12 @@ paths: "/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. + 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-job-for-workflow-run @@ -14423,9 +15679,11 @@ paths: 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. + 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/download-job-logs-for-workflow-run @@ -14455,9 +15713,7 @@ paths: 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. - 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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/re-run-job-for-workflow-run @@ -14505,8 +15761,8 @@ paths: summary: Get the customization template for an OIDC subject claim for a repository description: |- Gets the customization template for an OpenID Connect (OIDC) subject claim. - You must authenticate using an access token with the `repo` scope to use this - endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-custom-oidc-sub-claim-for-repo @@ -14539,8 +15795,8 @@ paths: summary: Set the customization template for an OIDC subject claim for a repository description: |- Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim 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. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/set-custom-oidc-sub-claim-for-repo @@ -14606,9 +15862,9 @@ paths: Lists all organization secrets shared with 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. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/list-repo-organization-secrets @@ -14652,12 +15908,11 @@ paths: get: summary: List repository organization variables description: |- - Lists all organiation variables shared with a repository. + Lists all organization variables shared with a repository. - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/list-repo-organization-variables @@ -14703,7 +15958,7 @@ paths: description: |- Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows 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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. operationId: actions/get-github-actions-permissions-repository tags: - actions @@ -14733,7 +15988,7 @@ paths: description: |- Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows 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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. operationId: actions/set-github-actions-permissions-repository tags: - actions @@ -14777,8 +16032,7 @@ paths: This endpoint only applies to private repositories. For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-workflow-access-to-repository @@ -14811,8 +16065,7 @@ paths: This endpoint only applies to private repositories. For more information, see "[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/set-workflow-access-to-repository @@ -14846,7 +16099,7 @@ paths: description: |- Gets the settings for selected actions and reusable workflows 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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. operationId: actions/get-allowed-actions-repository tags: - actions @@ -14876,7 +16129,7 @@ paths: description: |- Sets the actions and reusable workflows 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 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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. operationId: actions/set-allowed-actions-repository tags: - actions @@ -14911,7 +16164,7 @@ paths: 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/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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-github-actions-default-workflow-permissions-repository @@ -14943,7 +16196,7 @@ paths: can submit approving pull request reviews. For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/set-github-actions-default-workflow-permissions-repository @@ -14979,10 +16232,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/list-self-hosted-runners-for-repo @@ -15033,10 +16285,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/list-runner-applications-for-repo @@ -15069,10 +16320,9 @@ paths: description: |- Generates a configuration that can be passed to the runner application at startup. - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + The authenticated user must have admin access to the repository. + + OAuth tokens and personal access tokens (classic) need the`repo` scope to use this endpoint. tags: - actions operationId: actions/generate-runner-jitconfig-for-repo @@ -15138,17 +16388,18 @@ paths: "/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\nexpires after one hour.\n\nYou must authenticate using an access token - with the `repo` scope to use this endpoint.\nIf the repository is private, - you must use an access token with the `repo` scope.\nGitHub Apps must have - the `administration` permission for repositories and the `organization_self_hosted_runners` - permission for organizations.\nAuthenticated users must have admin access - to repositories or organizations, or the `manage_runners:enterprise` scope - for enterprises, to use these endpoints.\n\nExample using registration token: - \n\nConfigure your self-hosted runner, replacing `TOKEN` with the registration - token provided\nby this endpoint.\n\n```config.sh --url https://github.com/octo-org/octo-repo-artifacts - --token TOKEN```" + description: |- + Returns a token that you can pass to the `config` script. The token expires after one hour. + + For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner: + + ``` + ./config.sh --url https://github.com/octo-org --token TOKEN + ``` + + Authenticated users must have admin access to the repository to use this endpoint. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/create-registration-token-for-repo @@ -15177,20 +16428,17 @@ paths: 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. + Returns a token that you can pass to the `config` script to remove a self-hosted runner from an repository. The token expires after one hour. - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization: - Example using remove token: + ``` + ./config.sh remove --token TOKEN + ``` - To remove your self-hosted runner from a repository, replace TOKEN with - the remove token provided by this endpoint. + Authenticated users must have admin access to the repository to use this endpoint. - ```config.sh remove --token TOKEN``` + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/create-remove-token-for-repo @@ -15221,10 +16469,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-self-hosted-runner-for-repo @@ -15255,10 +16502,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the repository to use this endpoint. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-self-hosted-runner-from-repo @@ -15283,10 +16529,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/list-labels-for-self-hosted-runner-for-repo @@ -15310,12 +16555,11 @@ paths: 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. + Adds 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the organization to use this endpoint. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/add-custom-labels-to-self-hosted-runner-for-repo @@ -15366,10 +16610,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/set-custom-labels-for-self-hosted-runner-for-repo @@ -15421,10 +16664,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/remove-all-custom-labels-from-self-hosted-runner-for-repo @@ -15455,10 +16697,9 @@ paths: 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. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `administration` permission for repositories and the `organization_self_hosted_runners` permission for organizations. - Authenticated users must have admin access to repositories or organizations, or the `manage_runners:enterprise` scope for enterprises, to use these endpoints. + Authenticated users must have admin access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/remove-custom-label-from-self-hosted-runner-for-repo @@ -15486,9 +16727,13 @@ paths: 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). + 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/guides/getting-started-with-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. + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + + This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. tags: - actions operationId: actions/list-workflow-runs-for-repo @@ -15539,10 +16784,12 @@ paths: "/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. + description: |- + Gets a specific workflow run. + + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/get-workflow-run @@ -15572,9 +16819,11 @@ paths: delete: summary: Delete a workflow run 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. + Deletes a specific workflow run. + + Anyone with write access to the repository can use this endpoint. + + If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. operationId: actions/delete-workflow-run tags: - actions @@ -15596,9 +16845,10 @@ paths: "/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. + description: |- + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/get-reviews-for-run @@ -15632,7 +16882,7 @@ paths: 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)." - 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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/approve-workflow-run @@ -15665,10 +16915,12 @@ paths: "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": get: 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. + description: |- + Lists artifacts for a workflow run. + + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/list-workflow-run-artifacts @@ -15714,10 +16966,11 @@ paths: 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. + Gets a specific workflow run attempt. + + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/get-workflow-run-attempt @@ -15748,12 +17001,13 @@ paths: "/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). + description: |- + Lists jobs for a specific workflow run attempt. You can use parameters to narrow the list of results. For more information + about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters). + + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/list-jobs-for-workflow-run-attempt @@ -15802,9 +17056,11 @@ paths: summary: Download workflow run attempt logs 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 - the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - GitHub Apps must have the `actions:read` permission to use this endpoint. + 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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/download-workflow-run-attempt-logs @@ -15835,9 +17091,7 @@ paths: description: |- Cancels a workflow run using its `id`. - You must authenticate using an access token with the `repo` scope to 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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/cancel-workflow-run @@ -15874,8 +17128,7 @@ paths: **Note:** GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/actions/workflow-runs#review-pending-deployments-for-a-workflow-run). - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have read and write permission for **Deployments** to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/review-custom-gates-for-run @@ -15909,14 +17162,51 @@ paths: previews: [] category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel": + post: + summary: Force cancel a workflow run + description: |- + Cancels a workflow run and bypasses conditions that would otherwise cause a workflow execution to continue, such as an `always()` condition on a job. + You should only use this endpoint to cancel a workflow run when the workflow run is not responding to [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel`](/rest/actions/workflow-runs#cancel-a-workflow-run). + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/force-cancel-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/workflow-runs#force-cancel-a-workflow-run + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/run-id" + responses: + '202': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/empty-object" + examples: + default: + value: + '409': + "$ref": "#/components/responses/conflict" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: workflow-runs "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": 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). + description: |- + Lists jobs for a workflow run. You can use parameters to narrow the list of results. For more information + about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters). + + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/list-jobs-for-workflow-run @@ -15974,9 +17264,11 @@ paths: summary: Download workflow run logs 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. + `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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/download-workflow-run-logs @@ -16002,9 +17294,10 @@ paths: 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. + description: |- + Deletes all logs for a workflow run. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-workflow-run-logs @@ -16033,7 +17326,9 @@ paths: 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. + Anyone with read access to the repository can use this endpoint. + + If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-pending-deployments-for-run @@ -16066,7 +17361,9 @@ paths: description: |- 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. + Required reviewers with read access to the repository contents and deployments can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/review-pending-deployments-for-run @@ -16136,9 +17433,10 @@ paths: "/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. + description: |- + Re-runs your workflow run using its `id`. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/re-run-workflow @@ -16182,9 +17480,10 @@ paths: "/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. + description: |- + Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/re-run-workflow-failed-jobs @@ -16231,7 +17530,9 @@ paths: 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)". - Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/get-workflow-run-usage @@ -16264,9 +17565,9 @@ paths: 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. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/list-repo-secrets @@ -16314,9 +17615,8 @@ paths: 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. - Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-repo-public-key @@ -16347,9 +17647,9 @@ paths: 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. - Authenticated users must have collaborator access to a repository to create, update, or read secrets. + The authenticated user must have collaborator access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-repo-secret @@ -16381,9 +17681,9 @@ paths: Creates or updates a repository secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." - 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. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/create-or-update-repo-secret @@ -16438,9 +17738,9 @@ paths: 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. Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-repo-secret @@ -16464,10 +17764,10 @@ paths: summary: List repository variables description: |- Lists all repository variables. - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. + Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/list-repo-variables @@ -16512,10 +17812,9 @@ paths: description: |- Creates a repository variable that you can reference in a GitHub Actions workflow. - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/create-repo-variable @@ -16567,10 +17866,9 @@ paths: description: |- Gets a specific variable in a repository. - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read variables. + The authenticated user must have collaborator access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/get-repo-variable @@ -16601,10 +17899,9 @@ paths: description: |- Updates a repository variable that you can reference in a GitHub Actions workflow. - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/update-repo-variable @@ -16646,10 +17943,9 @@ paths: description: |- Deletes a repository variable using the variable name. - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `actions_variables:write` repository permission to use this endpoint. Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/delete-repo-variable @@ -16671,10 +17967,12 @@ paths: "/repos/{owner}/{repo}/actions/workflows": 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. + description: |- + Lists the workflows in a repository. + + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/list-repo-workflows @@ -16717,11 +18015,13 @@ paths: "/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. + 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. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/get-workflow @@ -16753,7 +18053,7 @@ paths: 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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/disable-workflow @@ -16780,7 +18080,7 @@ paths: 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)." + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. operationId: actions/create-workflow-dispatch tags: - actions @@ -16833,7 +18133,7 @@ paths: 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. + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - actions operationId: actions/enable-workflow @@ -16856,9 +18156,11 @@ paths: 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/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/rest/guides/getting-started-with-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. + Anyone with read access to the repository can use this endpoint + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/list-workflow-runs @@ -16913,7 +18215,11 @@ paths: 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)". - 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 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. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - actions operationId: actions/get-workflow-usage @@ -16946,7 +18252,7 @@ paths: Lists a detailed history of changes to a repository, such as pushes, merges, force pushes, and branch changes, and associates these changes with commits and users. For more information about viewing repository activity, - see "[Viewing repository activity](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/viewing-repository-activity)." + see "[Viewing activity and data for your repository](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository)." tags: - repos operationId: repos/list-activities @@ -17107,9 +18413,9 @@ paths: subcategory: assignees "/repos/{owner}/{repo}/autolinks": get: - summary: List all autolinks of a repository + summary: Get all autolinks of a repository description: |- - This returns a list of autolinks configured for the given repository. + Gets all autolinks that are configured for a repository. Information about autolinks are only available to repository administrators. tags: @@ -17117,11 +18423,10 @@ paths: operationId: repos/list-autolinks externalDocs: description: API method documentation - url: https://docs.github.com/rest/repos/autolinks#list-all-autolinks-of-a-repository + url: https://docs.github.com/rest/repos/autolinks#get-all-autolinks-of-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -18590,7 +19895,7 @@ paths: 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 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. + Lists the GitHub Apps that have push access to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. tags: - repos operationId: repos/get-apps-with-access-to-protected-branch @@ -18625,7 +19930,7 @@ paths: 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. + Grants the specified apps push access for this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. tags: - repos operationId: repos/add-app-access-restrictions @@ -18689,7 +19994,7 @@ paths: 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. + 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 GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. tags: - repos operationId: repos/set-app-access-restrictions @@ -18753,7 +20058,7 @@ paths: 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. + Removes the ability of an app to push to this branch. Only GitHub Apps that are installed on the repository and that have been granted write access to the repository contents can be added as authorized actors on a protected branch. tags: - repos operationId: repos/remove-app-access-restrictions @@ -19282,17 +20587,9 @@ paths: **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: + The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. - * 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. + In order to rename the default branch, fine-grained access tokens also need the `administration:write` repository permission. tags: - repos operationId: repos/rename-branch @@ -19344,11 +20641,13 @@ paths: 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. - 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. + To create a check run, you must use a GitHub App. OAuth apps and authenticated users are not able to create a check suite. 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. + + **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. tags: - checks operationId: checks/create @@ -19381,11 +20680,15 @@ paths: description: A reference for the run on the integrator's system. status: type: string - description: The current status. + description: The current status of the check run. Only GitHub Actions + can set a status of `waiting`, `pending`, or `requested`. enum: - queued - in_progress - completed + - waiting + - requested + - pending default: queued started_at: type: string @@ -19646,9 +20949,11 @@ paths: get: summary: Get a check run description: |- + Gets a single check run using its `id`. + **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth apps and authenticated users must have the `repo` scope to get check runs in a private repository. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. tags: - checks operationId: checks/get @@ -19677,9 +20982,11 @@ paths: patch: 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. - Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + **Note:** The endpoints to manage checks only look 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. + + OAuth apps and personal access tokens (classic) cannot use this endpoint. tags: - checks operationId: checks/update @@ -19714,11 +21021,15 @@ paths: format: `YYYY-MM-DDTHH:MM:SSZ`.' status: type: string - description: The current status. + description: The current status of the check run. Only GitHub Actions + can set a status of `waiting`, `pending`, or `requested`. enum: - queued - in_progress - completed + - waiting + - requested + - pending conclusion: type: string description: "**Required if you provide `completed_at` or a `status` @@ -19938,11 +21249,10 @@ paths: "/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. + description: |- + Lists annotations for a check run using the annotation `id`. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. tags: - checks operationId: checks/list-annotations @@ -19981,9 +21291,9 @@ paths: 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. - For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". + + OAuth apps and personal access tokens (classic) cannot use this endpoint. tags: - checks operationId: checks/rerequest-run @@ -20028,9 +21338,11 @@ paths: post: summary: Create a check suite description: |- + Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/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/checks/suites#update-repository-preferences-for-check-suites)". + **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/checks/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/checks/suites#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + OAuth apps and personal access tokens (classic) cannot use this endpoint. tags: - checks operationId: checks/create-suite @@ -20083,12 +21395,9 @@ paths: "/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/checks/suites#create-a-check-suite). - You must have admin permissions in the repository to set 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/checks/suites#create-a-check-suite). + You must have admin permissions in the repository to set preferences for check suites. tags: - checks operationId: checks/set-suites-preferences @@ -20149,9 +21458,11 @@ paths: get: summary: Get a check suite description: |- + Gets a single check suite using its `id`. + **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth apps and authenticated users must have the `repo` scope to get check suites in a private repository. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. tags: - checks operationId: checks/get-suite @@ -20181,9 +21492,11 @@ paths: get: summary: List check runs in 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. + Lists check runs for a check suite using its `id`. - 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. + **Note:** The endpoints to manage checks only look 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. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. tags: - checks operationId: checks/list-for-suite @@ -20243,7 +21556,7 @@ paths: 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. - To rerequest a check suite, your GitHub App must have the `checks:write` permission on a private repository or pull access to a public repository. + OAuth apps and personal access tokens (classic) cannot use this endpoint. tags: - checks operationId: checks/rerequest-suite @@ -20275,14 +21588,11 @@ paths: 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). + + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. tags: - code-scanning operationId: code-scanning/list-alerts-for-repo @@ -20350,11 +21660,10 @@ paths: "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": get: summary: Get a code scanning alert - 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. + description: |- + Gets a single code scanning alert. + + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. tags: - code-scanning operationId: code-scanning/get-alert @@ -20390,11 +21699,9 @@ paths: subcategory: code-scanning 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. + description: |- + Updates the status of a single code scanning alert. + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. operationId: code-scanning/update-alert tags: - code-scanning @@ -20453,9 +21760,8 @@ paths: summary: List instances of a code scanning alert 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. + + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. tags: - code-scanning operationId: code-scanning/list-alert-instances @@ -20507,12 +21813,10 @@ paths: 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. + + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. operationId: code-scanning/list-recent-analyses tags: - code-scanning @@ -20578,9 +21882,6 @@ paths: summary: Get a code scanning analysis for a repository 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, @@ -20592,10 +21893,11 @@ paths: 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). + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/sarif+json`**: Instead of returning a summary of the analysis, this endpoint returns a subset of the analysis data that was uploaded. The data 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). It also returns additional data such as the `github/alertNumber` and `github/alertUrl` properties. + + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. operationId: code-scanning/get-analysis tags: - code-scanning @@ -20643,10 +21945,7 @@ paths: delete: summary: Delete a code scanning analysis from a repository 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. + Deletes a specified code scanning analysis from a repository. You can delete one analysis at a time. To delete a series of analyses, start with the most recent analysis and work backwards. @@ -20708,6 +22007,8 @@ paths: * 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. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. operationId: code-scanning/delete-analysis tags: - code-scanning @@ -20764,9 +22065,7 @@ paths: description: |- Lists the CodeQL databases that are available in a repository. - For private repositories, you must use an access token with the `security_events` scope. - For public repositories, you can use tokens with the `security_events` or `public_repo` scope. - GitHub Apps must have the `contents` read permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. tags: - code-scanning operationId: code-scanning/list-codeql-databases @@ -20812,9 +22111,7 @@ paths: your HTTP client is configured to follow redirects or use the `Location` header to make a second request to get the redirect URL. - For private repositories, you must use an access token with the `security_events` scope. - For public repositories, you can use tokens with the `security_events` or `public_repo` scope. - GitHub Apps must have the `contents` read permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. tags: - code-scanning operationId: code-scanning/get-codeql-database @@ -20859,8 +22156,8 @@ paths: summary: Get a code scanning default setup configuration description: |- Gets a code scanning default setup configuration. - You must use an access token with the `repo` scope to use this endpoint with private repos or the `public_repo` - scope for public repos. GitHub Apps must have the `repo` write permission to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. tags: - code-scanning operationId: code-scanning/get-default-setup @@ -20895,8 +22192,8 @@ paths: summary: Update a code scanning default setup configuration description: |- Updates a code scanning default setup configuration. - You must use an access token with the `repo` scope to use this endpoint with private repos or the `public_repo` - scope for public repos. GitHub Apps must have the `repo` write permission to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. tags: - code-scanning operationId: code-scanning/update-default-setup @@ -20935,7 +22232,7 @@ paths: default: "$ref": "#/components/examples/code-scanning-default-setup-update-response" '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" + "$ref": "#/components/responses/code_scanning_forbidden_write" '404': "$ref": "#/components/responses/not_found" '409': @@ -20951,12 +22248,8 @@ paths: 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. For troubleshooting information, see \"[Troubleshooting SARIF - uploads](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif).\"\n\nThere + to make the results available in a repository. For troubleshooting information, + see \"[Troubleshooting SARIF uploads](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif).\"\n\nThere are two places where you can upload code scanning results.\n - 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, @@ -20966,7 +22259,7 @@ paths: 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).\"\n\nYou 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:\n\n```\ngzip - -c analysis-data.sarif | base64 -w0\n```\n
\nSARIF upload supports a maximum + -c analysis-data.sarif | base64 -w0\n```\n\nSARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping @@ -20989,7 +22282,10 @@ paths: \ | 20 | Only 10 tags will be included. |\n\n\nThe `202 Accepted` response includes an `id` value.\nYou can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint.\nFor - more information, see \"[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload).\"" + more information, see \"[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload).\"\n\nOAuth + app tokens and personal access tokens (classic) need the `security_events` + scope to use this endpoint with private or public repositories, or the `public_repo` + scope to use this endpoint with only public repositories." operationId: code-scanning/upload-sarif tags: - code-scanning @@ -21009,7 +22305,7 @@ paths: commit_sha: "$ref": "#/components/schemas/code-scanning-analysis-commit-sha" ref: - "$ref": "#/components/schemas/code-scanning-ref" + "$ref": "#/components/schemas/code-scanning-ref-full" sarif: "$ref": "#/components/schemas/code-scanning-analysis-sarif-file" checkout_uri: @@ -21037,6 +22333,7 @@ paths: Whether the SARIF file will be validated according to the code scanning specifications. This parameter is intended to help integrators ensure that the uploaded SARIF files are correctly rendered by code scanning. type: boolean + additionalProperties: false required: - commit_sha - ref @@ -21075,14 +22372,9 @@ paths: "/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/code-scanning/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. + 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/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository)." + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. operationId: code-scanning/get-sarif tags: - code-scanning @@ -21169,9 +22461,7 @@ paths: description: |- 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. - - GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/list-in-repository-for-authenticated-user @@ -21221,9 +22511,7 @@ paths: description: |- 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. - - GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/create-with-repo-for-authenticated-user @@ -21333,9 +22621,7 @@ paths: Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files specify launchpoint configurations for codespaces created within the repository. - You must authenticate using an access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/list-devcontainers-in-repository-for-authenticated-user @@ -21397,9 +22683,7 @@ paths: description: |- List the machine types available for a given repository based on its configuration. - You must authenticate using an access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/repo-machines-for-authenticated-user @@ -21469,9 +22753,7 @@ paths: description: |- Gets the default attributes for codespaces created by the user with the repository. - You must authenticate using an access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/pre-flight-with-repo-for-authenticated-user @@ -21531,13 +22813,75 @@ paths: enabledForGitHubApps: true category: codespaces subcategory: codespaces + "/repos/{owner}/{repo}/codespaces/permissions_check": + get: + summary: Check if permissions defined by a devcontainer have been accepted by + the authenticated user + description: |- + Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user. + + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + tags: + - codespaces + operationId: codespaces/check-permissions-for-devcontainer + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/codespaces/codespaces#check-if-permissions-defined-by-a-devcontainer-have-been-accepted-by-the-authenticated-user + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: ref + description: The git reference that points to the location of the devcontainer + configuration to use for the permission check. The value of `ref` will typically + be a branch name (`heads/BRANCH_NAME`). For more information, see "[Git + References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" + in the Git documentation. + in: query + required: true + schema: + type: string + example: master + - name: devcontainer_path + description: Path to the devcontainer.json configuration to use for the permission + check. + in: query + required: true + schema: + type: string + example: ".devcontainer/example/devcontainer.json" + responses: + '200': + description: Response when the permission check is successful + content: + application/json: + schema: + "$ref": "#/components/schemas/codespaces-permissions-check-for-devcontainer" + examples: + default: + "$ref": "#/components/examples/codespaces-permissions-check-for-devcontainer" + '401': + "$ref": "#/components/responses/requires_authentication" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: codespaces + subcategory: codespaces "/repos/{owner}/{repo}/codespaces/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 write access to the `codespaces_secrets` - repository permission to use this endpoint. + description: |- + Lists all development environment secrets available in a repository without revealing their encrypted + values. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - codespaces operationId: codespaces/list-repo-secrets @@ -21580,12 +22924,13 @@ paths: "/repos/{owner}/{repo}/codespaces/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 - write access to the `codespaces_secrets` repository permission to use this - endpoint. + 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, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - codespaces operationId: codespaces/get-repo-public-key @@ -21613,10 +22958,10 @@ paths: "/repos/{owner}/{repo}/codespaces/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 write access to the `codespaces_secrets` - repository permission to use this endpoint. + description: |- + Gets a single repository development environment secret without revealing its encrypted value. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - codespaces operationId: codespaces/get-repo-secret @@ -21645,12 +22990,10 @@ paths: put: summary: Create or update a repository secret description: |- - Creates or updates a repository secret with an encrypted value. Encrypt your secret using + Creates or updates a repository development environment secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." - You must authenticate using an access - token with the `repo` scope to use this endpoint. GitHub Apps must have write access to the `codespaces_secrets` - repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - codespaces operationId: codespaces/create-or-update-repo-secret @@ -21702,10 +23045,10 @@ paths: subcategory: repository-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 write access to the `codespaces_secrets` repository - permission to use this endpoint. + description: |- + Deletes a development environment secret in a repository using the secret name. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - codespaces operationId: codespaces/delete-repo-secret @@ -21733,9 +23076,9 @@ paths: 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. + The authenticated user must have push access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. tags: - repos operationId: repos/list-collaborators @@ -21805,9 +23148,9 @@ paths: 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. + The authenticated user must have push access to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. tags: - repos operationId: repos/check-collaborator @@ -21831,7 +23174,7 @@ paths: put: summary: Add a repository collaborator 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. + 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. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." 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/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." @@ -21841,7 +23184,7 @@ paths: 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." 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 [API](https://docs.github.com/rest/collaborators/invitations). @@ -21996,9 +23339,14 @@ paths: get: summary: List commit comments for a repository description: |- - Commit Comments use [these custom media types](https://docs.github.com/rest/overview/media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + Lists the commit comments for a specified repository. Comments are ordered by ascending ID. - Comments are ordered by ascending ID. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - repos operationId: repos/list-commit-comments-for-repo @@ -22033,7 +23381,15 @@ paths: "/repos/{owner}/{repo}/comments/{comment_id}": get: summary: Get a commit comment - description: '' + description: |- + Gets a specified commit comment. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - repos operationId: repos/get-commit-comment @@ -22063,7 +23419,15 @@ paths: subcategory: comments patch: summary: Update a commit comment - description: '' + description: |- + Updates the contents of a specified commit comment. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - repos operationId: repos/update-commit-comment @@ -22413,6 +23777,8 @@ paths: "$ref": "#/components/examples/branch-short-items" '422': "$ref": "#/components/responses/validation_failed" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -22421,8 +23787,15 @@ paths: "/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. + description: |- + Lists the comments for a specified commit. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - repos operationId: repos/list-comments-for-commit @@ -22460,7 +23833,14 @@ paths: description: |- Create a comment for a commit using its `:commit_sha`. - 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/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - repos operationId: repos/create-commit-comment @@ -22559,6 +23939,8 @@ paths: headers: Link: "$ref": "#/components/headers/link" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -22570,11 +23952,13 @@ paths: 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. + **Note:** If there are more than 300 files in the commit diff and the default JSON media type is requested, 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. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types. - 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. + - **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code. + - **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code. + - **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. 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** @@ -22634,6 +24018,8 @@ paths: "$ref": "#/components/responses/internal_error" '503': "$ref": "#/components/responses/service_unavailable" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -22643,9 +24029,13 @@ paths: 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. + + **Note:** The endpoints to manage checks only look 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. + If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the [List check suites for a Git reference](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference) endpoint and provide the `check_suite_id` parameter to the [List check runs in a check suite](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite) endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. tags: - checks operationId: checks/list-for-ref @@ -22708,9 +24098,11 @@ paths: 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. - 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:** The endpoints to manage checks only look 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`. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint on a private repository. tags: - checks operationId: checks/list-suites-for-ref @@ -22852,10 +24244,8 @@ paths: 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`. + the recommended community health files are present. For more information, see + "[About community profiles for public repositories](https://docs.github.com/communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories)." `content_reports_enabled` is only returned for organization-owned repositories. tags: @@ -22886,9 +24276,14 @@ paths: get: summary: Compare two commits description: |- - Compares two commits against one another. You can compare branches in the same repository, or you can compare branches that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)." + + This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. - This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order. 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. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.diff`**: Returns the diff of the commit. + - **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. The API response includes details about the files that were changed between the two commits. This includes the status of the change (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. @@ -22976,44 +24371,32 @@ paths: "/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/overview/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/overview/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/rest/git/trees#get-a-tree).\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/git/trees#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/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." + description: |- + Gets the contents of a file or directory in a repository. Specify the file path or directory with the `path` parameter. If you omit the `path` parameter, you will receive the contents of the repository's root directory. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw file contents for files and symlinks. + - **`application/vnd.github.html+json`**: Returns the file contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). + - **`application/vnd.github.object+json`**: Returns the contents in a consistent object format regardless of the content type. For example, instead of an array of objects for a directory, the response will be an object with an `entries` attribute containing the array of objects. + + 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 [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 and the symlink's target is a normal file in the repository, then the API responds with the content of the file. Otherwise, the API responds with an object describing the symlink itself. + + If the content is a submodule, the `submodule_git_url` field 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. + + **Notes**: + + - To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/git/trees#get-a-tree). + - 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/git/trees#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. + - 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 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. tags: - repos operationId: repos/get-content @@ -23079,9 +24462,11 @@ paths: put: summary: Create or update file contents description: |- - Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. If you want to modify files in the `.github/workflows` directory, you must authenticate using an access token with the `workflow` scope. + Creates a new file or replaces an existing file in a repository. **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory. tags: - repos operationId: repos/create-or-update-file-contents @@ -23360,10 +24745,9 @@ paths: "/repos/{owner}/{repo}/dependabot/alerts": get: summary: List Dependabot alerts for a repository - description: |- - 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 **Dependabot alerts** read permission to use this endpoint. + description: OAuth app tokens and personal access tokens (classic) need the + `security_events` scope to use this endpoint. If this endpoint is only used + with public repositories, the token can use the `public_repo` scope instead. tags: - dependabot operationId: dependabot/list-alerts-for-repo @@ -23390,7 +24774,8 @@ paths: type: integer default: 1 - name: per_page - description: The number of results per page (max 100). + description: The number of results per page (max 100). For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." deprecated: true in: query schema: @@ -23431,10 +24816,9 @@ paths: "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}": get: summary: Get a Dependabot alert - description: |- - 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 **Dependabot alerts** read permission to use this endpoint. + description: OAuth app tokens and personal access tokens (classic) need the + `security_events` scope to use this endpoint. If this endpoint is only used + with public repositories, the token can use the `public_repo` scope instead. tags: - dependabot operationId: dependabot/get-alert @@ -23470,11 +24854,9 @@ paths: patch: summary: Update a Dependabot alert description: |- - 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 **Dependabot alerts** write permission to use this endpoint. + The authenticated user must have access to security alerts for the repository to use this endpoint. For more information, see "[Granting access to security alerts](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)." - To use this endpoint, you must have access to security alerts for the repository. For more information, see "[Granting access to security alerts](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)." + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. tags: - dependabot operationId: dependabot/update-alert @@ -23553,10 +24935,11 @@ paths: "/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. + description: |- + Lists all secrets available in a repository without revealing their encrypted + values. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - dependabot operationId: dependabot/list-repo-secrets @@ -23599,11 +24982,12 @@ paths: "/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. + 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. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the repository is private. tags: - dependabot operationId: dependabot/get-repo-public-key @@ -23631,10 +25015,10 @@ paths: "/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. + description: |- + Gets a single repository secret without revealing its encrypted value. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - dependabot operationId: dependabot/get-repo-secret @@ -23666,9 +25050,7 @@ paths: Creates or updates a repository secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." - 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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - dependabot operationId: dependabot/create-or-update-repo-secret @@ -23720,10 +25102,10 @@ paths: 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. + description: |- + Deletes a secret in a repository using the secret name. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - dependabot operationId: dependabot/delete-repo-secret @@ -23826,9 +25208,12 @@ paths: "/repos/{owner}/{repo}/dependency-graph/snapshots": post: summary: Create a snapshot of dependencies for a repository - description: Create a new snapshot of a repository's dependencies. You must - authenticate using an access token with the `repo` scope to use this endpoint - for a repository that the requesting user has access to. + description: |- + Create a new snapshot of a repository's dependencies. + + The authenticated user must have access to the repository. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - dependency-graph operationId: dependency-graph/create-repository-snapshot @@ -23980,8 +25365,6 @@ paths: 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 @@ -24002,6 +25385,8 @@ paths: 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`. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. tags: - repos operationId: repos/create-deployment @@ -24153,7 +25538,7 @@ paths: 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. + 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. To set a deployment as inactive, you must: @@ -24161,6 +25546,8 @@ paths: * 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/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/statuses#create-a-deployment-status)." + + OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint. tags: - repos operationId: repos/delete-deployment @@ -24226,7 +25613,7 @@ paths: 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. + OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint. tags: - repos operationId: repos/create-deployment-status @@ -24372,12 +25759,9 @@ paths: 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. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/create-dispatch-event @@ -24419,6 +25803,8 @@ paths: responses: '204': description: Response + '404': + "$ref": "#/components/responses/not_found" '422': "$ref": "#/components/responses/validation_failed" x-github: @@ -24432,7 +25818,9 @@ paths: description: |- 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. + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - repos operationId: repos/get-all-environments @@ -24474,9 +25862,9 @@ paths: 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. + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - repos operationId: repos/get-environment @@ -24511,7 +25899,7 @@ paths: **Note:** To create or update secrets for an environment, see "[GitHub Actions secrets](/rest/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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/create-or-update-environment @@ -24532,6 +25920,8 @@ paths: properties: wait_timer: "$ref": "#/components/schemas/wait-timer" + prevent_self_review: + "$ref": "#/components/schemas/prevent-self-review" reviewers: type: array nullable: true @@ -24557,6 +25947,7 @@ paths: default: value: wait_timer: 30 + prevent_self_review: false reviewers: - type: User id: 1 @@ -24590,8 +25981,8 @@ paths: subcategory: environments delete: summary: Delete an environment - description: You must authenticate using an access token with the repo scope - to use this endpoint. + description: OAuth app tokens and personal access tokens (classic) need the + `repo` scope to use this endpoint. tags: - repos operationId: repos/delete-an-environment @@ -24616,7 +26007,9 @@ paths: description: |- 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. + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - repos operationId: repos/list-deployment-branch-policies @@ -24660,9 +26053,9 @@ paths: post: summary: Create a deployment branch policy description: |- - Creates a deployment branch policy for an environment. + Creates a deployment branch or tag 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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/create-deployment-branch-policy @@ -24678,7 +26071,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/deployment-branch-policy-name-pattern" + "$ref": "#/components/schemas/deployment-branch-policy-name-pattern-with-type" examples: example-wildcard: summary: Example of a wildcard name pattern @@ -24688,6 +26081,12 @@ paths: summary: Example of a single branch name pattern value: name: main + type: branch + example-single-tag: + summary: Example of a single tag name pattern + value: + name: v1 + type: tag responses: '200': description: Response @@ -24700,6 +26099,8 @@ paths: "$ref": "#/components/examples/deployment-branch-policy-wildcard" example-single-branch: "$ref": "#/components/examples/deployment-branch-policy-single-branch" + example-single-tag: + "$ref": "#/components/examples/deployment-branch-policy-single-tag" '404': description: Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false @@ -24714,9 +26115,11 @@ paths: get: summary: Get a deployment branch policy description: |- - Gets a deployment branch policy for an environment. + Gets a deployment branch or tag 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. + Anyone with read access to the repository can use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - repos operationId: repos/get-deployment-branch-policy @@ -24746,9 +26149,9 @@ paths: put: summary: Update a deployment branch policy description: |- - Updates a deployment branch policy for an environment. + Updates a deployment branch or tag 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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/update-deployment-branch-policy @@ -24788,9 +26191,9 @@ paths: delete: summary: Delete a deployment branch policy description: |- - Deletes a deployment branch policy for an environment. + Deletes a deployment branch or tag 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. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/delete-deployment-branch-policy @@ -24814,9 +26217,11 @@ paths: get: summary: Get all deployment protection rules for an environment description: |- - Gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + Gets all custom deployment protection rules that are enabled for an environment. Anyone with read access to the repository can use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app). + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - repos operationId: repos/get-all-deployment-protection-rules @@ -24877,9 +26282,11 @@ paths: description: |- Enable a custom deployment protection rule for an environment. - You must authenticate using an access token with the `repo` scope to use this endpoint. Enabling a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. + The authenticated user must have admin or owner permissions to the repository to use this endpoint. For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app). + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/create-deployment-protection-rule @@ -24924,11 +26331,13 @@ paths: get: summary: List custom deployment rule integrations available for an environment description: |- - Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. + Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. - For more information about environments, see "[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." For more information about the app that is providing this custom deployment rule, see "[GET an app](https://docs.github.com/rest/apps/apps#get-an-app)". + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - repos operationId: repos/list-custom-deployment-rule-integrations @@ -24971,9 +26380,11 @@ paths: get: summary: Get a custom deployment protection rule description: |- - Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. If the repository is private and you want to use a personal access token (classic), you must use an access token with the `repo` scope. GitHub Apps and fine-grained personal access tokens must have the `actions:read` permission to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)." + Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." For more information about the app that is providing this custom deployment rule, see [`GET /apps/{app_slug}`](https://docs.github.com/rest/apps/apps#get-an-app). + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. tags: - repos operationId: repos/get-custom-deployment-protection-rule @@ -25005,7 +26416,9 @@ paths: description: |- Disables a custom deployment protection rule for an environment. - You must authenticate using an access token with the `repo` scope to use this endpoint. Removing a custom protection rule requires admin or owner permissions to the repository. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Get an app](https://docs.github.com/rest/apps/apps#get-an-app)". + The authenticated user must have admin or owner permissions to the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/disable-deployment-protection-rule @@ -25025,6 +26438,425 @@ paths: enabledForGitHubApps: true category: deployments subcategory: protection-rules + "/repos/{owner}/{repo}/environments/{environment_name}/secrets": + get: + summary: List environment secrets + description: |- + Lists all secrets available in an environment without revealing their + encrypted values. + + Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/list-environment-secrets + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/secrets#list-environment-secrets + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + - "$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" + examples: + default: + "$ref": "#/components/examples/actions-secret-paginated" + headers: + Link: + "$ref": "#/components/headers/link" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: secrets + "/repos/{owner}/{repo}/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, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/get-environment-public-key + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/secrets#get-an-environment-public-key + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + responses: + '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 + category: actions + subcategory: secrets + "/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}": + get: + summary: Get an environment secret + description: |- + Gets a single environment secret without revealing its encrypted value. + + Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/get-environment-secret + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/secrets#get-an-environment-secret + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/secret-name" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-secret" + examples: + default: + "$ref": "#/components/examples/actions-secret" + 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). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." + + Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/create-or-update-environment-secret + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/secrets#create-or-update-an-environment-secret + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + - "$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 environment public + key](https://docs.github.com/rest/actions/secrets#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: + - encrypted_value + - key_id + 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: actions + subcategory: secrets + delete: + summary: Delete an environment secret + description: |- + Deletes a secret in an environment using the secret name. + + Authenticated users must have collaborator access to a repository to create, update, or read secrets. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/delete-environment-secret + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/secrets#delete-an-environment-secret + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$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 + "/repos/{owner}/{repo}/environments/{environment_name}/variables": + get: + summary: List environment variables + description: |- + Lists all environment variables. + + Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/list-environment-variables + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/variables#list-environment-variables + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/variables-per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - variables + properties: + total_count: + type: integer + variables: + type: array + items: + "$ref": "#/components/schemas/actions-variable" + examples: + default: + "$ref": "#/components/examples/actions-variables-paginated" + headers: + Link: + "$ref": "#/components/headers/link" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: variables + post: + summary: Create an environment variable + description: |- + Create an environment variable that you can reference in a GitHub Actions workflow. + + Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/create-environment-variable + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/variables#create-an-environment-variable + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the variable. + value: + type: string + description: The value of the variable. + required: + - name + - value + examples: + default: + value: + name: USERNAME + value: octocat + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/empty-object" + examples: + default: + value: + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: variables + "/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}": + get: + summary: Get an environment variable + description: |- + Gets a specific variable in an environment. + + Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/get-environment-variable + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/variables#get-an-environment-variable + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/variable-name" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-variable" + examples: + default: + "$ref": "#/components/examples/actions-variable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: variables + patch: + summary: Update an environment variable + description: |- + Updates an environment variable that you can reference in a GitHub Actions workflow. + + Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/update-environment-variable + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/variables#update-an-environment-variable + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/variable-name" + - "$ref": "#/components/parameters/environment-name" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the variable. + value: + type: string + description: The value of the variable. + examples: + default: + value: + name: USERNAME + value: octocat + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: variables + delete: + summary: Delete an environment variable + description: |- + Deletes an environment variable using the variable name. + + Authenticated users must have collaborator access to a repository to create, update, or read variables. + + OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + tags: + - actions + operationId: actions/delete-environment-variable + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/variables#delete-an-environment-variable + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/variable-name" + - "$ref": "#/components/parameters/environment-name" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: variables "/repos/{owner}/{repo}/events": get: summary: List repository events @@ -25242,7 +27074,12 @@ paths: description: |- The `content` in the response will always be Base64 encoded. - _Note_: This API supports blobs up to 100 megabytes in size. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw blob data. + - **`application/vnd.github+json`**: Returns a JSON representation of the blob with `content` as a base64 encoded string. This is the default if no media type is specified. + + **Note** This endpoint supports blobs up to 100 megabytes in size. tags: - git operationId: git/get-blob @@ -25273,6 +27110,8 @@ paths: "$ref": "#/components/responses/validation_failed" '403': "$ref": "#/components/responses/forbidden" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25442,6 +27281,8 @@ paths: "$ref": "#/components/responses/validation_failed" '404': "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25505,6 +27346,8 @@ paths: "$ref": "#/components/examples/git-commit-2" '404': "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25530,7 +27373,7 @@ paths: parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/commit-ref" + - "$ref": "#/components/parameters/git-ref-only" responses: '200': description: Response @@ -25546,6 +27389,8 @@ paths: headers: Link: "$ref": "#/components/headers/link" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25567,7 +27412,7 @@ paths: parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/commit-ref" + - "$ref": "#/components/parameters/git-ref-only" responses: '200': description: Response @@ -25580,6 +27425,8 @@ paths: "$ref": "#/components/examples/git-ref" '404': "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25640,6 +27487,8 @@ paths: type: string '422': "$ref": "#/components/responses/validation_failed" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25648,7 +27497,9 @@ paths: "/repos/{owner}/{repo}/git/refs/{ref}": patch: summary: Update a reference - description: '' + description: Updates the provided reference to point to a new SHA. For more + information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" + in the Git documentation. tags: - git operationId: git/update-ref @@ -25658,17 +27509,7 @@ paths: parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - description: The name of the reference to update (for example, `heads/featureA`). - Can be a branch name (`heads/BRANCH_NAME`) or tag name (`tags/TAG_NAME`). - For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" - in the Git documentation. - in: path - required: true - example: heads/featureA - schema: - type: string - x-multi-segment: true + - "$ref": "#/components/parameters/git-ref-only" requestBody: required: true content: @@ -25704,6 +27545,8 @@ paths: "$ref": "#/components/examples/git-ref" '422': "$ref": "#/components/responses/validation_failed" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25711,7 +27554,7 @@ paths: subcategory: refs delete: summary: Delete a reference - description: '' + description: Deletes the provided reference. tags: - git operationId: git/delete-ref @@ -25721,12 +27564,14 @@ paths: parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/commit-ref" + - "$ref": "#/components/parameters/git-ref-only" responses: '204': description: Response '422': "$ref": "#/components/responses/validation_failed" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25853,6 +27698,8 @@ paths: type: string '422': "$ref": "#/components/responses/validation_failed" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25916,6 +27763,8 @@ paths: "$ref": "#/components/examples/git-tag" '404': "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -26027,6 +27876,8 @@ paths: "$ref": "#/components/responses/not_found" '403': "$ref": "#/components/responses/forbidden" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -26084,6 +27935,8 @@ paths: "$ref": "#/components/responses/validation_failed" '404': "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -26099,7 +27952,7 @@ paths: operationId: repos/list-webhooks externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repos#list-repository-webhooks + url: https://docs.github.com/rest/repos/webhooks#list-repository-webhooks parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26125,8 +27978,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repos + category: repos + subcategory: webhooks post: summary: Create a repository webhook description: |- @@ -26137,7 +27990,7 @@ paths: operationId: repos/create-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repos#create-a-repository-webhook + url: https://docs.github.com/rest/repos/webhooks#create-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26165,12 +28018,6 @@ paths: "$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/webhooks/event-payloads) @@ -26221,8 +28068,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repos + category: repos + subcategory: webhooks "/repos/{owner}/{repo}/hooks/{hook_id}": get: summary: Get a repository webhook @@ -26233,7 +28080,7 @@ paths: operationId: repos/get-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repos#get-a-repository-webhook + url: https://docs.github.com/rest/repos/webhooks#get-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26253,8 +28100,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repos + category: repos + subcategory: webhooks patch: summary: Update a repository webhook description: Updates a webhook configured in a repository. If you previously @@ -26266,7 +28113,7 @@ paths: operationId: repos/update-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repos#update-a-repository-webhook + url: https://docs.github.com/rest/repos/webhooks#update-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26279,25 +28126,7 @@ paths: type: object properties: config: - type: object - description: Key/value pairs to provide settings for this webhook. - 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 + "$ref": "#/components/schemas/webhook-config" events: type: array description: Determines what [events](https://docs.github.com/webhooks/event-payloads) @@ -26346,8 +28175,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repos + category: repos + subcategory: webhooks delete: summary: Delete a repository webhook description: '' @@ -26356,7 +28185,7 @@ paths: operationId: repos/delete-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repos#delete-a-repository-webhook + url: https://docs.github.com/rest/repos/webhooks#delete-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26369,21 +28198,21 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repos + category: repos + subcategory: webhooks "/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/webhooks/repos#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. + OAuth app tokens and personal access tokens (classic) need the `read:repo_hook` or `repo` scope to use this endpoint. tags: - repos operationId: repos/get-webhook-config-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository + url: https://docs.github.com/rest/repos/webhooks#get-a-webhook-configuration-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26401,20 +28230,20 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repo-config + category: repos + subcategory: webhooks patch: summary: Update a webhook configuration for a repository 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/webhooks/repos#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. + OAuth app tokens and personal access tokens (classic) need the `write:repo_hook` or `repo` scope to use this endpoint. tags: - repos operationId: repos/update-webhook-config-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository + url: https://docs.github.com/rest/repos/webhooks#update-a-webhook-configuration-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26454,8 +28283,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repo-config + category: repos + subcategory: webhooks "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": get: summary: List deliveries for a repository webhook @@ -26466,7 +28295,7 @@ paths: operationId: repos/list-webhook-deliveries externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook + url: https://docs.github.com/rest/repos/webhooks#list-deliveries-for-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26497,8 +28326,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repo-deliveries + category: repos + subcategory: webhooks "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": get: summary: Get a delivery for a repository webhook @@ -26508,7 +28337,7 @@ paths: operationId: repos/get-webhook-delivery externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook + url: https://docs.github.com/rest/repos/webhooks#get-a-delivery-for-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26531,8 +28360,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repo-deliveries + category: repos + subcategory: webhooks "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": post: summary: Redeliver a delivery for a repository webhook @@ -26542,7 +28371,7 @@ paths: operationId: repos/redeliver-webhook-delivery externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook + url: https://docs.github.com/rest/repos/webhooks#redeliver-a-delivery-for-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26558,8 +28387,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repo-deliveries + category: repos + subcategory: webhooks "/repos/{owner}/{repo}/hooks/{hook_id}/pings": post: summary: Ping a repository webhook @@ -26570,7 +28399,7 @@ paths: operationId: repos/ping-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repos#ping-a-repository-webhook + url: https://docs.github.com/rest/repos/webhooks#ping-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26583,8 +28412,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repos + category: repos + subcategory: webhooks "/repos/{owner}/{repo}/hooks/{hook_id}/tests": post: summary: Test the push repository webhook @@ -26597,7 +28426,7 @@ paths: operationId: repos/test-push-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/webhooks/repos#test-the-push-repository-webhook + url: https://docs.github.com/rest/repos/webhooks#test-the-push-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26610,17 +28439,15 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: webhooks - subcategory: repos + category: repos + subcategory: webhooks "/repos/{owner}/{repo}/import": get: summary: Get an import status description: |- View the progress of an import. - **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end - on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update - these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). **Import status** @@ -26682,11 +28509,17 @@ paths: enabledForGitHubApps: true category: migrations subcategory: source-imports + deprecationDate: '2023-10-12' + removalDate: '2024-04-12' + deprecated: true put: summary: Start an import - description: |- - Start a source import to a GitHub repository using GitHub Importer. Importing into a GitHub repository with GitHub Actions enabled is not supported and will return a status `422 Unprocessable Entity` response. - **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + description: | + Start a source import to a GitHub repository using GitHub Importer. + Importing into a GitHub repository with GitHub Actions enabled is not supported and will + return a status `422 Unprocessable Entity` response. + + **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). tags: - migrations operationId: migrations/start-import @@ -26764,6 +28597,9 @@ paths: enabledForGitHubApps: true category: migrations subcategory: source-imports + deprecationDate: '2023-10-12' + removalDate: '2024-04-12' + deprecated: true patch: summary: Update an import description: |- @@ -26774,9 +28610,7 @@ paths: have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. You can select the project to import by providing one of the objects in the `project_choices` array in the update request. - **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end - on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update - these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). tags: - migrations operationId: migrations/update-import @@ -26850,14 +28684,15 @@ paths: enabledForGitHubApps: true category: migrations subcategory: source-imports + deprecationDate: '2023-10-12' + removalDate: '2024-04-12' + deprecated: true delete: summary: Cancel an import description: | Stop an import for a repository. - **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end - on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update - these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). tags: - migrations operationId: migrations/cancel-import @@ -26877,6 +28712,9 @@ paths: enabledForGitHubApps: true category: migrations subcategory: source-imports + deprecationDate: '2023-10-12' + removalDate: '2024-04-12' + deprecated: true "/repos/{owner}/{repo}/import/authors": get: summary: Get commit authors @@ -26885,9 +28723,7 @@ paths: This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information. - **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end - on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update - these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). tags: - migrations operationId: migrations/get-commit-authors @@ -26919,6 +28755,9 @@ paths: enabledForGitHubApps: true category: migrations subcategory: source-imports + deprecationDate: '2023-10-12' + removalDate: '2024-04-12' + deprecated: true "/repos/{owner}/{repo}/import/authors/{author_id}": patch: summary: Map a commit author @@ -26926,9 +28765,7 @@ paths: Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. - **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end - on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update - these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). tags: - migrations operationId: migrations/map-commit-author @@ -26983,15 +28820,16 @@ paths: enabledForGitHubApps: true category: migrations subcategory: source-imports + deprecationDate: '2023-10-12' + removalDate: '2024-04-12' + deprecated: true "/repos/{owner}/{repo}/import/large_files": get: summary: Get large files description: | List files larger than 100MB found during the import - **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end - on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update - these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). tags: - migrations operationId: migrations/get-large-files @@ -27020,6 +28858,9 @@ paths: enabledForGitHubApps: true category: migrations subcategory: source-imports + deprecationDate: '2023-10-12' + removalDate: '2024-04-12' + deprecated: true "/repos/{owner}/{repo}/import/lfs": patch: summary: Update Git LFS preference @@ -27030,9 +28871,7 @@ paths: You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/repositories/working-with-files/managing-large-files). - **Warning:** Support for importing Mercurial, Subversion and Team Foundation Version Control repositories will end - on October 17, 2023. For more details, see [changelog](https://gh.io/github-importer-non-git-eol). In the coming weeks, we will update - these docs to reflect relevant changes to the API and will contact all integrators using the "Source imports" API. + **Warning:** Due to very low levels of usage and available alternatives, this endpoint is deprecated and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the [changelog](https://gh.io/source-imports-api-deprecation). tags: - migrations operationId: migrations/set-lfs-preference @@ -27082,6 +28921,9 @@ paths: enabledForGitHubApps: true category: migrations subcategory: source-imports + deprecationDate: '2023-10-12' + removalDate: '2024-04-12' + deprecated: true "/repos/{owner}/{repo}/installation": get: summary: Get a repository installation for the authenticated app @@ -27342,6 +29184,13 @@ paths: 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/pulls/pulls#list-pull-requests)" endpoint. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/list-for-repo @@ -27437,7 +29286,15 @@ paths: 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. + 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. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/create @@ -27556,6 +29413,13 @@ paths: You can use the REST API to list comments on issues and pull requests for a repository. Every pull request is an issue, but not every issue is a pull request. By default, issue comments are ordered by ascending ID. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/list-comments-for-repo @@ -27605,8 +29469,15 @@ paths: "/repos/{owner}/{repo}/issues/comments/{comment_id}": get: summary: Get an issue comment - description: You can use the REST API to get comments on issues and pull requests. - Every pull request is an issue, but not every issue is a pull request. + description: |- + You can use the REST API to get comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/get-comment @@ -27636,8 +29507,15 @@ paths: subcategory: comments patch: summary: Update an issue comment - description: You can use the REST API to update comments on issues and pull - requests. Every pull request is an issue, but not every issue is a pull request. + description: |- + You can use the REST API to update comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/update-comment @@ -27930,7 +29808,7 @@ paths: get: summary: Get an issue 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 + The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api#follow-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 @@ -27941,6 +29819,13 @@ paths: 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/pulls/pulls#list-pull-requests)" endpoint. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/get @@ -27976,7 +29861,15 @@ paths: subcategory: issues patch: summary: Update an issue - description: Issue owners and users with push access can edit an issue. + description: |- + Issue owners and users with push access can edit an issue. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/update @@ -28244,6 +30137,13 @@ paths: You can use the REST API to list comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request. Issue comments are ordered by ascending ID. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/list-comments @@ -28283,15 +30183,20 @@ paths: subcategory: comments post: summary: Create an issue comment - description: |2- - + description: |- You can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request. This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. - See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" - and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" - for details. + For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/create-comment @@ -28684,7 +30589,7 @@ paths: description: |- 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." tags: - issues operationId: issues/lock @@ -29360,7 +31265,10 @@ paths: 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/repos/contents#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. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw contents of the license. + - **`application/vnd.github.html+json`**: Returns the license contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). tags: - licenses operationId: licenses/get-for-repo @@ -29370,6 +31278,7 @@ paths: parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/git-ref" responses: '200': description: Response @@ -29380,6 +31289,8 @@ paths: examples: default: "$ref": "#/components/examples/license-content" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -29895,7 +31806,7 @@ paths: description: |- Gets information about a GitHub Pages site. - A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/get-pages @@ -29927,7 +31838,9 @@ paths: description: |- Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." - To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administration:write` and `pages:write` permissions. + The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/create-pages-site @@ -30009,7 +31922,9 @@ paths: description: |- Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). - To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administration:write` and `pages:write` permissions. + The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/update-information-about-pages-site @@ -30110,7 +32025,9 @@ paths: description: |- Deletes a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). - To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administration:write` and `pages:write` permissions. + The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/delete-pages-site @@ -30140,7 +32057,7 @@ paths: description: |- Lists builts of a GitHub Pages site. - A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/list-pages-builds @@ -30208,7 +32125,7 @@ paths: description: |- Gets information about the single most recent build of a GitHub Pages site. - A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/get-latest-pages-build @@ -30239,7 +32156,7 @@ paths: description: |- Gets information about a GitHub Pages build. - A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/get-pages-build @@ -30269,13 +32186,13 @@ paths: enabledForGitHubApps: true category: pages subcategory: pages - "/repos/{owner}/{repo}/pages/deployment": + "/repos/{owner}/{repo}/pages/deployments": post: summary: Create a GitHub Pages deployment description: |- Create a GitHub Pages deployment for a repository. - Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint. + The authenticated user must have write permission to the repository. tags: - repos operationId: repos/create-pages-deployment @@ -30293,10 +32210,16 @@ paths: type: object description: The object used to create GitHub Pages deployment properties: + artifact_id: + type: number + description: The ID of an artifact that contains the .zip or .tar + of static assets to deploy. The artifact belongs to the repository. + Either `artifact_id` or `artifact_url` are required. artifact_url: type: string description: The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. + Either `artifact_id` or `artifact_url` are required. environment: type: string description: The target environment for this GitHub Pages deployment. @@ -30311,7 +32234,6 @@ paths: description: The OIDC token issued by GitHub Actions certifying the origin of the deployment. required: - - artifact_url - pages_build_version - oidc_token examples: @@ -30343,6 +32265,67 @@ paths: enabledForGitHubApps: true category: pages subcategory: pages + "/repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}": + get: + summary: Get the status of a GitHub Pages deployment + description: |- + Gets the current status of a GitHub Pages deployment. + + The authenticated user must have read permission for the GitHub Pages site. + tags: + - repos + operationId: repos/get-pages-deployment + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pages/pages#get-the-status-of-a-github-pages-deployment + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pages-deployment-id" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/pages-deployment-status" + examples: + default: + "$ref": "#/components/examples/pages-deployment-status" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pages + subcategory: pages + "/repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel": + post: + summary: Cancel a GitHub Pages deployment + description: |- + Cancels a GitHub Pages deployment. + + The authenticated user must have write permissions for the GitHub Pages site. + tags: + - repos + operationId: repos/cancel-pages-deployment + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/pages/pages#cancel-a-github-pages-deployment + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pages-deployment-id" + responses: + '204': + "$ref": "#/components/responses/no_content" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: pages + subcategory: pages "/repos/{owner}/{repo}/pages/health": get: summary: Get a DNS health check for GitHub Pages @@ -30351,7 +32334,9 @@ paths: 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. - To use this endpoint, you must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission. A token with the `repo` scope or Pages write permission is required. GitHub Apps must have the `administrative:write` and `pages:write` permissions. + The authenticated user must be a repository administrator, maintainer, or have the 'manage GitHub Pages settings' permission to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - repos operationId: repos/get-pages-health-check @@ -30392,6 +32377,45 @@ paths: category: pages subcategory: pages "/repos/{owner}/{repo}/private-vulnerability-reporting": + get: + summary: Check if private vulnerability reporting is enabled for a repository + description: Returns a boolean indicating whether or not private vulnerability + reporting is enabled for the repository. For more information, see "[Evaluating + the security settings of a repository](https://docs.github.com/code-security/security-advisories/working-with-repository-security-advisories/evaluating-the-security-settings-of-a-repository)". + tags: + - repos + operationId: repos/check-private-vulnerability-reporting + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/repos/repos#check-if-private-vulnerability-reporting-is-enabled-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '200': + description: Private vulnerability reporting status + content: + application/json: + schema: + type: object + properties: + enabled: + type: boolean + description: Whether or not private vulnerability reporting is + enabled for the repository. + required: + - enabled + examples: + default: + value: + enabled: true + '422': + "$ref": "#/components/responses/bad_request" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: repos put: summary: Enable private vulnerability reporting for a repository description: Enables private vulnerability reporting for a repository. The authenticated @@ -30559,14 +32583,111 @@ paths: enabledForGitHubApps: true category: projects subcategory: projects + "/repos/{owner}/{repo}/properties/values": + get: + summary: Get all custom property values for a repository + description: |- + Gets all custom property values that are set for a repository. + Users with read access to the repository can use this endpoint. + tags: + - repos + operationId: repos/get-custom-properties-values + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/repos/custom-properties#get-all-custom-property-values-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/custom-property-value" + examples: + default: + "$ref": "#/components/examples/custom-property-values" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: custom-properties + patch: + summary: Create or update custom property values for a repository + description: |- + Create new or update existing custom property values for a repository. + Using a value of `null` for a custom property will remove or 'unset' the property value from the repository. + + Repository admins and other users with the repository-level "edit custom property values" fine-grained permission can use this endpoint. + tags: + - repos + operationId: repos/create-or-update-custom-properties-values + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + properties: + type: array + description: A list of custom property names and associated values + to apply to the repositories. + items: + "$ref": "#/components/schemas/custom-property-value" + required: + - properties + examples: + default: + "$ref": "#/components/examples/create-or-update-custom-properties-values" + responses: + '204': + description: No Content when custom property values are successfully created + or updated + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: custom-properties "/repos/{owner}/{repo}/pulls": 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) + description: |- + Lists pull requests in a specified 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. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + - **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. + - **`application/vnd.github.patch`**: For more information, see "[git-format-patch](https://git-scm.com/docs/git-format-patch)" in the Git documentation. tags: - pulls operationId: pulls/list @@ -30659,7 +32780,15 @@ 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. - 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-rate-limits)" for details. + 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. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + - **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. tags: - pulls operationId: pulls/create @@ -30756,8 +32885,16 @@ paths: "/repos/{owner}/{repo}/pulls/comments": 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. + description: |- + Lists review comments for all pull requests in a repository. By default, + review comments are in ascending order by ID. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/list-review-comments-for-repo @@ -30811,7 +32948,15 @@ paths: "/repos/{owner}/{repo}/pulls/comments/{comment_id}": get: summary: Get a review comment for a pull request - description: Provides details for a review comment. + description: |- + Provides details for a specified review comment. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/get-review-comment @@ -30841,7 +32986,15 @@ paths: subcategory: comments patch: summary: Update a review comment for a pull request - description: Enables you to edit a review comment. + description: |- + Edits the content of a specified review comment. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/update-review-comment @@ -30909,7 +33062,7 @@ paths: "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": get: summary: List reactions for a pull request review comment - description: List the reactions to a [pull request review comment](https://docs.github.com/pulls/comments#get-a-review-comment-for-a-pull-request). + description: List the reactions to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). tags: - reactions operationId: reactions/list-for-pull-request-review-comment @@ -31072,6 +33225,14 @@ paths: * 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. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + - **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. tags: - pulls operationId: pulls/get @@ -31097,6 +33258,8 @@ paths: "$ref": "#/components/responses/not_modified" '404': "$ref": "#/components/responses/not_found" + '406': + "$ref": "#/components/responses/unacceptable" '500': "$ref": "#/components/responses/internal_error" '503': @@ -31112,6 +33275,14 @@ paths: 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 supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + - **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. tags: - pulls operationId: pulls/update @@ -31183,9 +33354,7 @@ paths: 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. - - GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/create-with-pr-for-authenticated-user @@ -31286,8 +33455,16 @@ paths: "/repos/{owner}/{repo}/pulls/{pull_number}/comments": 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. + description: |- + Lists all review comments for a specified pull request. By default, review comments + are in ascending order by ID. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/list-review-comments @@ -31333,15 +33510,22 @@ paths: subcategory: comments post: summary: Create a review comment for a pull request - description: |2- + description: |- + Creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#create-an-issue-comment)." - Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#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. + If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request. 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/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." - 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 supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/create-review-comment @@ -31372,10 +33556,15 @@ paths: description: The relative path to the file that necessitates a comment. position: type: integer - description: "**This parameter is deprecated. Use `line` instead**. + 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." + 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.' deprecated: true x-github: deprecationDate: '2022-11-01' @@ -31477,7 +33666,15 @@ paths: 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/github/managing-subscriptions-and-notifications-on-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/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" + and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/create-reply-for-review-comment @@ -31531,10 +33728,18 @@ paths: "/repos/{owner}/{repo}/pulls/{pull_number}/commits": 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/commits/commits#list-commits) + 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/commits/commits#list-commits) endpoint. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + - **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. tags: - pulls operationId: pulls/list-commits @@ -31570,8 +33775,19 @@ paths: "/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." + description: |- + Lists the files in a specified pull request. + + **Note:** Responses include a maximum of 3000 files. The paginated response + returns 30 files per page by default. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + - **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. tags: - pulls operationId: pulls/list-files @@ -31640,7 +33856,7 @@ paths: summary: Merge a pull request description: |- Merges a pull request into the base branch. - 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/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." tags: - pulls operationId: pulls/merge @@ -31773,7 +33989,7 @@ paths: summary: Request reviewers for a pull request description: |- Requests reviews for a pull request from a given set of users and/or teams. - 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/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." tags: - pulls operationId: pulls/request-reviewers @@ -31897,7 +34113,15 @@ paths: "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": get: summary: List reviews for a pull request - description: The list of reviews returns in chronological order. + description: |- + Lists all reviews for a specified pull request. The list of reviews returns in chronological order. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/list-reviews @@ -31933,13 +34157,22 @@ paths: post: summary: Create a review 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. + Creates a review on a specified pull request. + + This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." 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/rest/pulls/reviews#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 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/pulls/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. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/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. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/create-review @@ -31994,8 +34227,13 @@ paths: 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. + line number in the file. 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. body: type: string description: Text of the review comment. @@ -32048,7 +34286,15 @@ paths: "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": get: summary: Get a review for a pull request - description: Retrieves a pull request review by its ID. + description: |- + Retrieves a pull request review by its ID. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/get-review @@ -32079,7 +34325,15 @@ paths: subcategory: reviews put: summary: Update a review for a pull request - description: Update the review summary comment with new text. + description: |- + Updates the contents of a specified review summary comment. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/update-review @@ -32127,8 +34381,15 @@ paths: subcategory: reviews delete: summary: Delete a pending review for a pull request - description: Deletes a pull request review that has not been submitted. Submitted - reviews cannot be deleted. + description: |- + Deletes a pull request review that has not been submitted. Submitted reviews cannot be deleted. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/delete-pending-review @@ -32162,7 +34423,15 @@ paths: "/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. + description: |- + Lists comments for a specific pull request review. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/list-comments-for-review @@ -32201,9 +34470,19 @@ paths: "/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/branches/branch-protection), - you must be a repository administrator or be included in the list of people - or teams who can dismiss pull request reviews." + description: |- + Dismisses a specified review on a pull request. + + **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), + you must be a repository administrator or be included in the list of people or teams + who can dismiss pull request reviews. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/dismiss-review @@ -32259,9 +34538,15 @@ paths: "/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/rest/pulls/reviews#create-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/rest/pulls/reviews#create-a-review-for-a-pull-request)." + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - pulls operationId: pulls/submit-review @@ -32391,7 +34676,10 @@ paths: description: |- Gets the preferred README for a repository. - READMEs support [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw content or rendered HTML. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw file contents. This is the default if you do not specify a media type. + - **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). tags: - repos operationId: repos/get-readme @@ -32433,7 +34721,10 @@ paths: description: |- Gets the README from a repository directory. - READMEs support [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw content or rendered HTML. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw file contents. This is the default if you do not specify a media type. + - **`application/vnd.github.html+json`**: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup). tags: - repos operationId: repos/get-readme-in-directory @@ -32521,7 +34812,7 @@ paths: description: |- Users with push access to the repository can create a release. - 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/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." tags: - repos operationId: repos/create-release @@ -32880,8 +35171,12 @@ paths: "/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)." + description: |- + Gets a public release with the specified release ID. + + **Note:** This returns an `upload_url` key corresponding to the endpoint + for uploading release assets. This key is a hypermedia resource. For more information, see + "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." tags: - repos operationId: repos/get-release @@ -32894,8 +35189,9 @@ paths: - "$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)." + description: '**Note:** This returns an `upload_url` key corresponding to + the endpoint for uploading release assets. This key is a hypermedia resource. + For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."' content: application/json: schema: @@ -33061,7 +35357,7 @@ paths: subcategory: assets 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) + description: "This endpoint makes use of a [Hypermedia relation](https://docs.github.com/rest/using-the-rest-api/getting-started-with-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/releases/releases#create-a-release) @@ -33449,6 +35745,81 @@ paths: "$ref": "#/components/responses/not_found" '500': "$ref": "#/components/responses/internal_error" + "/repos/{owner}/{repo}/rulesets/rule-suites": + get: + summary: List repository rule suites + description: |- + Lists suites of rule evaluations at the repository level. + For more information, see "[Managing rulesets for a repository](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." + tags: + - repos + operationId: repos/get-repo-rule-suites + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/ref-in-query" + - "$ref": "#/components/parameters/time-period" + - "$ref": "#/components/parameters/actor-name-in-query" + - "$ref": "#/components/parameters/rule-suite-result" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/rule-suites" + examples: + default: + "$ref": "#/components/examples/rule-suite-items" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: rule-suites + "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}": + get: + summary: Get a repository rule suite + description: |- + Gets information about a suite of rule evaluations from within a repository. + For more information, see "[Managing rulesets for a repository](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." + tags: + - repos + operationId: repos/get-repo-rule-suite + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/repos/rule-suites#get-a-repository-rule-suite + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/rule-suite-id" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/rule-suite" + examples: + default: + "$ref": "#/components/examples/rule-suite" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: rule-suites "/repos/{owner}/{repo}/rulesets/{ruleset_id}": get: summary: Get a repository ruleset @@ -33620,10 +35991,10 @@ paths: summary: List secret scanning alerts for a repository description: |- 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. + The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. tags: - secret-scanning operationId: secret-scanning/list-alerts-for-repo @@ -33642,6 +36013,7 @@ paths: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/secret-scanning-pagination-before-org-repo" - "$ref": "#/components/parameters/secret-scanning-pagination-after-org-repo" + - "$ref": "#/components/parameters/secret-scanning-alert-validity" responses: '200': description: Response @@ -33669,10 +36041,10 @@ paths: 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. + The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. tags: - secret-scanning operationId: secret-scanning/get-alert @@ -33709,10 +36081,10 @@ paths: summary: Update a secret scanning alert description: |- 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. + The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. operationId: secret-scanning/update-alert tags: - secret-scanning @@ -33773,10 +36145,10 @@ paths: summary: List locations for a secret scanning alert description: |- 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. + The authenticated user must be an administrator for the repository or for the organization that owns the repository to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. tags: - secret-scanning operationId: secret-scanning/list-locations-for-alert @@ -33820,10 +36192,10 @@ paths: summary: List repository security advisories description: |- Lists security advisories in a repository. - You must authenticate using an access token with the `repo` scope or `repository_advisories:read` permission - in order to get published security advisories in a private repository, or any unpublished security advisories that you have access to. - You can access unpublished security advisories from a repository if you are a security manager or administrator of that repository, or if you are a collaborator on any security advisory. + The authenticated user can access unpublished security advisories from a repository if they are a security manager or administrator of that repository, or if they are a collaborator on any security advisory. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to. tags: - security-advisories operationId: security-advisories/list-repository-advisories @@ -33848,7 +36220,8 @@ paths: - "$ref": "#/components/parameters/pagination-before" - "$ref": "#/components/parameters/pagination-after" - name: per_page - description: Number of advisories to return per page. + description: The number of advisories to return per page. For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query required: false schema: @@ -33893,9 +36266,10 @@ paths: summary: Create a repository security advisory description: |- Creates a new repository security advisory. - You must authenticate using an access token with the `repo` scope or `repository_advisories:write` permission to use this endpoint. - In order to create a draft repository security advisory, you must be a security manager or administrator of that repository. + In order to create a draft repository security advisory, the authenticated user must be a security manager or administrator of that repository. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. tags: - security-advisories operationId: security-advisories/create-repository-advisory @@ -34047,12 +36421,13 @@ paths: summary: Get a repository security advisory description: |- Get a repository security advisory using its GitHub Security Advisory (GHSA) identifier. - You can access any published security advisory on a public repository. - You must authenticate using an access token with the `repo` scope or `repository_advisories:read` permission - in order to get a published security advisory in a private repository, or any unpublished security advisory that you have access to. - You can access an unpublished security advisory from a repository if you are a security manager or administrator of that repository, or if you are a + Anyone can access any published security advisory on a public repository. + + The authenticated user can access an unpublished security advisory from a repository if they are a security manager or administrator of that repository, or if they are a collaborator on the security advisory. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:read` scope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to. tags: - security-advisories operationId: security-advisories/get-repository-advisory @@ -34086,10 +36461,11 @@ paths: summary: Update a repository security advisory description: |- Update a repository security advisory using its GitHub Security Advisory (GHSA) identifier. - You must authenticate using an access token with the `repo` scope or `repository_advisories:write` permission to use this endpoint. - In order to update any security advisory, you must be a security manager or administrator of that repository, + In order to update any security advisory, the authenticated user must be a security manager or administrator of that repository, or a collaborator on the repository security advisory. + + OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. tags: - security-advisories operationId: security-advisories/update-repository-advisory @@ -34113,15 +36489,14 @@ paths: severity: critical state: published add_credit: - summary: When adding a credit to an advisory, you must send the whole - array of values. + summary: To add a credit to an advisory, send the whole array of values. value: credits: - login: monauser type: remediation_developer update_vvrs: - summary: When adding vulnerable versions, you must include existing - vulnerable versions in the array. + summary: To add vulnerable versions, include existing versions in + the array. value: - package: ecosystem: pip @@ -34138,8 +36513,8 @@ paths: vulnerable_functions: - function2 invalid_state_transition: - summary: Some state transitions are invalid, such as changing the - state from `published` to `draft` + summary: Example of an invalid state transition, from `published` + to `draft`. value: state: draft update_severity_with_cvss_set: @@ -34188,9 +36563,9 @@ paths: You may request a CVE for public repositories, but cannot do so for private repositories. - You must authenticate using an access token with the `repo` scope or `repository_advisories:write` permission to use this endpoint. + In order to request a CVE for a repository security advisory, the authenticated user must be a security manager or administrator of that repository. - In order to request a CVE for a repository security advisory, you must be a security manager or administrator of that repository. + OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint. tags: - security-advisories operationId: security-advisories/create-repository-advisory-cve-request @@ -34217,13 +36592,55 @@ paths: enabledForGitHubApps: true category: security-advisories subcategory: repository-advisories + "/repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks": + post: + summary: Create a temporary private fork + description: |- + Create a temporary private fork to collaborate on fixing a security vulnerability in your repository. + + **Note**: Forking a repository happens asynchronously. You may have to wait up to 5 minutes before you can access the fork. + tags: + - security-advisories + operationId: security-advisories/create-fork + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/security-advisories/repository-advisories#create-a-temporary-private-fork + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/ghsa_id" + responses: + '202': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/full-repository" + 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" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: security-advisories + subcategory: repository-advisories "/repos/{owner}/{repo}/stargazers": get: summary: List stargazers description: |- 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: `application/vnd.github.star+json`. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. tags: - activity operationId: activity/list-stargazers-for-repo @@ -34266,8 +36683,12 @@ paths: "/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. + description: |2 + + Returns a weekly aggregate of the number of additions and deletions pushed to a repository. + + **Note:** This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains + 10,000 or more commits, a 422 status code will be returned. tags: - repos operationId: repos/get-code-frequency-stats @@ -34294,6 +36715,8 @@ paths: "$ref": "#/components/responses/accepted" '204': "$ref": "#/components/responses/no_content" + '422': + description: Repository contains more than 10,000 commits x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -34341,10 +36764,12 @@ paths: 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). + * `w` - Start of the week, given as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time). * `a` - Number of additions * `d` - Number of deletions * `c` - Number of commits + + **Note:** This endpoint will return `0` values for all addition and deletion counts in repositories with 10,000 or more commits. tags: - repos operationId: repos/get-contributors-stats @@ -34870,11 +37295,7 @@ paths: For a public repository, a team is listed only if that team added the public repository explicitly. - Personal access tokens require the following scopes: - * `public_repo` to call this endpoint on a public repository - * `repo` to call this endpoint on a private repository (this scope also includes public repositories) - - This endpoint is not compatible with fine-grained personal access tokens. + OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to use this endpoint with a public repository, and `repo` scope to use this endpoint with a private repository. tags: - repos operationId: repos/list-teams @@ -35129,9 +37550,11 @@ paths: "/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/). - You must use a personal access token (classic) or an OAuth token for this endpoint. An installation access token or a fine-grained personal access token cannot be used because they are only granted access to a single account. + 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: - repos operationId: repos/transfer @@ -35299,12 +37722,7 @@ paths: 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. 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/rest/repos/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 + OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. tags: - repos operationId: repos/create-using-template @@ -35371,10 +37789,10 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/repository" + "$ref": "#/components/schemas/full-repository" examples: default: - "$ref": "#/components/examples/repository-3" + "$ref": "#/components/examples/full-repository" headers: Location: example: https://api.github.com/repos/octocat/Hello-World @@ -35428,426 +37846,11 @@ paths: enabledForGitHubApps: true category: repos subcategory: repos - "/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. - Authenticated users must have collaborator access to a repository to create, update, or read secrets. - tags: - - actions - operationId: actions/list-environment-secrets - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/secrets#list-environment-secrets - parameters: - - "$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: - 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/actions-secret-paginated" - headers: - Link: - "$ref": "#/components/headers/link" - 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. - Authenticated users must have collaborator access to a repository to create, update, or read secrets. - tags: - - actions - operationId: actions/get-environment-public-key - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/secrets#get-an-environment-public-key - parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - responses: - '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 - category: actions - subcategory: secrets - "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": - 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. - Authenticated users must have collaborator access to a repository to create, update, or read secrets. - tags: - - actions - operationId: actions/get-environment-secret - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/secrets#get-an-environment-secret - parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - - "$ref": "#/components/parameters/secret-name" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/actions-secret" - examples: - default: - "$ref": "#/components/examples/actions-secret" - 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). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." - - 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. - Authenticated users must have collaborator access to a repository to create, update, or read secrets. - tags: - - actions - operationId: actions/create-or-update-environment-secret - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/secrets#create-or-update-an-environment-secret - parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - - "$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 environment public - key](https://docs.github.com/rest/actions/secrets#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: - - encrypted_value - - key_id - 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: 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. - Authenticated users must have collaborator access to a repository to create, update, or read secrets. - tags: - - actions - operationId: actions/delete-environment-secret - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/secrets#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 - "/repositories/{repository_id}/environments/{environment_name}/variables": - get: - summary: List environment variables - description: |- - Lists all environment variables. - - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `environments:read` repository permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read variables. - tags: - - actions - operationId: actions/list-environment-variables - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/variables#list-environment-variables - parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - - "$ref": "#/components/parameters/variables-per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: Response - content: - application/json: - schema: - type: object - required: - - total_count - - variables - properties: - total_count: - type: integer - variables: - type: array - items: - "$ref": "#/components/schemas/actions-variable" - examples: - default: - "$ref": "#/components/examples/actions-variables-paginated" - headers: - Link: - "$ref": "#/components/headers/link" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: variables - post: - summary: Create an environment variable - description: |- - Create an environment variable that you can reference in a GitHub Actions workflow. - - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `environment:write` repository permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read variables. - tags: - - actions - operationId: actions/create-environment-variable - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/variables#create-an-environment-variable - parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the variable. - value: - type: string - description: The value of the variable. - required: - - name - - value - examples: - default: - value: - name: USERNAME - value: octocat - responses: - '201': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/empty-object" - examples: - default: - value: - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: variables - "/repositories/{repository_id}/environments/{environment_name}/variables/{name}": - get: - summary: Get an environment variable - description: |- - Gets a specific variable in an environment. - - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `environments:read` repository permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read variables. - tags: - - actions - operationId: actions/get-environment-variable - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/variables#get-an-environment-variable - parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - - "$ref": "#/components/parameters/variable-name" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/actions-variable" - examples: - default: - "$ref": "#/components/examples/actions-variable" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: variables - patch: - summary: Update an environment variable - description: |- - Updates an environment variable that you can reference in a GitHub Actions workflow. - - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `environment:write` repository permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read variables. - tags: - - actions - operationId: actions/update-environment-variable - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/variables#update-an-environment-variable - parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/variable-name" - - "$ref": "#/components/parameters/environment-name" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the variable. - value: - type: string - description: The value of the variable. - examples: - default: - value: - name: USERNAME - value: octocat - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: variables - delete: - summary: Delete an environment variable - description: |- - Deletes an environment variable using the variable name. - - You must authenticate using an access token with the `repo` scope to use this endpoint. - If the repository is private, you must use an access token with the `repo` scope. - GitHub Apps must have the `environment:write` repository permission to use this endpoint. - Authenticated users must have collaborator access to a repository to create, update, or read variables. - tags: - - actions - operationId: actions/delete-environment-variable - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/actions/variables#delete-an-environment-variable - parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/variable-name" - - "$ref": "#/components/parameters/environment-name" - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: variables "/search/code": get: 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/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/rest/guides/using-pagination-in-the-rest-api). 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/search/search#text-match-metadata). @@ -35951,7 +37954,7 @@ paths: get: summary: Search commits description: |- - Find commits via various criteria on the default branch (usually `main`). 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 `main`). This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). 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/search/search#text-match-metadata). @@ -36024,7 +38027,7 @@ paths: 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). + Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). 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/search/search#text-match-metadata). @@ -36119,7 +38122,7 @@ paths: 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). + 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/guides/using-pagination-in-the-rest-api). 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/search/search#text-match-metadata). @@ -36202,7 +38205,7 @@ paths: 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). + Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). 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/search/search#text-match-metadata). @@ -36283,7 +38286,7 @@ paths: 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. + 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/guides/using-pagination-in-the-rest-api). 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/search/search#text-match-metadata). @@ -36344,7 +38347,7 @@ paths: 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). + Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). 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/rest/search/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata). @@ -36599,7 +38602,9 @@ paths: 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/teams/discussions#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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - teams operationId: teams/list-discussions-legacy @@ -36639,9 +38644,11 @@ paths: 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/teams/discussions#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. + + 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. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." - 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. + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/create-discussion-legacy @@ -36703,7 +38710,9 @@ paths: 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/teams/discussions#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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - teams operationId: teams/get-discussion-legacy @@ -36736,7 +38745,9 @@ paths: 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/teams/discussions#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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/update-discussion-legacy @@ -36786,7 +38797,9 @@ paths: 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/teams/discussions#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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/delete-discussion-legacy @@ -36813,7 +38826,9 @@ paths: 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/teams/discussion-comments#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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - teams operationId: teams/list-discussion-comments-legacy @@ -36854,9 +38869,11 @@ paths: 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/teams/discussion-comments#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. + + 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. For more information, see "[Rate limits for the API](https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." - 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. + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/create-discussion-comment-legacy @@ -36907,7 +38924,9 @@ paths: 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/teams/discussion-comments#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 app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - teams operationId: teams/get-discussion-comment-legacy @@ -36941,7 +38960,9 @@ paths: 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/teams/discussion-comments#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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/update-discussion-comment-legacy @@ -36991,7 +39012,9 @@ paths: 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/teams/discussion-comments#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 app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - teams operationId: teams/delete-discussion-comment-legacy @@ -37019,7 +39042,9 @@ paths: 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/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - List the reactions to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). 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/rest/teams/discussion-comments#get-a-discussion-comment). + + OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/list-for-team-discussion-comment-legacy @@ -37076,7 +39101,11 @@ paths: 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/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. - Create a reaction to a [team discussion comment](https://docs.github.com/rest/teams/discussion-comments#get-a-discussion-comment). 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/rest/teams/discussion-comments#get-a-discussion-comment). + + A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/create-for-team-discussion-comment-legacy @@ -37137,7 +39166,9 @@ paths: 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/reactions/reactions#list-reactions-for-a-team-discussion) endpoint. - List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). 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/rest/teams/discussions#get-a-discussion). + + OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/list-for-team-discussion-legacy @@ -37193,7 +39224,11 @@ paths: 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/reactions/reactions#create-reaction-for-a-team-discussion) endpoint. - Create a reaction to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion). 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/rest/teams/discussions#get-a-discussion). + + A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + + OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. tags: - reactions operationId: reactions/create-for-team-discussion-legacy @@ -37384,7 +39419,7 @@ paths: **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." tags: - teams operationId: teams/add-member-legacy @@ -37696,7 +39731,7 @@ paths: 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/rest/overview/resources-in-the-rest-api#http-verbs)."' + information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."' enum: - read - write @@ -37857,7 +39892,7 @@ paths: 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." tags: - teams operationId: teams/add-or-update-repo-permissions-legacy @@ -37981,10 +40016,8 @@ paths: "/user": get: summary: Get the authenticated user - description: |- - If the authenticated user is authenticated with an OAuth token 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. + description: OAuth app tokens and personal access tokens (classic) need the + `user` scope in order for the response to include private profile information. tags: - users operationId: users/get-authenticated @@ -38234,9 +40267,7 @@ paths: description: |- Lists the authenticated user's codespaces. - You must authenticate using an access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/list-for-authenticated-user @@ -38289,9 +40320,7 @@ paths: 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. - - GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/create-for-authenticated-user @@ -38444,12 +40473,12 @@ paths: get: summary: List secrets for the authenticated user description: |- - Lists all secrets available for a user's Codespaces without revealing their + Lists all development environment secrets available for a user's codespaces without revealing their encrypted values. - You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + The authenticated user must have Codespaces access to use this endpoint. - GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. tags: - codespaces operationId: codespaces/list-secrets-for-authenticated-user @@ -38493,9 +40522,9 @@ paths: 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 `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + The authenticated user must have Codespaces access to use this endpoint. - GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. tags: - codespaces operationId: codespaces/get-public-key-for-authenticated-user @@ -38521,11 +40550,11 @@ paths: get: summary: Get a secret for the authenticated user description: |- - Gets a secret available to a user's codespaces without revealing its encrypted value. + Gets a development environment secret available to a user's codespaces without revealing its encrypted value. - You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + The authenticated user must have Codespaces access to use this endpoint. - GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. tags: - codespaces operationId: codespaces/get-secret-for-authenticated-user @@ -38552,12 +40581,12 @@ paths: put: summary: Create or update a secret for the authenticated user description: |- - Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using + Creates or updates a development environment secret for a user's codespace with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)." - You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint. + The authenticated user must have Codespaces access to use this endpoint. - GitHub Apps must have write access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. tags: - codespaces operationId: codespaces/create-or-update-secret-for-authenticated-user @@ -38629,11 +40658,11 @@ paths: 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. + Deletes a development environment 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 `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + The authenticated user must have Codespaces access to use this endpoint. - GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. tags: - codespaces operationId: codespaces/delete-secret-for-authenticated-user @@ -38654,11 +40683,11 @@ paths: 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. + List the repositories that have been granted the ability to use a user's development environment secret. - You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + The authenticated user must have Codespaces access to use this endpoint. - GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. tags: - codespaces operationId: codespaces/list-repositories-for-secret-for-authenticated-user @@ -38703,11 +40732,11 @@ paths: put: summary: Set selected repositories for a user secret description: |- - Select the repositories that will use a user's codespace secret. + Select the repositories that will use a user's development environment secret. - You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. + The authenticated user must have Codespaces access to use this endpoint. - GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. tags: - codespaces operationId: codespaces/set-repositories-for-secret-for-authenticated-user @@ -38761,9 +40790,11 @@ paths: put: summary: Add a selected repository to a user secret description: |- - Adds a repository to the selected repositories for a user's codespace secret. - You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. - GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint. + Adds a repository to the selected repositories for a user's development environment secret. + + The authenticated user must have Codespaces access to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. tags: - codespaces operationId: codespaces/add-repository-for-secret-for-authenticated-user @@ -38796,9 +40827,11 @@ paths: delete: summary: Remove a selected repository from a user secret description: |- - Removes a repository from the selected repositories for a user's codespace secret. - You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint. - GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint. + Removes a repository from the selected repositories for a user's development environment secret. + + The authenticated user must have Codespaces access to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint. tags: - codespaces operationId: codespaces/remove-repository-for-secret-for-authenticated-user @@ -38834,9 +40867,7 @@ paths: description: |- Gets information about a user's codespace. - You must authenticate using an access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/get-for-authenticated-user @@ -38877,9 +40908,7 @@ paths: 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. - - GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/update-for-authenticated-user @@ -38938,9 +40967,7 @@ paths: description: |- Deletes a user's codespace. - You must authenticate using an access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/delete-for-authenticated-user @@ -38975,9 +41002,7 @@ paths: If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead. - You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/export-for-authenticated-user @@ -39017,9 +41042,7 @@ paths: description: |- Gets information about an export of a codespace. - You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/get-export-details-for-authenticated-user @@ -39052,9 +41075,7 @@ paths: description: |- 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. - - GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/codespace-machines-for-authenticated-user @@ -39108,9 +41129,7 @@ paths: This will fail for a codespace that is already published, meaning it has an associated repository. - You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/publish-for-authenticated-user @@ -39166,9 +41185,7 @@ paths: description: |- Starts a user's codespace. - You must authenticate using an access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/start-for-authenticated-user @@ -39218,9 +41235,7 @@ paths: description: |- Stops a user's codespace. - You must authenticate using an access token with the `codespace` scope to use this endpoint. - - GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. tags: - codespaces operationId: codespaces/stop-for-authenticated-user @@ -39257,7 +41272,8 @@ paths: summary: Get list of conflicting packages during Docker migration for authenticated-user description: |- Lists all packages that are owned by the authenticated user within the user's namespace, and that encountered a conflict during a Docker migration. - To use this endpoint, you must authenticate using an access token with the `read:packages` scope. + + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. tags: - packages operationId: packages/list-docker-migration-conflicting-packages-for-authenticated-user @@ -39342,8 +41358,11 @@ paths: "/user/emails": 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. + description: |- + Lists all of your email addresses, and specifies which one is visible + to the public. + + OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. tags: - users operationId: users/list-emails-for-authenticated-user @@ -39383,7 +41402,8 @@ paths: subcategory: emails post: summary: Add an email address for the authenticated user - description: This endpoint is accessible with the `user` scope. + description: OAuth app tokens and personal access tokens (classic) need the + `user` scope to use this endpoint. tags: - users operationId: users/add-email-for-authenticated-user @@ -39460,7 +41480,8 @@ paths: subcategory: emails delete: summary: Delete an email address for the authenticated user - description: This endpoint is accessible with the `user` scope. + description: OAuth app tokens and personal access tokens (classic) need the + `user` scope to use this endpoint. tags: - users operationId: users/delete-email-for-authenticated-user @@ -39637,9 +41658,9 @@ paths: 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/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/rest/guides/getting-started-with-the-rest-api#http-method)." - Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. tags: - users operationId: users/follow @@ -39666,8 +41687,8 @@ paths: 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. + description: OAuth app tokens and personal access tokens (classic) need the + `user:follow` scope to use this endpoint. tags: - users operationId: users/unfollow @@ -39695,8 +41716,10 @@ paths: "/user/gpg_keys": 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/). + description: |- + Lists the current user's GPG keys. + + OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint. tags: - users operationId: users/list-gpg-keys-for-authenticated-user @@ -39736,9 +41759,10 @@ paths: 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/). + description: |- + Adds a GPG key to the authenticated user's GitHub account. + + OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint. operationId: users/create-gpg-key-for-authenticated-user tags: - users @@ -39799,8 +41823,10 @@ paths: "/user/gpg_keys/{gpg_key_id}": 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/). + description: |- + View extended details for a single GPG key. + + OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint. tags: - users operationId: users/get-gpg-key-for-authenticated-user @@ -39834,9 +41860,10 @@ paths: 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/). + description: |- + Removes a GPG key from the authenticated user's GitHub account. + + OAuth app tokens and personal access tokens (classic) need the `admin:gpg_key` scope to use this endpoint. tags: - users operationId: users/delete-gpg-key-for-authenticated-user @@ -39869,8 +41896,6 @@ paths: 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 access token](https://docs.github.com/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app), 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. @@ -39926,8 +41951,6 @@ 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 access token](https://docs.github.com/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app), 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 @@ -39979,10 +42002,8 @@ paths: "/user/installations/{installation_id}/repositories/{repository_id}": put: summary: Add a repository to an app installation - description: |- - 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. + description: Add a single repository to an installation. The authenticated user + must have admin access to the repository. tags: - apps operationId: apps/add-repo-to-installation-for-authenticated-user @@ -40008,10 +42029,9 @@ paths: 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. The installation must have the `repository_selection` of `selected`. - - 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. + description: Remove a single repository from an installation. The authenticated + user must have admin access to the repository. The installation must have + the `repository_selection` of `selected`. tags: - apps operationId: apps/remove-repo-from-installation-for-authenticated-user @@ -40138,6 +42158,13 @@ paths: 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/pulls/pulls#list-pull-requests)" endpoint. + + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. + - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. + - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. + - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. tags: - issues operationId: issues/list-for-authenticated-user @@ -40217,9 +42244,10 @@ paths: "/user/keys": 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/). + description: |- + Lists the public SSH keys for the authenticated user's GitHub account. + + OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint. tags: - users operationId: users/list-public-ssh-keys-for-authenticated-user @@ -40259,9 +42287,10 @@ paths: 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/). + description: |- + Adds a public SSH key to the authenticated user's GitHub account. + + OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint. operationId: users/create-public-ssh-key-for-authenticated-user tags: - users @@ -40319,9 +42348,10 @@ paths: "/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/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + description: |- + View extended details for a single public SSH key. + + OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint. tags: - users operationId: users/get-public-ssh-key-for-authenticated-user @@ -40355,9 +42385,10 @@ paths: 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/). + description: |- + Removes a public SSH key from the authenticated user's GitHub account. + + OAuth app tokens and personal access tokens (classic) need the `admin:public_key` scope to use this endpoint. tags: - users operationId: users/delete-public-ssh-key-for-authenticated-user @@ -40385,10 +42416,7 @@ paths: "/user/marketplace_purchases": get: summary: List subscriptions for the authenticated user - description: Lists the active subscriptions for the authenticated user. GitHub - Apps must use a [user access token](https://docs.github.com/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app), - 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/oauth-apps/building-oauth-apps/authorizing-oauth-apps). + description: Lists the active subscriptions for the authenticated user. tags: - apps operationId: apps/list-subscriptions-for-authenticated-user @@ -40427,10 +42455,7 @@ paths: "/user/marketplace_purchases/stubbed": get: summary: List subscriptions for the authenticated user (stubbed) - description: Lists the active subscriptions for the authenticated user. GitHub - Apps must use a [user access token](https://docs.github.com/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app), - 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/oauth-apps/building-oauth-apps/authorizing-oauth-apps). + description: Lists the active subscriptions for the authenticated user. tags: - apps operationId: apps/list-subscriptions-for-authenticated-user-stubbed @@ -40954,9 +42979,7 @@ paths: 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. + For OAuth app tokens and personal access tokens (classic), this endpoint 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 for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response. tags: - orgs operationId: orgs/list-for-authenticated-user @@ -40998,7 +43021,7 @@ paths: 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 `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/list-packages-for-authenticated-user @@ -41051,7 +43074,7 @@ paths: 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 `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/get-package-for-authenticated-user @@ -41081,8 +43104,7 @@ paths: 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 `read:packages` and `delete:packages` scopes. - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, `repo` scope is also required. For the list these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/delete-package-for-authenticated-user @@ -41116,7 +43138,7 @@ paths: - 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 `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/restore-package-for-authenticated-user @@ -41152,7 +43174,7 @@ paths: description: |- Lists package versions for a package owned by the authenticated user. - To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/get-all-package-versions-for-package-owned-by-authenticated-user @@ -41203,7 +43225,7 @@ paths: 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 `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/get-package-version-for-authenticated-user @@ -41234,8 +43256,9 @@ paths: 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 `read:packages` and `delete:packages` scopes. - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + The authenticated user must have admin permissions in the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/delete-package-version-for-authenticated-user @@ -41270,7 +43293,7 @@ paths: - 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 `read:packages` and `write:packages` scopes. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/restore-package-version-for-authenticated-user @@ -41360,9 +43383,12 @@ paths: "/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/rest/users/emails#set-primary-email-visibility-for-the-authenticated-user) - endpoint. This endpoint is accessible with the `user:email` scope. + 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/users/emails#set-primary-email-visibility-for-the-authenticated-user) + endpoint. + + OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint. tags: - users operationId: users/list-public-emails-for-authenticated-user @@ -41506,12 +43532,7 @@ paths: description: |- Creates a new repository for the authenticated user. - **OAuth scope requirements** - - When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - - * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * `repo` scope to create a private repository. + OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository. tags: - repos operationId: repos/create-for-authenticated-user @@ -41676,10 +43697,10 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/repository" + "$ref": "#/components/schemas/full-repository" examples: default: - "$ref": "#/components/examples/repository" + "$ref": "#/components/examples/full-repository" headers: Location: example: https://api.github.com/repos/octocat/Hello-World @@ -41842,8 +43863,10 @@ paths: subcategory: social-accounts post: summary: Add social accounts for the authenticated user - description: Add one or more social accounts to the authenticated user's profile. - This endpoint is accessible with the `user` scope. + description: |- + Add one or more social accounts to the authenticated user's profile. + + OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. tags: - users operationId: users/add-social-account-for-authenticated-user @@ -41907,8 +43930,10 @@ paths: subcategory: social-accounts delete: summary: Delete social accounts for the authenticated user - description: Deletes one or more social accounts from the authenticated user's - profile. This endpoint is accessible with the `user` scope. + description: |- + Deletes one or more social accounts from the authenticated user's profile. + + OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. tags: - users operationId: users/delete-social-account-for-authenticated-user @@ -41964,10 +43989,10 @@ paths: "/user/ssh_signing_keys": get: summary: List SSH signing keys for the authenticated user - description: Lists the SSH signing keys for the authenticated user's GitHub - account. You must authenticate with Basic Authentication, or you must authenticate - with OAuth with at least `read:ssh_signing_key` scope. For more information, - see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + description: |- + Lists the SSH signing keys for the authenticated user's GitHub account. + + OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint. tags: - users operationId: users/list-ssh-signing-keys-for-authenticated-user @@ -42008,10 +44033,10 @@ paths: subcategory: ssh-signing-keys post: summary: Create a SSH signing key for the authenticated user - description: Creates an SSH signing key for the authenticated user's GitHub - account. You must authenticate with Basic Authentication, or you must authenticate - with OAuth with at least `write:ssh_signing_key` scope. For more information, - see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + description: |- + Creates an SSH signing key for the authenticated user's GitHub account. + + OAuth app tokens and personal access tokens (classic) need the `write:ssh_signing_key` scope to use this endpoint. operationId: users/create-ssh-signing-key-for-authenticated-user tags: - users @@ -42071,10 +44096,10 @@ paths: "/user/ssh_signing_keys/{ssh_signing_key_id}": get: summary: Get an SSH signing key for the authenticated user - description: Gets extended details for an SSH signing key. You must authenticate - with Basic Authentication, or you must authenticate with OAuth with at least - `read:ssh_signing_key` scope. For more information, see "[Understanding scopes - for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + description: |- + Gets extended details for an SSH signing key. + + OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint. tags: - users operationId: users/get-ssh-signing-key-for-authenticated-user @@ -42108,10 +44133,10 @@ paths: subcategory: ssh-signing-keys delete: summary: Delete an SSH signing key for the authenticated user - description: Deletes an SSH signing key from the authenticated user's GitHub - account. You must authenticate with Basic Authentication, or you must authenticate - with OAuth with at least `admin:ssh_signing_key` scope. For more information, - see "[Understanding scopes for OAuth apps](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)." + description: |- + Deletes an SSH signing key from the authenticated user's GitHub account. + + OAuth app tokens and personal access tokens (classic) need the `admin:ssh_signing_key` scope to use this endpoint. tags: - users operationId: users/delete-ssh-signing-key-for-authenticated-user @@ -42142,7 +44167,9 @@ 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: `application/vnd.github.star+json`. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. tags: - activity operationId: activity/list-repos-starred-by-authenticated-user @@ -42224,7 +44251,7 @@ 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 method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." tags: - activity operationId: activity/star-repo-for-authenticated-user @@ -42321,15 +44348,13 @@ paths: "/user/teams": get: 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/). - When using a fine-grained personal access token, the resource owner of the - token [must be a single organization](https://docs.github.com/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#fine-grained-personal-access-tokens), - and have at least read-only member organization permissions. The response - payload only contains the teams from a single organization when using a fine-grained - personal access token. + description: |- + List all of the teams across all of the organizations to which the authenticated + user belongs. + + OAuth app tokens and personal access tokens (classic) need the `user`, `repo`, or `read:org` scope to use this endpoint. + + When using a fine-grained personal access token, the resource owner of the token must be a single organization, and the response will only include the teams from that organization. tags: - teams operationId: teams/list-for-authenticated-user @@ -42411,9 +44436,7 @@ paths: 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" - - 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 [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/guides/getting-started-with-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/users/emails)". tags: @@ -42450,7 +44473,8 @@ paths: summary: Get list of conflicting packages during Docker migration for user description: |- Lists all packages that are in a specific user's namespace, that the requesting user has access to, and that encountered a conflict during Docker migration. - To use this endpoint, you must authenticate using an access token with the `read:packages` scope. + + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. tags: - packages operationId: packages/list-docker-migration-conflicting-packages-for-user @@ -42747,14 +44771,11 @@ paths: get: summary: Get contextual information for a user description: |- - Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. + Provides hovercard information. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. - The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: + The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository). - ```shell - curl -u username:token - https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 - ``` + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: - users operationId: users/get-context-for-user @@ -42910,7 +44931,7 @@ paths: 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 `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/list-packages-for-user @@ -42968,7 +44989,7 @@ paths: 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 `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/get-package-for-user @@ -42999,9 +45020,9 @@ paths: 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 `read:packages` and `delete:packages` scopes. In addition: - - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/delete-package-for-user @@ -43036,9 +45057,9 @@ paths: - 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 `read:packages` and `write:packages` scopes. In addition: - - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/restore-package-for-user @@ -43075,7 +45096,7 @@ paths: description: |- Lists package versions for a public package owned by a specified user. - To use this endpoint, you must authenticate using an access token with the `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/get-all-package-versions-for-package-owned-by-user @@ -43115,7 +45136,7 @@ paths: 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 `read:packages` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/get-package-version-for-user @@ -43147,9 +45168,9 @@ paths: 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 `read:packages` and `delete:packages` scopes. In addition: - - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/delete-package-version-for-user @@ -43185,9 +45206,9 @@ paths: - 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 `read:packages` and `write:packages` scopes. In addition: - - If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." - - If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + + OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, the `repo` scope is also required. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." tags: - packages operationId: packages/restore-package-version-for-user @@ -43263,9 +45284,9 @@ paths: "/users/{username}/received_events": get: summary: List events received by the authenticated user - description: These are events that you've received by watching repos and following - users. If you are authenticated as the given user, you will see private events. - Otherwise, you'll only see public events. + description: These are events that you've received by watching repositories + and following users. If you are authenticated as the given user, you will + see private events. Otherwise, you'll only see public events. tags: - activity operationId: activity/list-received-events-for-user @@ -43327,8 +45348,7 @@ paths: "/users/{username}/repos": get: summary: List repositories for a user - description: 'Lists public repositories for the specified user. Note: For GitHub - AE, this endpoint will list internal repositories for the specified user.' + description: Lists public repositories for the specified user. tags: - repos operationId: repos/list-for-user @@ -43400,7 +45420,7 @@ paths: 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. + OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. operationId: billing/get-github-actions-billing-user tags: - billing @@ -43432,7 +45452,7 @@ paths: 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. + OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. operationId: billing/get-github-packages-billing-user tags: - billing @@ -43464,7 +45484,7 @@ paths: 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. + OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. operationId: billing/get-shared-storage-billing-user tags: - billing @@ -43564,7 +45584,9 @@ paths: 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: `application/vnd.github.star+json`. + This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." + + - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. tags: - activity operationId: activity/list-repos-starred-by-user @@ -45082,18 +47104,18 @@ x-webhooks: - repository - organization - app - delete: + custom-property-created: post: summary: |- - This event occurs when a Git branch or tag is deleted. To subscribe to all pushes to a repository, including - branch and tag deletions, use the [`push`](#push) webhook event. + This event occurs when there is activity relating to a custom property. - To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission. + For more information, see "[Managing custom properties for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization)". For information about the APIs to manage custom properties, see "[Custom properties](https://docs.github.com/rest/orgs/custom-properties)" in the REST API documentation. - **Note**: This event will not occur when more than three tags are deleted at once. - operationId: delete + To subscribe to this event, a GitHub App must have at least read-level access for the "Custom properties" organization permission. + description: A new custom property was created. + operationId: custom-property/created externalDocs: - url: https://docs.github.com/webhooks/webhook-events-and-payloads#delete + url: https://docs.github.com/webhooks/webhook-events-and-payloads#custom_property parameters: - name: User-Agent in: header @@ -45135,7 +47157,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-delete" + "$ref": "#/components/schemas/webhook-custom-property-created" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45143,25 +47165,22 @@ x-webhooks: x-github: githubCloudOnly: false category: webhooks - subcategory: delete + subcategory: custom_property supported-webhook-types: - - repository - organization - app - dependabot-alert-auto-dismissed: + custom-property-deleted: post: summary: |- - This event occurs when there is activity relating to Dependabot alerts. - - For more information about Dependabot alerts, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." For information about the API to manage Dependabot alerts, see "[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)" in the REST API documentation. + This event occurs when there is activity relating to a custom property. - To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. + For more information, see "[Managing custom properties for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization)". For information about the APIs to manage custom properties, see "[Custom properties](https://docs.github.com/rest/orgs/custom-properties)" in the REST API documentation. - **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. - description: A Dependabot alert was automatically closed. - operationId: dependabot-alert/auto-dismissed + To subscribe to this event, a GitHub App must have at least read-level access for the "Custom properties" organization permission. + description: A custom property was deleted. + operationId: custom-property/deleted externalDocs: - url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert + url: https://docs.github.com/webhooks/webhook-events-and-payloads#custom_property parameters: - name: User-Agent in: header @@ -45203,7 +47222,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-dependabot-alert-auto-dismissed" + "$ref": "#/components/schemas/webhook-custom-property-deleted" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45211,25 +47230,22 @@ x-webhooks: x-github: githubCloudOnly: false category: webhooks - subcategory: dependabot_alert + subcategory: custom_property supported-webhook-types: - - repository - organization - app - dependabot-alert-auto-reopened: + custom-property-updated: post: summary: |- - This event occurs when there is activity relating to Dependabot alerts. - - For more information about Dependabot alerts, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." For information about the API to manage Dependabot alerts, see "[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)" in the REST API documentation. + This event occurs when there is activity relating to a custom property. - To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. + For more information, see "[Managing custom properties for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization)". For information about the APIs to manage custom properties, see "[Custom properties](https://docs.github.com/rest/orgs/custom-properties)" in the REST API documentation. - **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. - description: A Dependabot alert was automatically reopened. - operationId: dependabot-alert/auto-reopened + To subscribe to this event, a GitHub App must have at least read-level access for the "Custom properties" organization permission. + description: A custom property was updated. + operationId: custom-property/updated externalDocs: - url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert + url: https://docs.github.com/webhooks/webhook-events-and-payloads#custom_property parameters: - name: User-Agent in: header @@ -45271,7 +47287,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-dependabot-alert-auto-reopened" + "$ref": "#/components/schemas/webhook-custom-property-updated" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45279,27 +47295,22 @@ x-webhooks: x-github: githubCloudOnly: false category: webhooks - subcategory: dependabot_alert + subcategory: custom_property supported-webhook-types: - - repository - organization - app - dependabot-alert-created: + custom-property-values-updated: post: summary: |- - This event occurs when there is activity relating to Dependabot alerts. - - For more information about Dependabot alerts, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." For information about the API to manage Dependabot alerts, see "[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)" in the REST API documentation. + This event occurs when there is activity relating to custom property values for a repository. - To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. + For more information, see "[Managing custom properties for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization)". For information about the APIs to manage custom properties for a repository, see "[Custom properties](https://docs.github.com/rest/repos/custom-properties)" in the REST API documentation. - **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. - description: A manifest file change introduced a vulnerable dependency, or a - GitHub Security Advisory was published and an existing dependency was found - to be vulnerable. - operationId: dependabot-alert/created + To subscribe to this event, a GitHub App must have at least read-level access for the "Custom properties" organization permission. + description: The custom property values of a repository were updated. + operationId: custom-property-values/updated externalDocs: - url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert + url: https://docs.github.com/webhooks/webhook-events-and-payloads#custom-property-values parameters: - name: User-Agent in: header @@ -45341,7 +47352,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-dependabot-alert-created" + "$ref": "#/components/schemas/webhook-custom-property-values-updated" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45349,25 +47360,23 @@ x-webhooks: x-github: githubCloudOnly: false category: webhooks - subcategory: dependabot_alert + subcategory: custom-property-values supported-webhook-types: - repository - organization - app - dependabot-alert-dismissed: + delete: post: summary: |- - This event occurs when there is activity relating to Dependabot alerts. - - For more information about Dependabot alerts, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." For information about the API to manage Dependabot alerts, see "[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)" in the REST API documentation. + This event occurs when a Git branch or tag is deleted. To subscribe to all pushes to a repository, including + branch and tag deletions, use the [`push`](#push) webhook event. - To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. + To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission. - **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. - description: A Dependabot alert was manually closed. - operationId: dependabot-alert/dismissed + **Note**: This event will not occur when more than three tags are deleted at once. + operationId: delete externalDocs: - url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert + url: https://docs.github.com/webhooks/webhook-events-and-payloads#delete parameters: - name: User-Agent in: header @@ -45409,7 +47418,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-dependabot-alert-dismissed" + "$ref": "#/components/schemas/webhook-delete" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45417,12 +47426,12 @@ x-webhooks: x-github: githubCloudOnly: false category: webhooks - subcategory: dependabot_alert + subcategory: delete supported-webhook-types: - repository - organization - app - dependabot-alert-fixed: + dependabot-alert-auto-dismissed: post: summary: |- This event occurs when there is activity relating to Dependabot alerts. @@ -45432,8 +47441,9 @@ x-webhooks: To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. - description: A manifest file change removed a vulnerability. - operationId: dependabot-alert/fixed + description: A Dependabot alert was automatically closed by a Dependabot auto-triage + rule. + operationId: dependabot-alert/auto-dismissed externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert parameters: @@ -45477,7 +47487,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-dependabot-alert-fixed" + "$ref": "#/components/schemas/webhook-dependabot-alert-auto-dismissed" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45490,7 +47500,7 @@ x-webhooks: - repository - organization - app - dependabot-alert-reintroduced: + dependabot-alert-auto-reopened: post: summary: |- This event occurs when there is activity relating to Dependabot alerts. @@ -45500,9 +47510,10 @@ x-webhooks: To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. - description: A manifest file change introduced a vulnerable dependency that - had previously been fixed. - operationId: dependabot-alert/reintroduced + description: A Dependabot alert, that had been automatically closed by a Dependabot + auto-triage rule, was automatically reopened because the alert metadata or + rule changed. + operationId: dependabot-alert/auto-reopened externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert parameters: @@ -45546,7 +47557,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-dependabot-alert-reintroduced" + "$ref": "#/components/schemas/webhook-dependabot-alert-auto-reopened" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45559,7 +47570,7 @@ x-webhooks: - repository - organization - app - dependabot-alert-reopened: + dependabot-alert-created: post: summary: |- This event occurs when there is activity relating to Dependabot alerts. @@ -45569,8 +47580,10 @@ x-webhooks: To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. - description: A Dependabot alert was manually reopened. - operationId: dependabot-alert/reopened + description: A manifest file change introduced a vulnerable dependency, or a + GitHub Security Advisory was published and an existing dependency was found + to be vulnerable. + operationId: dependabot-alert/created externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert parameters: @@ -45614,7 +47627,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-dependabot-alert-reopened" + "$ref": "#/components/schemas/webhook-dependabot-alert-created" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45627,16 +47640,20 @@ x-webhooks: - repository - organization - app - deploy-key-created: + dependabot-alert-dismissed: post: summary: |- - This event occurs when there is activity relating to deploy keys. For more information, see "[Managing deploy keys](https://docs.github.com/developers/overview/managing-deploy-keys)." For information about the APIs to manage deploy keys, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deploykey) or "[Deploy keys](https://docs.github.com/rest/deploy-keys)" in the REST API documentation. + This event occurs when there is activity relating to Dependabot alerts. - To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission. - description: A deploy key was created. - operationId: deploy-key/created + For more information about Dependabot alerts, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." For information about the API to manage Dependabot alerts, see "[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)" in the REST API documentation. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. + + **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. + description: A Dependabot alert was manually closed. + operationId: dependabot-alert/dismissed externalDocs: - url: https://docs.github.com/webhooks/webhook-events-and-payloads#deploy_key + url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert parameters: - name: User-Agent in: header @@ -45678,7 +47695,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-deploy-key-created" + "$ref": "#/components/schemas/webhook-dependabot-alert-dismissed" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45686,21 +47703,25 @@ x-webhooks: x-github: githubCloudOnly: false category: webhooks - subcategory: deploy_key + subcategory: dependabot_alert supported-webhook-types: - repository - organization - app - deploy-key-deleted: + dependabot-alert-fixed: post: summary: |- - This event occurs when there is activity relating to deploy keys. For more information, see "[Managing deploy keys](https://docs.github.com/developers/overview/managing-deploy-keys)." For information about the APIs to manage deploy keys, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deploykey) or "[Deploy keys](https://docs.github.com/rest/deploy-keys)" in the REST API documentation. + This event occurs when there is activity relating to Dependabot alerts. - To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission. - description: A deploy key was deleted. - operationId: deploy-key/deleted + For more information about Dependabot alerts, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." For information about the API to manage Dependabot alerts, see "[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)" in the REST API documentation. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. + + **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. + description: A manifest file change removed a vulnerability. + operationId: dependabot-alert/fixed externalDocs: - url: https://docs.github.com/webhooks/webhook-events-and-payloads#deploy_key + url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert parameters: - name: User-Agent in: header @@ -45742,7 +47763,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-deploy-key-deleted" + "$ref": "#/components/schemas/webhook-dependabot-alert-fixed" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45750,23 +47771,26 @@ x-webhooks: x-github: githubCloudOnly: false category: webhooks - subcategory: deploy_key + subcategory: dependabot_alert supported-webhook-types: - repository - organization - app - deployment-created: + dependabot-alert-reintroduced: post: summary: |- - This event occurs when there is activity relating to deployments. For more information, see "[About deployments](https://docs.github.com/actions/deployment/about-deployments)." For information about the APIs to manage deployments, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deployment) or "[Deployments](https://docs.github.com/rest/deployments/deployments)" in the REST API documentation. + This event occurs when there is activity relating to Dependabot alerts. - For activity relating to deployment status, use the `deployment_status` event. + For more information about Dependabot alerts, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." For information about the API to manage Dependabot alerts, see "[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)" in the REST API documentation. - To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission. - description: A deployment was created. - operationId: deployment/created + To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. + + **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. + description: A manifest file change introduced a vulnerable dependency that + had previously been fixed. + operationId: dependabot-alert/reintroduced externalDocs: - url: https://docs.github.com/webhooks/webhook-events-and-payloads#deployment + url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert parameters: - name: User-Agent in: header @@ -45808,7 +47832,7 @@ x-webhooks: content: application/json: schema: - "$ref": "#/components/schemas/webhook-deployment-created" + "$ref": "#/components/schemas/webhook-dependabot-alert-reintroduced" responses: '200': description: Return a 200 status to indicate that the data was received @@ -45816,21 +47840,283 @@ x-webhooks: x-github: githubCloudOnly: false category: webhooks - subcategory: deployment + subcategory: dependabot_alert supported-webhook-types: - repository - organization - app - deployment-protection-rule-requested: + dependabot-alert-reopened: post: summary: |- - This event occurs when there is activity relating to deployment protection rules. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment#environment-protection-rules)." For information about the API to manage deployment protection rules, see [the REST API documentation](https://docs.github.com/rest/deployments/environments). + This event occurs when there is activity relating to Dependabot alerts. - To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission. - description: A deployment protection rule was requested for an environment. - operationId: deployment-protection-rule/requested + For more information about Dependabot alerts, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." For information about the API to manage Dependabot alerts, see "[Dependabot alerts](https://docs.github.com/rest/dependabot/alerts)" in the REST API documentation. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission. + + **Note**: Webhook events for Dependabot alerts are currently in beta and subject to change. + description: A Dependabot alert was manually reopened. + operationId: dependabot-alert/reopened externalDocs: - url: https://docs.github.com/webhooks/webhook-events-and-payloads#deployment_protection_rule + url: https://docs.github.com/webhooks/webhook-events-and-payloads#dependabot_alert + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-dependabot-alert-reopened" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: dependabot_alert + supported-webhook-types: + - repository + - organization + - app + deploy-key-created: + post: + summary: |- + This event occurs when there is activity relating to deploy keys. For more information, see "[Managing deploy keys](https://docs.github.com/developers/overview/managing-deploy-keys)." For information about the APIs to manage deploy keys, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deploykey) or "[Deploy keys](https://docs.github.com/rest/deploy-keys)" in the REST API documentation. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission. + description: A deploy key was created. + operationId: deploy-key/created + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#deploy_key + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-deploy-key-created" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: deploy_key + supported-webhook-types: + - repository + - organization + - app + deploy-key-deleted: + post: + summary: |- + This event occurs when there is activity relating to deploy keys. For more information, see "[Managing deploy keys](https://docs.github.com/developers/overview/managing-deploy-keys)." For information about the APIs to manage deploy keys, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deploykey) or "[Deploy keys](https://docs.github.com/rest/deploy-keys)" in the REST API documentation. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission. + description: A deploy key was deleted. + operationId: deploy-key/deleted + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#deploy_key + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-deploy-key-deleted" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: deploy_key + supported-webhook-types: + - repository + - organization + - app + deployment-created: + post: + summary: |- + This event occurs when there is activity relating to deployments. For more information, see "[About deployments](https://docs.github.com/actions/deployment/about-deployments)." For information about the APIs to manage deployments, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#deployment) or "[Deployments](https://docs.github.com/rest/deployments/deployments)" in the REST API documentation. + + For activity relating to deployment status, use the `deployment_status` event. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission. + description: A deployment was created. + operationId: deployment/created + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#deployment + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-deployment-created" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: deployment + supported-webhook-types: + - repository + - organization + - app + deployment-protection-rule-requested: + post: + summary: |- + This event occurs when there is activity relating to deployment protection rules. For more information, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment#environment-protection-rules)." For information about the API to manage deployment protection rules, see [the REST API documentation](https://docs.github.com/rest/deployments/environments). + + To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission. + description: A deployment protection rule was requested for an environment. + operationId: deployment-protection-rule/requested + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#deployment_protection_rule parameters: - name: User-Agent in: header @@ -51685,12 +53971,14 @@ x-webhooks: project-card-converted: post: summary: |- - This event occurs when there is activity relating to a card on a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a card on a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. - For activity relating to a project or a column on a project, use the `project` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + For activity relating to a project (classic) or a column on a project (classic), use the `project` and `project_column` event. + + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A note in a classic project was converted to an issue. + description: A note in a project (classic) was converted to an issue. operationId: project-card/converted externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project_card @@ -51751,12 +54039,14 @@ x-webhooks: project-card-created: post: summary: |- - This event occurs when there is activity relating to a card on a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a card on a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + + For activity relating to a project (classic) or a column on a project (classic), use the `project` and `project_column` event. - For activity relating to a project or a column on a project, use the `project` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A card was added to a classic project. + description: A card was added to a project (classic). operationId: project-card/created externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project_card @@ -51817,12 +54107,14 @@ x-webhooks: project-card-deleted: post: summary: |- - This event occurs when there is activity relating to a card on a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a card on a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. - For activity relating to a project or a column on a project, use the `project` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + For activity relating to a project (classic) or a column on a project (classic), use the `project` and `project_column` event. + + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A card on a classic project was deleted. + description: A card on a project (classic) was deleted. operationId: project-card/deleted externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project_card @@ -51883,12 +54175,14 @@ x-webhooks: project-card-edited: post: summary: |- - This event occurs when there is activity relating to a card on a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a card on a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + + For activity relating to a project (classic) or a column on a project (classic), use the `project` and `project_column` event. - For activity relating to a project or a column on a project, use the `project` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A note on a classic project was edited. + description: A note on a project (classic) was edited. operationId: project-card/edited externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project_card @@ -51949,13 +54243,15 @@ x-webhooks: project-card-moved: post: summary: |- - This event occurs when there is activity relating to a card on a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a card on a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. - For activity relating to a project or a column on a project, use the `project` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + For activity relating to a project (classic) or a column on a project (classic), use the `project` and `project_column` event. + + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A card on a classic project was moved to another column or to another - position in its column. + description: A card on a project (classic) was moved to another column or to + another position in its column. operationId: project-card/moved externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project_card @@ -52016,12 +54312,14 @@ x-webhooks: project-closed: post: summary: |- - This event occurs when there is activity relating to a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + + For activity relating to a card or column on a project (classic), use the `project_card` and `project_column` event. - For activity relating to a card or column on a project, use the `project_card` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A classic project was closed. + description: A project (classic) was closed. operationId: project/closed externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project @@ -52082,12 +54380,14 @@ x-webhooks: project-column-created: post: summary: |- - This event occurs when there is activity relating to a column on a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a column on a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + + For activity relating to a project (classic) or a card on a project (classic), use the `project` and `project_card` event. - For activity relating to a project or a card on a project, use the `project` and `project_card` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A column was added to a classic project. + description: A column was added to a project (classic). operationId: project-column/created externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project_column @@ -52148,12 +54448,14 @@ x-webhooks: project-column-deleted: post: summary: |- - This event occurs when there is activity relating to a column on a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a column on a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. - For activity relating to a project or a card on a project, use the `project` and `project_card` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + For activity relating to a project (classic) or a card on a project (classic), use the `project` and `project_card` event. + + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A column was deleted from a classic project. + description: A column was deleted from a project (classic). operationId: project-column/deleted externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project_column @@ -52214,12 +54516,14 @@ x-webhooks: project-column-edited: post: summary: |- - This event occurs when there is activity relating to a column on a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a column on a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + + For activity relating to a project (classic) or a card on a project (classic), use the `project` and `project_card` event. - For activity relating to a project or a card on a project, use the `project` and `project_card` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: The name of a column on a classic project was changed. + description: The name of a column on a project (classic) was changed. operationId: project-column/edited externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project_column @@ -52280,12 +54584,14 @@ x-webhooks: project-column-moved: post: summary: |- - This event occurs when there is activity relating to a column on a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a column on a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + + For activity relating to a project (classic) or a card on a project (classic), use the `project` and `project_card` event. - For activity relating to a project or a card on a project, use the `project` and `project_card` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A column was moved to a new position on a classic project. + description: A column was moved to a new position on a project (classic). operationId: project-column/moved externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project_column @@ -52346,12 +54652,14 @@ x-webhooks: project-created: post: summary: |- - This event occurs when there is activity relating to a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. - For activity relating to a card or column on a project, use the `project_card` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + For activity relating to a card or column on a project (classic), use the `project_card` and `project_column` event. + + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A classic project was created. + description: A project (classic) was created. operationId: project/created externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project @@ -52412,12 +54720,14 @@ x-webhooks: project-deleted: post: summary: |- - This event occurs when there is activity relating to a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + + For activity relating to a card or column on a project (classic), use the `project_card` and `project_column` event. - For activity relating to a card or column on a project, use the `project_card` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A classic project was deleted. + description: A project (classic) was deleted. operationId: project/deleted externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project @@ -52478,12 +54788,14 @@ x-webhooks: project-edited: post: summary: |- - This event occurs when there is activity relating to a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + + For activity relating to a card or column on a project (classic), use the `project_card` and `project_column` event. - For activity relating to a card or column on a project, use the `project_card` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: The name or description of a classic project was changed. + description: The name or description of a project (classic) was changed. operationId: project/edited externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project @@ -52544,12 +54856,14 @@ x-webhooks: project-reopened: post: summary: |- - This event occurs when there is activity relating to a classic project. For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. + This event occurs when there is activity relating to a project (classic). For more information, see "[About projects (classic)](https://docs.github.com/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards)." For information about the API to manage classic projects, see [the GraphQL API documentation](https://docs.github.com/graphql/reference/objects#project) or "[Projects (classic)](https://docs.github.com/rest/projects)" in the REST API documentation. - For activity relating to a card or column on a project, use the `project_card` and `project_column` event. For activity relating to Projects instead of Projects (classic), use the `projects_v2` event instead. + For activity relating to a card or column on a project (classic), use the `project_card` and `project_column` event. + + This event relates to projects (classic) only. For activity relating to the new Projects experience, use the `projects_v2` event instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Projects" repository or organization permission. - description: A classic project was closed. + description: A project (classic) was closed. operationId: project/reopened externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#project @@ -53956,7 +56270,8 @@ x-webhooks: For activity related to pull request reviews, pull request review comments, pull request comments, or pull request review threads, use the `pull_request_review`, `pull_request_review_comment`, `issue_comment`, or `pull_request_review_thread` events instead. To subscribe to this event, a GitHub App must have at least read-level access for the "Pull requests" repository permission. - description: The title or body of a pull request was edited. + description: The title or body of a pull request was edited, or the base branch + of a pull request was changed. operationId: pull-request/edited externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#pull_request @@ -56385,11 +58700,9 @@ x-webhooks: repository-dispatch-sample.collected: post: summary: |- - This event occurs when a GitHub App sends a `POST` request to `/repos/{owner}/{repo}/dispatches`. For more information, see [the REST API documentation for creating a repository dispatch event](https://docs.github.com/rest/repos/repos#create-a-repository-dispatch-event). + This event occurs when a GitHub App sends a `POST` request to `/repos/{owner}/{repo}/dispatches`. For more information, see [the REST API documentation for creating a repository dispatch event](https://docs.github.com/rest/repos/repos#create-a-repository-dispatch-event). In the payload, the `action` will be the `event_type` that was specified in the `POST /repos/{owner}/{repo}/dispatches` request body. To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission. - description: The `event_type` that was specified in the `POST /repos/{owner}/{repo}/dispatches` - request body. operationId: repository-dispatch/sample.collected externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#repository_dispatch @@ -56774,7 +59087,7 @@ x-webhooks: For more information about repository rulesets, see "[Managing rulesets](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets)." For more information on managing rulesets via the APIs, see [Repository ruleset](https://docs.github.com/graphql/reference/objects#repositoryruleset) in the GraphQL documentation or "[Repository rules](https://docs.github.com/rest/repos/rules)" and "[Organization rules](https://docs.github.com/rest/orgs/rules) in the REST API documentation." - To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission. + To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository or organization permission. description: A repository ruleset was created. operationId: repository-ruleset/created externalDocs: @@ -56840,7 +59153,7 @@ x-webhooks: For more information about repository rulesets, see "[Managing rulesets](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets)." For more information on managing rulesets via the APIs, see [Repository ruleset](https://docs.github.com/graphql/reference/objects#repositoryruleset) in the GraphQL documentation or "[Repository rules](https://docs.github.com/rest/repos/rules)" and "[Organization rules](https://docs.github.com/rest/orgs/rules) in the REST API documentation." - To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission. + To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository or organization permission. description: A repository ruleset was deleted. operationId: repository-ruleset/deleted externalDocs: @@ -56906,7 +59219,7 @@ x-webhooks: For more information about repository rulesets, see "[Managing rulesets](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets)." For more information on managing rulesets via the APIs, see [Repository ruleset](https://docs.github.com/graphql/reference/objects#repositoryruleset) in the GraphQL documentation or "[Repository rules](https://docs.github.com/rest/repos/rules)" and "[Organization rules](https://docs.github.com/rest/orgs/rules) in the REST API documentation." - To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission. + To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository or organization permission. description: A repository ruleset was edited. operationId: repository-ruleset/edited externalDocs: @@ -57695,10 +60008,76 @@ x-webhooks: - repository - organization - app + secret-scanning-alert-validated: + post: + summary: |- + This event occurs when there is activity relating to a secret scanning alert. For more information about secret scanning, see "[About secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning)." For information about the API to manage secret scanning alerts, see "[Secret scanning](https://docs.github.com/rest/secret-scanning)" in the REST API documentation. + + For activity relating to secret scanning alert locations, use the `secret_scanning_alert_location` event. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Secret scanning alerts" repository permission. + description: A secret scanning alert was validated. + operationId: secret-scanning-alert/validated + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#secret_scanning_alert + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-secret-scanning-alert-validated" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: secret_scanning_alert + supported-webhook-types: + - repository + - organization + - app security-advisory-published: post: summary: |- - This event occurs when there is activity relating to a security advisory that was reviewed by GitHub. A GitHub-reviewed security advisory provides information about security-related vulnerabilities in software on GitHub. For more information about security advisories, see "[About GitHub Security Advisories for repositories](https://docs.github.com/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)." For information about the API to manage security advisories, see [the GraphQL documentation](https://docs.github.com/graphql/reference/objects#securityadvisory). + This event occurs when there is activity relating to a global security advisory that was reviewed by GitHub. A GitHub-reviewed global security advisory provides information about security vulnerabilities or malware that have been mapped to packages in ecosystems we support. For more information about global security advisories, see "[About global security advisories](https://docs.github.com/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-global-security-advisories)." For information about the API to manage security advisories, see [the REST API documentation](https://docs.github.com/rest/security-advisories/global-advisories) or [the GraphQL documentation](https://docs.github.com/graphql/reference/objects#securityadvisory). GitHub Dependabot alerts are also powered by the security advisory dataset. For more information, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." description: A security advisory was published to the GitHub community. @@ -57760,11 +60139,10 @@ x-webhooks: security-advisory-updated: post: summary: |- - This event occurs when there is activity relating to a security advisory that was reviewed by GitHub. A GitHub-reviewed security advisory provides information about security-related vulnerabilities in software on GitHub. For more information about security advisories, see "[About GitHub Security Advisories for repositories](https://docs.github.com/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)." For information about the API to manage security advisories, see [the GraphQL documentation](https://docs.github.com/graphql/reference/objects#securityadvisory). + This event occurs when there is activity relating to a global security advisory that was reviewed by GitHub. A GitHub-reviewed global security advisory provides information about security vulnerabilities or malware that have been mapped to packages in ecosystems we support. For more information about global security advisories, see "[About global security advisories](https://docs.github.com/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-global-security-advisories)." For information about the API to manage security advisories, see [the REST API documentation](https://docs.github.com/rest/security-advisories/global-advisories) or [the GraphQL documentation](https://docs.github.com/graphql/reference/objects#securityadvisory). GitHub Dependabot alerts are also powered by the security advisory dataset. For more information, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." - description: The metadata or description of a security advisory was changed, - or the security advisory was withdrawn. + description: The metadata or description of a security advisory was changed. operationId: security-advisory/updated externalDocs: url: https://docs.github.com/webhooks/webhook-events-and-payloads#security_advisory @@ -57823,7 +60201,7 @@ x-webhooks: security-advisory-withdrawn: post: summary: |- - This event occurs when there is activity relating to a security advisory that was reviewed by GitHub. A GitHub-reviewed security advisory provides information about security-related vulnerabilities in software on GitHub. For more information about security advisories, see "[About GitHub Security Advisories for repositories](https://docs.github.com/code-security/repository-security-advisories/about-github-security-advisories-for-repositories)." For information about the API to manage security advisories, see [the GraphQL documentation](https://docs.github.com/graphql/reference/objects#securityadvisory). + This event occurs when there is activity relating to a global security advisory that was reviewed by GitHub. A GitHub-reviewed global security advisory provides information about security vulnerabilities or malware that have been mapped to packages in ecosystems we support. For more information about global security advisories, see "[About global security advisories](https://docs.github.com/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-global-security-advisories)." For information about the API to manage security advisories, see [the REST API documentation](https://docs.github.com/rest/security-advisories/global-advisories) or [the GraphQL documentation](https://docs.github.com/graphql/reference/objects#securityadvisory). GitHub Dependabot alerts are also powered by the security advisory dataset. For more information, see "[About Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)." description: A previously published security advisory was withdrawn. @@ -59555,6 +61933,7 @@ components: hub_url: type: string format: uri-template + deprecated: true issue_search_url: type: string format: uri-template @@ -59628,7 +62007,6 @@ components: - followers_url - following_url - gists_url - - hub_url - issue_search_url - issues_url - keys_url @@ -60614,6 +62992,13 @@ components: enum: - read - write + codespaces: + type: string + description: The level of permission to grant the access token to create, + edit, delete, and list Codespaces. + enum: + - read + - write contents: type: string description: The level of permission to grant the access token for repository @@ -60621,6 +63006,13 @@ components: enum: - read - write + dependabot_secrets: + type: string + description: The leve of permission to grant the access token to manage + Dependabot secrets. + enum: + - read + - write deployments: type: string description: The level of permission to grant the access token for deployments @@ -60670,6 +63062,13 @@ components: enum: - read - write + repository_custom_properties: + type: string + description: The level of permission to grant the access token to view and + edit custom properties for a repository, when allowed by the property. + enum: + - read + - write repository_hooks: type: string description: The level of permission to grant the access token to manage @@ -60750,11 +63149,32 @@ components: organization_custom_roles: type: string description: The level of permission to grant the access token for custom - repository roles management. This property is in beta and is subject to - change. + repository roles management. + enum: + - read + - write + organization_custom_org_roles: + type: string + description: The level of permission to grant the access token for custom + organization roles management. + enum: + - read + - write + organization_custom_properties: + type: string + description: The level of permission to grant the access token for custom + property management. enum: - read - write + - admin + organization_copilot_seat_management: + type: string + description: The level of permission to grant the access token for managing + access to GitHub Copilot for members of an organization with a Copilot + Business subscription. This property is in beta and is subject to change. + enum: + - write organization_announcement_banners: type: string description: The level of permission to grant the access token to view and @@ -60762,6 +63182,12 @@ components: enum: - read - write + organization_events: + type: string + description: The level of permission to grant the access token to view events + triggered by an activity in an organization. + enum: + - read organization_hooks: type: string description: The level of permission to grant the access token to manage @@ -60833,6 +63259,54 @@ components: enum: - read - write + email_addresses: + type: string + description: The level of permission to grant the access token to manage + the email addresses belonging to a user. + enum: + - read + - write + followers: + type: string + description: The level of permission to grant the access token to manage + the followers belonging to a user. + enum: + - read + - write + git_ssh_keys: + type: string + description: The level of permission to grant the access token to manage + git SSH keys. + enum: + - read + - write + gpg_keys: + type: string + description: The level of permission to grant the access token to view and + manage GPG keys belonging to a user. + enum: + - read + - write + interaction_limits: + type: string + description: The level of permission to grant the access token to view and + manage interaction limits on a repository. + enum: + - read + - write + profile: + type: string + description: The level of permission to grant the access token to manage + the profile settings belonging to a user. + enum: + - write + starring: + type: string + description: The level of permission to grant the access token to list and + manage repositories a user is starring. + enum: + - read + - write example: contents: read issues: read @@ -60992,8 +63466,6 @@ components: example: octocat/Hello-World license: "$ref": "#/components/schemas/nullable-license-simple" - organization: - "$ref": "#/components/schemas/nullable-simple-user" forks: type: integer permissions: @@ -61190,8 +63662,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. + description: The size of the repository, in kilobytes. Size is calculated + hourly. When a repository is initially created, the size is 0. type: integer example: 108 default_branch: @@ -61270,270 +63742,6 @@ components: 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 - 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: @@ -61621,10 +63829,6 @@ components: 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: @@ -62373,10 +64577,7 @@ components: ## Attribution - This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - - [homepage]: http://contributor-covenant.org - [version]: http://contributor-covenant.org/version/1/4/ + This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4/). html_url: type: string format: uri @@ -63084,6 +65285,13 @@ components: type: string description: The comment that was optionally added when this alert was closed nullable: true + validity: + type: string + description: The token status as of the latest validity check. + enum: + - active + - inactive + - unknown actor: title: Actor description: Actor @@ -64671,6 +66879,12 @@ components: type: string example: - example.com + actions: + type: array + items: + type: string + example: + - example.com required: - verifiable_password_authentication security-and-analysis: @@ -64892,8 +67106,8 @@ components: 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. + description: The size of the repository, in kilobytes. Size is calculated + hourly. When a repository is initially created, the size is 0. type: integer default_branch: type: string @@ -65864,7 +68078,7 @@ components: description: The dismissal comment associated with the dismissal of the alert. nullable: true maxLength: 280 - code-scanning-alert-rule: + code-scanning-alert-rule-summary: type: object properties: id: @@ -65874,6 +68088,12 @@ components: name: type: string description: The name of the rule used to detect the alert. + tags: + nullable: true + type: array + description: A set of tags applicable for the rule. + items: + type: string severity: nullable: true type: string @@ -65895,24 +68115,6 @@ components: description: type: string description: A short description of the rule used to detect the alert. - full_description: - type: string - description: description of the rule used to detect the alert. - tags: - nullable: true - type: array - description: A set of tags applicable for the rule. - items: - type: string - help: - nullable: true - type: string - description: Detailed documentation for the rule as GitHub Flavored Markdown. - 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 @@ -65929,8 +68131,8 @@ components: code-scanning-ref: type: string description: |- - The full Git reference, formatted as `refs/heads/`, - `refs/pull//merge`, or `refs/pull//head`. + The Git reference, formatted as `refs/pull//merge`, `refs/pull//head`, + `refs/heads/` or simply ``. code-scanning-analysis-analysis-key: type: string description: Identifies the configuration under which the analysis was executed. @@ -66028,7 +68230,7 @@ components: dismissed_comment: "$ref": "#/components/schemas/code-scanning-alert-dismissed-comment" rule: - "$ref": "#/components/schemas/code-scanning-alert-rule" + "$ref": "#/components/schemas/code-scanning-alert-rule-summary" tool: "$ref": "#/components/schemas/code-scanning-analysis-tool" most_recent_instance: @@ -66387,8 +68589,8 @@ components: - key_id - key copilot-seat-breakdown: - title: Copilot for Business Seat Breakdown - description: The breakdown of Copilot for Business seats for the organization. + title: Copilot Business Seat Breakdown + description: The breakdown of Copilot Business seats for the organization. type: object properties: total: @@ -66415,9 +68617,9 @@ components: description: The number of seats that have not used Copilot during the current billing cycle. copilot-organization-details: - title: Copilot for Business Organization Details + title: Copilot Business Organization Details description: Information about the seat breakdown and policies set for an organization - with a Copilot for Business subscription. + with a Copilot Business subscription. type: object properties: seat_breakdown: @@ -66431,6 +68633,30 @@ components: - block - unconfigured - unknown + ide_chat: + type: string + description: The organization policy for allowing or disallowing organization + members to use Copilot Chat within their editor. + enum: + - enabled + - disabled + - unconfigured + platform_chat: + type: string + description: The organization policy for allowing or disallowing organization + members to use Copilot features within github.com. + enum: + - enabled + - disabled + - unconfigured + cli: + type: string + description: The organization policy for allowing or disallowing organization + members to use Copilot within their CLI. + enum: + - enabled + - disabled + - unconfigured seat_management_setting: type: string description: The mode of assigning new seats. @@ -66705,16 +68931,16 @@ components: - created_at - updated_at copilot-seat-details: - title: Copilot for Business Seat Detail - description: Information about a Copilot for Business seat assignment for a - user, team, or organization. + title: Copilot Business Seat Detail + description: Information about a Copilot Business seat assignment for a user, + team, or organization. type: object properties: assignee: type: object description: The assignee that has been granted access to GitHub Copilot. additionalProperties: true - enum: + oneOf: - "$ref": "#/components/schemas/simple-user" - "$ref": "#/components/schemas/team" - "$ref": "#/components/schemas/organization" @@ -66984,8 +69210,8 @@ components: 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. + description: The size of the repository, in kilobytes. Size is calculated + hourly. When a repository is initially created, the size is 0. type: integer default_branch: type: string @@ -67483,6 +69709,56 @@ components: - url - created_at - updated_at + organization-fine-grained-permission: + title: Organization Fine-Grained Permission + description: A fine-grained permission that protects organization resources. + type: object + properties: + name: + type: string + description: + type: string + required: + - name + - description + organization-role: + title: Organization Role + description: Organization roles + type: object + properties: + id: + description: The unique identifier of the role. + type: integer + name: + description: The name of the role. + type: string + description: + description: A short description about who this role is for or what permissions + it grants. + type: string + nullable: true + permissions: + description: A list of permissions included in this role. + type: array + items: + type: string + organization: + "$ref": "#/components/schemas/nullable-simple-user" + created_at: + description: The date and time the role was created. + type: string + format: date-time + updated_at: + description: The date and time the role was last updated. + type: string + format: date-time + required: + - id + - name + - permissions + - organization + - created_at + - updated_at package-version: title: Package Version description: A version of a software package @@ -67785,2225 +70061,894 @@ components: - columns_url - created_at - updated_at - repository-rule-enforcement: - type: string - description: The enforcement level of the ruleset. `evaluate` allows admins - to test rules before enforcing them. Admins can view insights on the Rule - Insights page (`evaluate` is only available with GitHub Enterprise). - enum: - - disabled - - active - - evaluate - repository-ruleset-bypass-actor: - title: Repository Ruleset Bypass Actor + org-custom-property: + title: Organization Custom Property + description: Custom property defined on an organization type: object - description: An actor that can bypass rules in a ruleset - required: - - actor_id - - actor_type - - bypass_mode properties: - actor_id: - type: integer - description: The ID of the actor that can bypass a ruleset - actor_type: + property_name: + type: string + description: The name of the property + value_type: type: string + example: single_select enum: - - RepositoryRole - - Team - - Integration - - OrganizationAdmin - description: The type of actor that can bypass a ruleset - bypass_mode: + - string + - single_select + description: The type of the value for the property + required: + type: boolean + description: Whether the property is required. + default_value: + oneOf: + - type: string + - type: array + items: + type: string + nullable: true + description: Default value of the property + description: type: string - description: When the specified actor can bypass the ruleset. `pull_request` - means that an actor can only bypass rules on pull requests. + nullable: true + description: Short description of the property + allowed_values: + type: array + items: + type: string + maxLength: 75 + maxItems: 200 + nullable: true + description: |- + An ordered list of the allowed values of the property. + The property can have up to 200 allowed values. + values_editable_by: + type: string + nullable: true enum: - - always - - pull_request - repository-ruleset-conditions: - title: Repository ruleset conditions for ref names - type: object - description: Parameters for a repository ruleset ref name condition - properties: - ref_name: - type: object - properties: - include: - type: array - description: Array of ref names or patterns to include. One of these - patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` - to include the default branch or `~ALL` to include all branches. - items: - type: string - exclude: - type: array - description: Array of ref names or patterns to exclude. The condition - will not pass if any of these patterns match. - items: - type: string - repository-ruleset-conditions-repository-name-target: - title: Repository ruleset conditions for repository names - type: object - description: Parameters for a repository name condition - properties: - repository_name: - type: object - properties: - include: - type: array - description: Array of repository names or patterns to include. One of - these patterns must match for the condition to pass. Also accepts - `~ALL` to include all repositories. - items: - type: string - exclude: - type: array - description: Array of repository names or patterns to exclude. The condition - will not pass if any of these patterns match. - items: - type: string - protected: - type: boolean - description: Whether renaming of target repositories is prevented. - required: - - repository_name - repository-ruleset-conditions-repository-id-target: - title: Repository ruleset conditions for repository IDs - type: object - description: Parameters for a repository ID condition - properties: - repository_id: - type: object - properties: - repository_ids: - type: array - description: The repository IDs that the ruleset applies to. One of - these IDs must match for the condition to pass. - items: - type: integer + - org_actors + - org_and_repo_actors + example: org_actors + description: Who can edit the values of the property required: - - repository_id - org-ruleset-conditions: - title: Organization ruleset conditions - type: object - description: 'Conditions for an organization ruleset. The conditions object - should contain both `repository_name` and `ref_name` properties or both `repository_id` - and `ref_name` properties. - -' - oneOf: - - type: object - title: repository_name_and_ref_name - description: Conditions to target repositories by name and refs by name - allOf: - - "$ref": "#/components/schemas/repository-ruleset-conditions" - - "$ref": "#/components/schemas/repository-ruleset-conditions-repository-name-target" - - type: object - title: repository_id_and_ref_name - description: Conditions to target repositories by id and refs by name - allOf: - - "$ref": "#/components/schemas/repository-ruleset-conditions" - - "$ref": "#/components/schemas/repository-ruleset-conditions-repository-id-target" - repository-rule-creation: - title: creation - description: Only allow users with bypass permission to create matching refs. + - property_name + - value_type + custom-property-value: + title: Custom Property Value + description: Custom property name and associated value type: object - required: - - type properties: - type: + property_name: type: string - enum: - - creation - repository-rule-update: - title: update - description: Only allow users with bypass permission to update matching refs. - type: object + description: The name of the property + value: + oneOf: + - type: string + - type: array + items: + type: string + description: The value assigned to the property + nullable: true required: - - type - properties: - type: - type: string - enum: - - update - parameters: - type: object - properties: - update_allows_fetch_and_merge: - type: boolean - description: Branch can pull changes from its upstream repository - required: - - update_allows_fetch_and_merge - repository-rule-deletion: - title: deletion - description: Only allow users with bypass permissions to delete matching refs. + - property_name + - value + org-repo-custom-property-values: + title: Organization Repository Custom Property Values + description: List of custom property values for a repository type: object - required: - - type properties: - type: + repository_id: + type: integer + example: 1296269 + repository_name: type: string - enum: - - deletion - repository-rule-required-linear-history: - title: required_linear_history - description: Prevent merge commits from being pushed to matching branches. - type: object - required: - - type - properties: - type: + example: Hello-World + repository_full_name: type: string - enum: - - required_linear_history - repository-rule-required-deployments: - title: required_deployments - description: Choose which environments must be successfully deployed to before - branches can be merged into a branch that matches this rule. - type: object + example: octocat/Hello-World + properties: + type: array + items: + "$ref": "#/components/schemas/custom-property-value" + description: List of custom property names and associated values required: - - type - properties: - type: - type: string - enum: - - required_deployments - parameters: - type: object - properties: - required_deployment_environments: - type: array - description: The environments that must be successfully deployed to - before branches can be merged. - items: - type: string - required: - - required_deployment_environments - repository-rule-required-signatures: - title: required_signatures - description: Commits pushed to matching branches must have verified signatures. + - repository_id + - repository_name + - repository_full_name + - properties + nullable-repository: + title: Repository + description: A repository on GitHub. type: object - required: - - type properties: - type: + id: + description: Unique identifier of the repository + example: 42 + type: integer + node_id: type: string - enum: - - required_signatures - repository-rule-pull-request: - title: pull_request - description: Require all commits be made to a non-target branch and submitted - via a pull request before they can be merged. - type: object - required: - - type - properties: - type: + example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: + description: The name of the repository. type: string - enum: - - pull_request - parameters: + example: Team Environment + full_name: + type: string + example: octocat/Hello-World + license: + "$ref": "#/components/schemas/nullable-license-simple" + forks: + type: integer + permissions: type: object properties: - dismiss_stale_reviews_on_push: + admin: type: boolean - description: New, reviewable commits pushed will dismiss previous pull - request review approvals. - require_code_owner_review: + pull: type: boolean - description: Require an approving review in pull requests that modify - files that have a designated code owner. - require_last_push_approval: + triage: type: boolean - description: Whether the most recent reviewable push must be approved - by someone other than the person who pushed it. - required_approving_review_count: - type: integer - description: The number of approving reviews that are required before - a pull request can be merged. - minimum: 0 - maximum: 10 - required_review_thread_resolution: + push: + type: boolean + maintain: type: boolean - description: All conversations on code must be resolved before a pull - request can be merged. required: - - dismiss_stale_reviews_on_push - - require_code_owner_review - - require_last_push_approval - - required_approving_review_count - - required_review_thread_resolution - repository-rule-params-status-check-configuration: - title: StatusCheckConfiguration - description: Required status check - type: object - properties: - context: + - 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 - description: The status check context name that must be present on the commit. - integration_id: - type: integer - description: The optional integration ID that this status check must originate - from. - required: - - context - repository-rule-required-status-checks: - title: required_status_checks - description: Choose which status checks must pass before branches can be merged - into a branch that matches this rule. When enabled, commits must first be - pushed to another branch, then merged or pushed directly to a branch that - matches this rule after status checks have passed. - type: object - required: - - type - properties: - type: + format: uri + example: https://github.com/octocat/Hello-World + description: type: string - enum: - - required_status_checks - parameters: - type: object - properties: - required_status_checks: - type: array - description: Status checks that are required. - items: - "$ref": "#/components/schemas/repository-rule-params-status-check-configuration" - strict_required_status_checks_policy: - type: boolean - description: Whether pull requests targeting a matching branch must - be tested with the latest code. This setting will not take effect - unless at least one status check is enabled. - required: - - required_status_checks - - strict_required_status_checks_policy - repository-rule-non-fast-forward: - title: non_fast_forward - description: Prevent users with push access from force pushing to branches. - type: object - required: - - type - properties: - type: + example: This your first repo! + nullable: true + fork: + type: boolean + url: type: string - enum: - - non_fast_forward - repository-rule-commit-message-pattern: - title: commit_message_pattern - description: Parameters to be used for the commit_message_pattern rule - type: object - required: - - type - properties: - type: + format: uri + example: https://api.github.com/repos/octocat/Hello-World + archive_url: type: string - enum: - - commit_message_pattern - parameters: - type: object - properties: - name: - type: string - description: How this rule will appear to users. - negate: - type: boolean - description: If true, the rule will fail if the pattern matches. - operator: - type: string - description: The operator to use for matching. - enum: - - starts_with - - ends_with - - contains - - regex - pattern: - type: string - description: The pattern to match with. - required: - - operator - - pattern - repository-rule-commit-author-email-pattern: - title: commit_author_email_pattern - description: Parameters to be used for the commit_author_email_pattern rule - type: object - required: - - type - properties: - type: + example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + assignees_url: type: string - enum: - - commit_author_email_pattern - parameters: - type: object - properties: - name: - type: string - description: How this rule will appear to users. - negate: - type: boolean - description: If true, the rule will fail if the pattern matches. - operator: - type: string - description: The operator to use for matching. - enum: - - starts_with - - ends_with - - contains - - regex - pattern: - type: string - description: The pattern to match with. - required: - - operator - - pattern - repository-rule-committer-email-pattern: - title: committer_email_pattern - description: Parameters to be used for the committer_email_pattern rule - type: object - required: - - type - properties: - type: + example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} + blobs_url: type: string - enum: - - committer_email_pattern - parameters: - type: object - properties: - name: - type: string - description: How this rule will appear to users. - negate: - type: boolean - description: If true, the rule will fail if the pattern matches. - operator: - type: string - description: The operator to use for matching. - enum: - - starts_with - - ends_with - - contains - - regex - pattern: - type: string - description: The pattern to match with. - required: - - operator - - pattern - repository-rule-branch-name-pattern: - title: branch_name_pattern - description: Parameters to be used for the branch_name_pattern rule - type: object - required: - - type - properties: - type: + example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + branches_url: type: string - enum: - - branch_name_pattern - parameters: - type: object - properties: - name: - type: string - description: How this rule will appear to users. - negate: - type: boolean - description: If true, the rule will fail if the pattern matches. - operator: - type: string - description: The operator to use for matching. - enum: - - starts_with - - ends_with - - contains - - regex - pattern: - type: string - description: The pattern to match with. - required: - - operator - - pattern - repository-rule-tag-name-pattern: - title: tag_name_pattern - description: Parameters to be used for the tag_name_pattern rule - type: object - required: - - type - properties: - type: + example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} + collaborators_url: type: string - enum: - - tag_name_pattern - parameters: - type: object - properties: - name: - type: string - description: How this rule will appear to users. - negate: - type: boolean - description: If true, the rule will fail if the pattern matches. - operator: - type: string - description: The operator to use for matching. - enum: - - starts_with - - ends_with - - contains - - regex - pattern: - type: string - description: The pattern to match with. - required: - - operator - - pattern - repository-rule: - title: Repository Rule - type: object - description: A repository rule. - oneOf: - - "$ref": "#/components/schemas/repository-rule-creation" - - "$ref": "#/components/schemas/repository-rule-update" - - "$ref": "#/components/schemas/repository-rule-deletion" - - "$ref": "#/components/schemas/repository-rule-required-linear-history" - - "$ref": "#/components/schemas/repository-rule-required-deployments" - - "$ref": "#/components/schemas/repository-rule-required-signatures" - - "$ref": "#/components/schemas/repository-rule-pull-request" - - "$ref": "#/components/schemas/repository-rule-required-status-checks" - - "$ref": "#/components/schemas/repository-rule-non-fast-forward" - - "$ref": "#/components/schemas/repository-rule-commit-message-pattern" - - "$ref": "#/components/schemas/repository-rule-commit-author-email-pattern" - - "$ref": "#/components/schemas/repository-rule-committer-email-pattern" - - "$ref": "#/components/schemas/repository-rule-branch-name-pattern" - - "$ref": "#/components/schemas/repository-rule-tag-name-pattern" - repository-ruleset: - title: Repository ruleset - type: object - description: A set of rules to apply when specified conditions are met. - required: - - id - - name - - source - - enforcement - properties: - id: - type: integer - description: The ID of the ruleset - name: + example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + comments_url: type: string - description: The name of the ruleset - target: + example: http://api.github.com/repos/octocat/Hello-World/comments{/number} + commits_url: type: string - description: The target of the ruleset - enum: - - branch - - tag - source_type: + example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} + compare_url: type: string - description: The type of the source of the ruleset - enum: - - Repository - - Organization - source: + example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + contents_url: type: string - description: The name of the source - enforcement: - "$ref": "#/components/schemas/repository-rule-enforcement" - bypass_actors: - type: array - description: The actors that can bypass the rules in this ruleset - items: - "$ref": "#/components/schemas/repository-ruleset-bypass-actor" - current_user_can_bypass: + example: http://api.github.com/repos/octocat/Hello-World/contents/{+path} + contributors_url: type: string - description: |- - The bypass type of the user making the API request for this ruleset. This field is only returned when - querying the repository-level endpoint. - enum: - - always - - pull_requests_only - - never - node_id: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/contributors + deployments_url: type: string - _links: - type: object - properties: - self: - type: object - properties: - href: - type: string - description: The URL of the ruleset - html: - type: object - properties: - href: - type: string - description: The html URL of the ruleset - conditions: - anyOf: - - "$ref": "#/components/schemas/repository-ruleset-conditions" - - "$ref": "#/components/schemas/org-ruleset-conditions" - rules: - type: array - items: - "$ref": "#/components/schemas/repository-rule" - created_at: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/deployments + downloads_url: type: string - format: date-time - updated_at: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/downloads + events_url: type: string - format: date-time - repository-advisory-vulnerability: - description: A product affected by the vulnerability detailed in a repository - security advisory. - type: object - properties: - package: - description: The name of the package affected by the vulnerability. - type: object - nullable: true - properties: - ecosystem: - "$ref": "#/components/schemas/security-advisory-ecosystems" - name: - type: string - description: The unique package name within its ecosystem. - nullable: true - required: - - ecosystem - - name - vulnerable_version_range: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/events + forks_url: type: string - description: The range of the package versions affected by the vulnerability. - nullable: true - patched_versions: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/forks + git_commits_url: type: string - description: The package version(s) that resolve the vulnerability. - nullable: true - vulnerable_functions: - type: array - description: The functions in the package that are affected. - nullable: true - items: - type: string - required: - - package - - vulnerable_version_range - - patched_versions - - vulnerable_functions - additionalProperties: false - repository-advisory-credit: - description: A credit given to a user for a repository security advisory. - type: object - properties: - user: - "$ref": "#/components/schemas/simple-user" - type: - "$ref": "#/components/schemas/security-advisory-credit-types" - state: + example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + git_refs_url: type: string - description: The state of the user's acceptance of the credit. - enum: - - accepted - - declined - - pending - required: - - user - - type - - state - additionalProperties: false - repository-advisory: - description: A repository security advisory. - type: object - properties: - ghsa_id: + example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + git_tags_url: type: string - description: The GitHub Security Advisory ID. - readOnly: true - cve_id: + example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + git_url: type: string - description: The Common Vulnerabilities and Exposures (CVE) ID. - nullable: true - url: + example: git:github.com/octocat/Hello-World.git + issue_comment_url: type: string - description: The API URL for the advisory. - html_url: + 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 - description: The URL for the advisory. - readOnly: true - summary: + example: http://api.github.com/repos/octocat/Hello-World/languages + merges_url: type: string - description: A short summary of the advisory. - maxLength: 1024 - description: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/merges + milestones_url: type: string - description: A detailed description of what the advisory entails. - maxLength: 65535 - nullable: true - severity: + example: http://api.github.com/repos/octocat/Hello-World/milestones{/number} + notifications_url: type: string - description: The severity of the advisory. + 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 - enum: - - critical - - high - - medium - - low - author: - readOnly: 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 - description: The author of the advisory. - allOf: - - "$ref": "#/components/schemas/simple-user" - publisher: - readOnly: true + language: + type: string nullable: true - description: The publisher of the advisory. - allOf: - - "$ref": "#/components/schemas/simple-user" - identifiers: + 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, in kilobytes. 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: object - properties: - type: - type: string - description: The type of identifier. - enum: - - CVE - - GHSA - value: - type: string - description: The identifier value. - required: - - type - - value - readOnly: true - state: + 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 + deprecated: true + has_discussions: + description: Whether discussions are enabled. + default: false + 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 - description: The state of the advisory. - enum: - - published - - closed - - withdrawn - - draft - - triage - created_at: + pushed_at: type: string format: date-time - description: The date and time of when the advisory was created, in ISO - 8601 format. - readOnly: true + example: '2011-01-26T19:06:43Z' nullable: true - updated_at: + created_at: type: string format: date-time - description: The date and time of when the advisory was last updated, in - ISO 8601 format. - readOnly: true + example: '2011-01-26T19:01:12Z' nullable: true - published_at: + updated_at: type: string format: date-time - description: The date and time of when the advisory was published, in ISO - 8601 format. - readOnly: true + example: '2011-01-26T19:14:43Z' nullable: true - closed_at: - type: string - format: date-time - description: The date and time of when the advisory was closed, in ISO 8601 - format. - readOnly: true - nullable: true - withdrawn_at: + allow_rebase_merge: + description: Whether to allow rebase merges for pull requests. + default: true + type: boolean + example: true + temp_clone_token: type: string - format: date-time - description: The date and time of when the advisory was withdrawn, in ISO - 8601 format. - readOnly: true - nullable: true - submission: - type: object - nullable: true - readOnly: true - properties: - accepted: - type: boolean - description: Whether a private vulnerability report was accepted by - the repository's administrators. - readOnly: true - required: - - accepted - vulnerabilities: - type: array - nullable: true - items: - "$ref": "#/components/schemas/repository-advisory-vulnerability" - cvss: - type: object - nullable: true - properties: - vector_string: - type: string - description: The CVSS vector. - nullable: true - score: - type: number - description: The CVSS score. - minimum: 0 - maximum: 10 - nullable: true - readOnly: true - required: - - vector_string - - score - cwes: - type: array - nullable: true - items: - type: object - properties: - cwe_id: - type: string - description: The Common Weakness Enumeration (CWE) identifier. - name: - type: string - description: The name of the CWE. - readOnly: true - required: - - cwe_id - - name - readOnly: true - cwe_ids: - type: array - description: A list of only the CWE IDs. - nullable: true - items: - type: string - credits: - type: array - nullable: true - items: - type: object - properties: - login: - type: string - description: The username of the user credited. - type: - "$ref": "#/components/schemas/security-advisory-credit-types" - credits_detailed: - type: array - nullable: true - items: - "$ref": "#/components/schemas/repository-advisory-credit" - readOnly: true - collaborating_users: - type: array - description: A list of users that collaborate on the advisory. - nullable: true - items: - "$ref": "#/components/schemas/simple-user" - collaborating_teams: - type: array - description: A list of teams that collaborate on the advisory. - nullable: true - items: - "$ref": "#/components/schemas/team" - private_fork: - readOnly: true - nullable: true - description: A temporary private fork of the advisory's repository for collaborating - on a fix. - allOf: - - "$ref": "#/components/schemas/simple-repository" + 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 + 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: - - ghsa_id - - cve_id - - url - - html_url - - summary + - archive_url + - assignees_url + - blobs_url + - branches_url + - collaborators_url + - comments_url + - commits_url + - compare_url + - contents_url + - contributors_url + - deployments_url - description - - severity - - author - - publisher - - identifiers - - state + - 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 - - published_at - - closed_at - - withdrawn_at - - submission - - vulnerabilities - - cvss - - cwes - - cwe_ids - - credits - - credits_detailed - - collaborating_users - - collaborating_teams - - private_fork - additionalProperties: false - team-simple: - title: Team Simple - description: Groups of organization members that gives permissions on specified - repositories. + nullable: true + code-of-conduct-simple: + title: Code Of Conduct Simple + description: Code of Conduct Simple 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: + example: https://api.github.com/repos/github/docs/community/code_of_conduct + key: type: string - example: https://api.github.com/organizations/1/team/1/members{/member} + example: citizen_code_of_conduct 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 - notification_setting: - description: The notification setting the team has set type: string - example: notifications_enabled + example: Citizen Code of Conduct html_url: type: string + nullable: true 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 + example: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md required: - - id - - node_id - url - - members_url + - key - name - - description - - permission - html_url - - repositories_url - - slug - 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. - ubuntu_4_core: - type: integer - description: Total minutes used on Ubuntu 4 core runner machines. - ubuntu_8_core: - type: integer - description: Total minutes used on Ubuntu 8 core runner machines. - ubuntu_16_core: - type: integer - description: Total minutes used on Ubuntu 16 core runner machines. - ubuntu_32_core: - type: integer - description: Total minutes used on Ubuntu 32 core runner machines. - ubuntu_64_core: - type: integer - description: Total minutes used on Ubuntu 64 core runner machines. - windows_4_core: - type: integer - description: Total minutes used on Windows 4 core runner machines. - windows_8_core: - type: integer - description: Total minutes used on Windows 8 core runner machines. - windows_16_core: - type: integer - description: Total minutes used on Windows 16 core runner machines. - windows_32_core: - type: integer - description: Total minutes used on Windows 32 core runner machines. - windows_64_core: - type: integer - description: Total minutes used on Windows 64 core runner machines. - macos_12_core: - type: integer - description: Total minutes used on macOS 12 core runner machines. - total: - type: integer - description: Total minutes used on all runner machines. - required: - - total_minutes_used - - total_paid_minutes_used - - included_minutes - - minutes_used_breakdown - 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. - required: - - total_gigabytes_bandwidth_used - - total_paid_gigabytes_bandwidth_used - - included_gigabytes_bandwidth - combined-billing-usage: - 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. - required: - - days_left_in_billing_cycle - - estimated_paid_storage_for_month - - estimated_storage_for_month - team-organization: - title: Team Organization - description: Team Organization + full-repository: + title: Full Repository + description: Full Repository type: object properties: - login: - type: string - example: github id: type: integer - example: 1 + example: 1296269 node_id: type: string - example: MDEyOk9yZ2FuaXphdGlvbjE= - url: + example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: type: string - format: uri - example: https://api.github.com/orgs/github - repos_url: + example: Hello-World + full_name: + type: string + example: octocat/Hello-World + owner: + "$ref": "#/components/schemas/simple-user" + private: + type: boolean + html_url: type: string format: uri - example: https://api.github.com/orgs/github/repos - events_url: + 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/orgs/github/events - hooks_url: + example: https://api.github.com/repos/octocat/Hello-World + archive_url: type: string - example: https://api.github.com/orgs/github/hooks - issues_url: + example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + assignees_url: type: string - example: https://api.github.com/orgs/github/issues - members_url: + example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} + blobs_url: type: string - example: https://api.github.com/orgs/github/members{/member} - public_members_url: + example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + branches_url: type: string - example: https://api.github.com/orgs/github/public_members{/member} - avatar_url: + example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} + collaborators_url: type: string - example: https://github.com/images/error/octocat_happy.gif - description: + example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + comments_url: type: string - example: A great organization - nullable: true - name: + example: http://api.github.com/repos/octocat/Hello-World/comments{/number} + commits_url: type: string - example: github - company: + example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} + compare_url: type: string - example: GitHub - blog: + 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://github.com/blog - location: + example: http://api.github.com/repos/octocat/Hello-World/contributors + deployments_url: type: string - example: San Francisco - email: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/deployments + downloads_url: type: string - format: email - example: octocat@github.com - twitter_username: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/downloads + events_url: type: string - example: github - nullable: true - is_verified: - type: boolean - example: true - has_organization_projects: - type: boolean - example: true - has_repository_projects: - type: boolean - example: true - public_repos: - type: integer - example: 2 - public_gists: - type: integer - example: 1 - followers: - type: integer - example: 20 - following: - type: integer - example: 0 - html_url: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/events + forks_url: type: string format: uri - example: https://github.com/octocat - created_at: + example: http://api.github.com/repos/octocat/Hello-World/forks + git_commits_url: type: string - format: date-time - example: '2008-01-14T04:33:35Z' - type: + example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + git_refs_url: type: string - example: Organization - total_private_repos: - type: integer - 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: + example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + git_tags_url: type: string - format: email - example: org@example.com - nullable: true - plan: - type: object - properties: - name: - type: string - space: - type: integer - private_repos: - type: integer - filled_seats: - type: integer - seats: - type: integer - required: - - name - - space - - private_repos - default_repository_permission: + example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + git_url: type: string - nullable: true - 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: + example: git:github.com/octocat/Hello-World.git + issue_comment_url: type: string - 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: + example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + issue_events_url: type: string - format: date-time - archived_at: + example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number} + issues_url: type: string - format: date-time - nullable: true - required: - - login - - url - - id - - node_id - - repos_url - - events_url - - hooks_url - - issues_url - - members_url - - public_members_url - - avatar_url - - description - - html_url - - has_organization_projects - - has_repository_projects - - public_repos - - public_gists - - followers - - following - - type - - created_at - - updated_at - - archived_at - team-full: - title: Full Team - description: Groups of organization members that gives permissions on specified - repositories. - type: object - properties: - id: - description: Unique identifier of the team - example: 42 - type: integer - node_id: + example: http://api.github.com/repos/octocat/Hello-World/issues{/number} + keys_url: type: string - example: MDQ6VGVhbTE= - url: - description: URL for the team - example: https://api.github.com/organizations/1/team/1 + 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 - html_url: + example: http://api.github.com/repos/octocat/Hello-World/languages + merges_url: type: string format: uri - example: https://github.com/orgs/rails/teams/core - name: - description: Name of the team - example: Developers + example: http://api.github.com/repos/octocat/Hello-World/merges + milestones_url: type: string - slug: + example: http://api.github.com/repos/octocat/Hello-World/milestones{/number} + notifications_url: type: string - example: justice-league - description: + example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + pulls_url: type: string - example: A great team. - nullable: true - privacy: - description: The level of privacy this team should have + example: http://api.github.com/repos/octocat/Hello-World/pulls{/number} + releases_url: type: string - enum: - - closed - - secret - example: closed - notification_setting: - description: The notification setting the team has set + example: http://api.github.com/repos/octocat/Hello-World/releases{/id} + ssh_url: type: string - enum: - - notifications_enabled - - notifications_disabled - example: notifications_enabled - permission: - description: Permission that the team will have for its repositories - example: push + example: git@github.com:octocat/Hello-World.git + stargazers_url: type: string - members_url: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/stargazers + statuses_url: type: string - example: https://api.github.com/organizations/1/team/1/members{/member} - repositories_url: + example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha} + subscribers_url: type: string format: uri - example: https://api.github.com/organizations/1/team/1/repos - parent: - "$ref": "#/components/schemas/nullable-team-simple" - members_count: - type: integer - example: 3 - repos_count: - type: integer - example: 10 - created_at: + example: http://api.github.com/repos/octocat/Hello-World/subscribers + subscription_url: type: string - format: date-time - example: '2017-07-14T16:53:42Z' - updated_at: + format: uri + example: http://api.github.com/repos/octocat/Hello-World/subscription + tags_url: type: string - format: date-time - example: '2017-08-17T12:37:15Z' - organization: - "$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 + format: uri + example: http://api.github.com/repos/octocat/Hello-World/tags + teams_url: type: string - required: - - id - - node_id - - url - - members_url - - name - - description - - permission - - html_url - - repositories_url - - slug - - created_at - - updated_at - - members_count - - repos_count - - organization - team-discussion: - title: Team Discussion - description: A team discussion is a persistent record of a free-form conversation - within a team. - type: object - properties: - author: - "$ref": "#/components/schemas/nullable-simple-user" - body: - description: The main text of the discussion. - example: Please suggest improvements to our workflow in comments. + format: uri + example: http://api.github.com/repos/octocat/Hello-World/teams + trees_url: type: string - body_html: + example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + clone_url: type: string - example: "

Hi! This is an area for us to collaborate as a team

" - body_version: - description: The current version of the body content. If provided, this - update operation will be rejected if the given version does not match - the latest version on the server. - example: 0307116bbf7ced493b8d8a346c650b71 + example: https://github.com/octocat/Hello-World.git + mirror_url: type: string - comments_count: - type: integer - example: 0 - comments_url: + format: uri + example: git:git.example.com/octocat/Hello-World + nullable: true + hooks_url: type: string format: uri - example: https://api.github.com/organizations/1/team/2343027/discussions/1/comments - created_at: + example: http://api.github.com/repos/octocat/Hello-World/hooks + svn_url: type: string - format: date-time - example: '2018-01-25T18:56:31Z' - last_edited_at: + format: uri + example: https://svn.github.com/octocat/Hello-World + homepage: type: string - format: date-time + format: uri + example: https://github.com nullable: true - html_url: + language: type: string - format: uri - example: https://github.com/orgs/github/teams/justice-league/discussions/1 - node_id: + 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, in kilobytes. Size is calculated + hourly. When a repository is initially created, the size is 0. + type: integer + example: 108 + default_branch: type: string - example: MDE0OlRlYW1EaXNjdXNzaW9uMQ== - number: - description: The unique sequence number of a team discussion. - example: 42 + example: master + open_issues_count: type: integer - pinned: - description: Whether or not this discussion should be pinned for easy retrieval. + example: 0 + is_template: + type: boolean example: true + topics: + type: array + items: + type: string + example: + - octocat + - atom + - electron + - API + has_issues: type: boolean - private: - description: Whether or not this discussion should be restricted to team - members and organization administrators. example: true + has_projects: type: boolean - team_url: - type: string - format: uri - example: https://api.github.com/organizations/1/team/2343027 - title: - description: The title of the discussion. - example: How can we improve our workflow? + example: true + has_wiki: + type: boolean + example: true + has_pages: + type: boolean + has_downloads: + type: boolean + example: true + has_discussions: + type: boolean + example: true + archived: + type: boolean + disabled: + type: boolean + description: Returns whether or not this repository disabled. + visibility: + description: 'The repository visibility: public, private, or internal.' type: string - updated_at: + example: public + pushed_at: type: string format: date-time - example: '2018-01-25T18:56:31Z' - url: - type: string - format: uri - example: https://api.github.com/organizations/1/team/2343027/discussions/1 - reactions: - "$ref": "#/components/schemas/reaction-rollup" - required: - - author - - body - - body_html - - body_version - - comments_count - - comments_url - - created_at - - last_edited_at - - html_url - - pinned - - private - - node_id - - number - - team_url - - title - - updated_at - - url - team-discussion-comment: - title: Team Discussion Comment - description: A reply to a discussion within a team. - type: object - properties: - author: - "$ref": "#/components/schemas/nullable-simple-user" - body: - description: The main text of the comment. - example: I agree with this suggestion. - type: string - body_html: - type: string - example: "

Do you like apples?

" - body_version: - description: The current version of the body content. If provided, this - update operation will be rejected if the given version does not match - the latest version on the server. - example: 0307116bbf7ced493b8d8a346c650b71 - type: string + example: '2011-01-26T19:06:43Z' created_at: type: string format: date-time - example: '2018-01-15T23:53:58Z' - last_edited_at: - type: string - format: date-time - nullable: true - discussion_url: - type: string - format: uri - example: https://api.github.com/organizations/1/team/2403582/discussions/1 - html_url: - type: string - format: uri - example: https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 - node_id: - type: string - example: MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= - number: - description: The unique sequence number of a team discussion comment. - example: 42 - type: integer + example: '2011-01-26T19:01:12Z' updated_at: type: string format: date-time - example: '2018-01-15T23:53:58Z' - url: - type: string - format: uri - example: https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 - reactions: - "$ref": "#/components/schemas/reaction-rollup" - required: - - author - - body - - body_html - - body_version - - created_at - - last_edited_at - - discussion_url - - html_url - - node_id - - number - - updated_at - - url - reaction: - title: Reaction - description: Reactions to conversations provide a way to help people express - their feelings more simply and effectively. - type: object - properties: - id: - type: integer - example: 1 - node_id: - type: string - example: MDg6UmVhY3Rpb24x - user: - "$ref": "#/components/schemas/nullable-simple-user" - content: - description: The reaction to use - example: heart - type: string - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - created_at: - type: string - format: date-time - example: '2016-05-20T20:09:31Z' - required: - - id - - node_id - - user - - content - - created_at - team-membership: - title: Team Membership - description: Team Membership - type: object - properties: - url: - type: string - format: uri - role: - description: The role of the user in the team. - enum: - - member - - maintainer - default: member - example: member - type: string - state: - description: The state of the user's membership in the team. - type: string - enum: - - active - - pending - required: - - role - - state - - url - team-project: - title: Team Project - description: A team's access to a project. - type: object - properties: - owner_url: - type: string - url: - type: string - html_url: - type: string - columns_url: - type: string - id: - type: integer - node_id: - type: string - name: - type: string - body: - type: string - nullable: true - number: - type: integer - state: - type: string - creator: - "$ref": "#/components/schemas/simple-user" - created_at: - type: string - updated_at: - type: string - organization_permission: - description: The organization permission for this project. Only present - when owner is an organization. - type: string - private: - description: Whether the project is private or not. Only present when owner - is an organization. - type: boolean + example: '2011-01-26T19:14:43Z' permissions: type: object properties: - read: - type: boolean - write: - type: boolean admin: type: boolean - required: - - read - - write - - admin - required: - - owner_url - - url - - html_url - - columns_url - - id - - node_id - - name - - body - - number - - state - - creator - - created_at - - updated_at - - permissions - nullable-repository: - title: Repository - description: A repository on GitHub. - 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: + maintain: type: boolean - pull: + push: type: boolean triage: type: boolean - push: - type: boolean - maintain: + pull: 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 - deprecated: true - has_discussions: - description: Whether discussions are enabled. - default: false - 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: - 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 + "$ref": "#/components/schemas/nullable-repository" temp_clone_token: type: string + nullable: true 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: + type: boolean + example: true 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 + example: true 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 + example: false squash_merge_commit_title: type: string + example: PR_TITLE enum: - PR_TITLE - COMMIT_OR_PR_TITLE @@ -70014,6 +70959,7 @@ components: - `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 @@ -70026,16 +70972,18 @@ components: - `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). + - `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 @@ -70046,34 +70994,48 @@ components: - `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 + example: true 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 + example: 42 network_count: type: integer + example: 0 + license: + "$ref": "#/components/schemas/nullable-license-simple" + organization: + "$ref": "#/components/schemas/nullable-simple-user" + parent: + "$ref": "#/components/schemas/repository" + source: + "$ref": "#/components/schemas/repository" + forks: + type: integer + master_branch: + type: string open_issues: type: integer watchers: type: integer - master_branch: - type: string - starred_at: - type: string - example: '"2020-07-09T00:17:42Z"' anonymous_access_enabled: + description: Whether anonymous git access is allowed. + default: true type: boolean - description: Whether anonymous git access is enabled for this repository + code_of_conduct: + "$ref": "#/components/schemas/code-of-conduct-simple" + security_and_analysis: + "$ref": "#/components/schemas/security-and-analysis" + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true required: - archive_url - assignees_url @@ -70126,11 +71088,11 @@ components: - forks - forks_count - git_url - - has_downloads - has_issues - has_projects - has_wiki - has_pages + - has_discussions - homepage - language - archived @@ -70148,632 +71110,1957 @@ components: - watchers_count - created_at - updated_at - nullable: true - team-repository: - title: Team Repository - description: A team's access to a repository. + - network_count + - subscribers_count + repository-rule-enforcement: + type: string + description: The enforcement level of the ruleset. `evaluate` allows admins + to test rules before enforcing them. Admins can view insights on the Rule + Insights page (`evaluate` is only available with GitHub Enterprise). + enum: + - disabled + - active + - evaluate + repository-ruleset-bypass-actor: + title: Repository Ruleset Bypass Actor type: object + description: An actor that can bypass rules in a ruleset + required: + - actor_id + - actor_type + - bypass_mode properties: - id: - description: Unique identifier of the repository - example: 42 + actor_id: type: integer - node_id: + description: The ID of the actor that can bypass a ruleset. If `actor_type` + is `OrganizationAdmin`, this should be `1`. + actor_type: type: string - example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + enum: + - RepositoryRole + - Team + - Integration + - OrganizationAdmin + description: The type of actor that can bypass a ruleset + bypass_mode: + type: string + description: When the specified actor can bypass the ruleset. `pull_request` + means that an actor can only bypass rules on pull requests. + enum: + - always + - pull_request + repository-ruleset-conditions: + title: Repository ruleset conditions for ref names + type: object + description: Parameters for a repository ruleset ref name condition + properties: + ref_name: + type: object + properties: + include: + type: array + description: Array of ref names or patterns to include. One of these + patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` + to include the default branch or `~ALL` to include all branches. + items: + type: string + exclude: + type: array + description: Array of ref names or patterns to exclude. The condition + will not pass if any of these patterns match. + items: + type: string + repository-ruleset-conditions-repository-name-target: + title: Repository ruleset conditions for repository names + type: object + description: Parameters for a repository name condition + properties: + repository_name: + type: object + properties: + include: + type: array + description: Array of repository names or patterns to include. One of + these patterns must match for the condition to pass. Also accepts + `~ALL` to include all repositories. + items: + type: string + exclude: + type: array + description: Array of repository names or patterns to exclude. The condition + will not pass if any of these patterns match. + items: + type: string + protected: + type: boolean + description: Whether renaming of target repositories is prevented. + required: + - repository_name + repository-ruleset-conditions-repository-id-target: + title: Repository ruleset conditions for repository IDs + type: object + description: Parameters for a repository ID condition + properties: + repository_id: + type: object + properties: + repository_ids: + type: array + description: The repository IDs that the ruleset applies to. One of + these IDs must match for the condition to pass. + items: + type: integer + required: + - repository_id + repository-ruleset-conditions-repository-property-spec: + title: Repository ruleset property targeting definition + type: object + description: Parameters for a targeting a repository property + properties: name: - description: The name of the repository. type: string - example: Team Environment - full_name: + description: The name of the repository property to target + property_values: + type: array + description: The values to match for the repository property + items: + type: string + required: + - name + - property_values + repository-ruleset-conditions-repository-property-target: + title: Repository ruleset conditions for repository properties + type: object + description: Parameters for a repository property condition + properties: + repository_property: + type: object + properties: + include: + type: array + description: The repository properties and values to include. All of + these properties must match for the condition to pass. + items: + "$ref": "#/components/schemas/repository-ruleset-conditions-repository-property-spec" + exclude: + type: array + description: The repository properties and values to exclude. The condition + will not pass if any of these properties match. + items: + "$ref": "#/components/schemas/repository-ruleset-conditions-repository-property-spec" + required: + - repository_property + org-ruleset-conditions: + title: Organization ruleset conditions + type: object + description: 'Conditions for an organization ruleset. The conditions object + should contain both `repository_name` and `ref_name` properties or both `repository_id` + and `ref_name` properties. + + ' + oneOf: + - type: object + title: repository_name_and_ref_name + description: Conditions to target repositories by name and refs by name + allOf: + - "$ref": "#/components/schemas/repository-ruleset-conditions" + - "$ref": "#/components/schemas/repository-ruleset-conditions-repository-name-target" + - type: object + title: repository_id_and_ref_name + description: Conditions to target repositories by id and refs by name + allOf: + - "$ref": "#/components/schemas/repository-ruleset-conditions" + - "$ref": "#/components/schemas/repository-ruleset-conditions-repository-id-target" + - type: object + title: repository_property_and_ref_name + description: Conditions to target repositories by property and refs by name + allOf: + - "$ref": "#/components/schemas/repository-ruleset-conditions" + - "$ref": "#/components/schemas/repository-ruleset-conditions-repository-property-target" + repository-rule-creation: + title: creation + description: Only allow users with bypass permission to create matching refs. + type: object + required: + - type + properties: + type: type: string - example: octocat/Hello-World - license: - "$ref": "#/components/schemas/nullable-license-simple" - forks: + enum: + - creation + repository-rule-update: + title: update + description: Only allow users with bypass permission to update matching refs. + type: object + required: + - type + properties: + type: + type: string + enum: + - update + parameters: + type: object + properties: + update_allows_fetch_and_merge: + type: boolean + description: Branch can pull changes from its upstream repository + required: + - update_allows_fetch_and_merge + repository-rule-deletion: + title: deletion + description: Only allow users with bypass permissions to delete matching refs. + type: object + required: + - type + properties: + type: + type: string + enum: + - deletion + repository-rule-required-linear-history: + title: required_linear_history + description: Prevent merge commits from being pushed to matching refs. + type: object + required: + - type + properties: + type: + type: string + enum: + - required_linear_history + repository-rule-required-deployments: + title: required_deployments + description: Choose which environments must be successfully deployed to before + refs can be pushed into a ref that matches this rule. + type: object + required: + - type + properties: + type: + type: string + enum: + - required_deployments + parameters: + type: object + properties: + required_deployment_environments: + type: array + description: The environments that must be successfully deployed to + before branches can be merged. + items: + type: string + required: + - required_deployment_environments + repository-rule-required-signatures: + title: required_signatures + description: Commits pushed to matching refs must have verified signatures. + type: object + required: + - type + properties: + type: + type: string + enum: + - required_signatures + repository-rule-pull-request: + title: pull_request + description: Require all commits be made to a non-target branch and submitted + via a pull request before they can be merged. + type: object + required: + - type + properties: + type: + type: string + enum: + - pull_request + parameters: + type: object + properties: + dismiss_stale_reviews_on_push: + type: boolean + description: New, reviewable commits pushed will dismiss previous pull + request review approvals. + require_code_owner_review: + type: boolean + description: Require an approving review in pull requests that modify + files that have a designated code owner. + require_last_push_approval: + type: boolean + description: Whether the most recent reviewable push must be approved + by someone other than the person who pushed it. + required_approving_review_count: + type: integer + description: The number of approving reviews that are required before + a pull request can be merged. + minimum: 0 + maximum: 10 + required_review_thread_resolution: + type: boolean + description: All conversations on code must be resolved before a pull + request can be merged. + required: + - dismiss_stale_reviews_on_push + - require_code_owner_review + - require_last_push_approval + - required_approving_review_count + - required_review_thread_resolution + repository-rule-params-status-check-configuration: + title: StatusCheckConfiguration + description: Required status check + type: object + properties: + context: + type: string + description: The status check context name that must be present on the commit. + integration_id: type: integer - permissions: + description: The optional integration ID that this status check must originate + from. + required: + - context + repository-rule-required-status-checks: + title: required_status_checks + description: Choose which status checks must pass before the ref is updated. + When enabled, commits must first be pushed to another ref where the checks + pass. + type: object + required: + - type + properties: + type: + type: string + enum: + - required_status_checks + parameters: type: object properties: - admin: + required_status_checks: + type: array + description: Status checks that are required. + items: + "$ref": "#/components/schemas/repository-rule-params-status-check-configuration" + strict_required_status_checks_policy: type: boolean - pull: + description: Whether pull requests targeting a matching branch must + be tested with the latest code. This setting will not take effect + unless at least one status check is enabled. + required: + - required_status_checks + - strict_required_status_checks_policy + repository-rule-non-fast-forward: + title: non_fast_forward + description: Prevent users with push access from force pushing to refs. + type: object + required: + - type + properties: + type: + type: string + enum: + - non_fast_forward + repository-rule-commit-message-pattern: + title: commit_message_pattern + description: Parameters to be used for the commit_message_pattern rule + type: object + required: + - type + properties: + type: + type: string + enum: + - commit_message_pattern + parameters: + type: object + properties: + name: + type: string + description: How this rule will appear to users. + negate: type: boolean - triage: + description: If true, the rule will fail if the pattern matches. + operator: + type: string + description: The operator to use for matching. + enum: + - starts_with + - ends_with + - contains + - regex + pattern: + type: string + description: The pattern to match with. + required: + - operator + - pattern + repository-rule-commit-author-email-pattern: + title: commit_author_email_pattern + description: Parameters to be used for the commit_author_email_pattern rule + type: object + required: + - type + properties: + type: + type: string + enum: + - commit_author_email_pattern + parameters: + type: object + properties: + name: + type: string + description: How this rule will appear to users. + negate: type: boolean - push: + description: If true, the rule will fail if the pattern matches. + operator: + type: string + description: The operator to use for matching. + enum: + - starts_with + - ends_with + - contains + - regex + pattern: + type: string + description: The pattern to match with. + required: + - operator + - pattern + repository-rule-committer-email-pattern: + title: committer_email_pattern + description: Parameters to be used for the committer_email_pattern rule + type: object + required: + - type + properties: + type: + type: string + enum: + - committer_email_pattern + parameters: + type: object + properties: + name: + type: string + description: How this rule will appear to users. + negate: type: boolean - maintain: + description: If true, the rule will fail if the pattern matches. + operator: + type: string + description: The operator to use for matching. + enum: + - starts_with + - ends_with + - contains + - regex + pattern: + type: string + description: The pattern to match with. + required: + - operator + - pattern + repository-rule-branch-name-pattern: + title: branch_name_pattern + description: Parameters to be used for the branch_name_pattern rule + type: object + required: + - type + properties: + type: + type: string + enum: + - branch_name_pattern + parameters: + type: object + properties: + name: + type: string + description: How this rule will appear to users. + negate: type: boolean + description: If true, the rule will fail if the pattern matches. + operator: + type: string + description: The operator to use for matching. + enum: + - starts_with + - ends_with + - contains + - regex + pattern: + type: string + description: The pattern to match with. required: - - admin - - pull - - push - role_name: + - operator + - pattern + repository-rule-tag-name-pattern: + title: tag_name_pattern + description: Parameters to be used for the tag_name_pattern rule + type: object + required: + - type + properties: + type: type: string - example: admin - owner: - "$ref": "#/components/schemas/nullable-simple-user" - private: - description: Whether the repository is private or public. - default: false - type: boolean + enum: + - tag_name_pattern + parameters: + type: object + properties: + name: + type: string + description: How this rule will appear to users. + negate: + type: boolean + description: If true, the rule will fail if the pattern matches. + operator: + type: string + description: The operator to use for matching. + enum: + - starts_with + - ends_with + - contains + - regex + pattern: + type: string + description: The pattern to match with. + required: + - operator + - pattern + repository-rule-params-restricted-commits: + title: RestrictedCommits + description: Restricted commit + type: object + properties: + oid: + type: string + description: Full or abbreviated commit hash to reject + reason: + type: string + description: Reason for restriction + required: + - oid + repository-rule-params-workflow-file-reference: + title: WorkflowFileReference + description: A workflow that must run for this rule to pass + type: object + properties: + path: + type: string + description: The path to the workflow file + ref: + type: string + description: The ref (branch or tag) of the workflow file to use + repository_id: + type: integer + description: The ID of the repository where the workflow is defined + sha: + type: string + description: The commit SHA of the workflow file to use + required: + - path + - repository_id + repository-rule-workflows: + title: workflows + description: Require all changes made to a targeted branch to pass the specified + workflows before they can be merged. + type: object + required: + - type + properties: + type: + type: string + enum: + - workflows + parameters: + type: object + properties: + workflows: + type: array + description: Workflows that must pass for this rule to pass. + items: + "$ref": "#/components/schemas/repository-rule-params-workflow-file-reference" + required: + - workflows + repository-rule-params-code-scanning-tool: + title: CodeScanningTool + description: A tool that must provide code scanning results for this rule to + pass. + type: object + properties: + alerts_threshold: + type: string + description: The severity level at which code scanning results that raise + alerts block a reference update. For more information on alert severity + levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." + enum: + - none + - errors + - errors_and_warnings + - all + security_alerts_threshold: + type: string + description: The severity level at which code scanning results that raise + security alerts block a reference update. For more information on security + severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." + enum: + - none + - critical + - high_or_higher + - medium_or_higher + - all + tool: + type: string + description: The name of a code scanning tool + required: + - alerts_threshold + - security_alerts_threshold + - tool + repository-rule: + title: Repository Rule + type: object + description: A repository rule. + oneOf: + - "$ref": "#/components/schemas/repository-rule-creation" + - "$ref": "#/components/schemas/repository-rule-update" + - "$ref": "#/components/schemas/repository-rule-deletion" + - "$ref": "#/components/schemas/repository-rule-required-linear-history" + - "$ref": "#/components/schemas/repository-rule-required-deployments" + - "$ref": "#/components/schemas/repository-rule-required-signatures" + - "$ref": "#/components/schemas/repository-rule-pull-request" + - "$ref": "#/components/schemas/repository-rule-required-status-checks" + - "$ref": "#/components/schemas/repository-rule-non-fast-forward" + - "$ref": "#/components/schemas/repository-rule-commit-message-pattern" + - "$ref": "#/components/schemas/repository-rule-commit-author-email-pattern" + - "$ref": "#/components/schemas/repository-rule-committer-email-pattern" + - "$ref": "#/components/schemas/repository-rule-branch-name-pattern" + - "$ref": "#/components/schemas/repository-rule-tag-name-pattern" + - "$ref": "#/components/schemas/repository-rule-workflows" + repository-ruleset: + title: Repository ruleset + type: object + description: A set of rules to apply when specified conditions are met. + required: + - id + - name + - source + - enforcement + properties: + id: + type: integer + description: The ID of the ruleset + name: + type: string + description: The name of the ruleset + target: + type: string + description: The target of the ruleset + enum: + - branch + - tag + source_type: + type: string + description: The type of the source of the ruleset + enum: + - Repository + - Organization + source: + type: string + description: The name of the source + enforcement: + "$ref": "#/components/schemas/repository-rule-enforcement" + bypass_actors: + type: array + description: The actors that can bypass the rules in this ruleset + items: + "$ref": "#/components/schemas/repository-ruleset-bypass-actor" + current_user_can_bypass: + type: string + description: |- + The bypass type of the user making the API request for this ruleset. This field is only returned when + querying the repository-level endpoint. + enum: + - always + - pull_requests_only + - never + node_id: + type: string + _links: + type: object + properties: + self: + type: object + properties: + href: + type: string + description: The URL of the ruleset + html: + type: object + properties: + href: + type: string + description: The html URL of the ruleset + conditions: + nullable: true + anyOf: + - "$ref": "#/components/schemas/repository-ruleset-conditions" + - "$ref": "#/components/schemas/org-ruleset-conditions" + rules: + type: array + items: + "$ref": "#/components/schemas/repository-rule" + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + rule-suites: + title: Rule Suites + description: Response + type: array + items: + type: object + properties: + id: + type: integer + description: The unique identifier of the rule insight. + actor_id: + type: integer + description: The number that identifies the user. + actor_name: + type: string + description: The handle for the GitHub user account. + before_sha: + type: string + description: The first commit sha before the push evaluation. + after_sha: + type: string + description: The last commit sha in the push evaluation. + ref: + type: string + description: The ref name that the evaluation ran on. + repository_id: + type: integer + description: The ID of the repository associated with the rule evaluation. + repository_name: + type: string + description: The name of the repository without the `.git` extension. + pushed_at: + type: string + format: date-time + example: '2011-01-26T19:06:43Z' + result: + type: string + enum: + - pass + - fail + - bypass + description: The result of the rule evaluations for rules with the `active` + enforcement status. + evaluation_result: + type: string + enum: + - pass + - fail + description: The result of the rule evaluations for rules with the `active` + and `evaluate` enforcement statuses, demonstrating whether rules would + pass or fail if all rules in the rule suite were `active`. + rule-suite: + title: Rule Suite + description: Response + type: object + properties: + id: + type: integer + description: The unique identifier of the rule insight. + actor_id: + type: integer + description: The number that identifies the user. + nullable: true + actor_name: + type: string + description: The handle for the GitHub user account. + nullable: true + before_sha: + type: string + description: The first commit sha before the push evaluation. + after_sha: + type: string + description: The last commit sha in the push evaluation. + ref: + type: string + description: The ref name that the evaluation ran on. + repository_id: + type: integer + description: The ID of the repository associated with the rule evaluation. + repository_name: + type: string + description: The name of the repository without the `.git` extension. + pushed_at: + type: string + format: date-time + example: '2011-01-26T19:06:43Z' + result: + type: string + enum: + - pass + - fail + - bypass + description: The result of the rule evaluations for rules with the `active` + enforcement status. + evaluation_result: + type: string + enum: + - pass + - fail + description: The result of the rule evaluations for rules with the `active` + and `evaluate` enforcement statuses, demonstrating whether rules would + pass or fail if all rules in the rule suite were `active`. + rule_evaluations: + type: array + description: Details on the evaluated rules. + items: + type: object + properties: + rule_source: + type: object + properties: + type: + type: string + description: The type of rule source. + id: + type: integer + nullable: true + description: The ID of the rule source. + name: + type: string + nullable: true + description: The name of the rule source. + enforcement: + type: string + enum: + - active + - evaluate + - deleted ruleset + description: The enforcement level of this rule source. + result: + type: string + enum: + - pass + - fail + description: The result of the evaluation of the individual rule. + rule_type: + type: string + description: The type of rule. + details: + type: string + description: Any associated details with the rule evaluation. + repository-advisory-vulnerability: + description: A product affected by the vulnerability detailed in a repository + security advisory. + type: object + properties: + package: + description: The name of the package affected by the vulnerability. + type: object + nullable: true + properties: + ecosystem: + "$ref": "#/components/schemas/security-advisory-ecosystems" + name: + type: string + description: The unique package name within its ecosystem. + nullable: true + required: + - ecosystem + - name + vulnerable_version_range: + type: string + description: The range of the package versions affected by the vulnerability. + nullable: true + patched_versions: + type: string + description: The package version(s) that resolve the vulnerability. + nullable: true + vulnerable_functions: + type: array + description: The functions in the package that are affected. + nullable: true + items: + type: string + required: + - package + - vulnerable_version_range + - patched_versions + - vulnerable_functions + additionalProperties: false + repository-advisory-credit: + description: A credit given to a user for a repository security advisory. + type: object + properties: + user: + "$ref": "#/components/schemas/simple-user" + type: + "$ref": "#/components/schemas/security-advisory-credit-types" + state: + type: string + description: The state of the user's acceptance of the credit. + enum: + - accepted + - declined + - pending + required: + - user + - type + - state + additionalProperties: false + repository-advisory: + description: A repository security advisory. + type: object + properties: + ghsa_id: + type: string + description: The GitHub Security Advisory ID. + readOnly: true + cve_id: + type: string + description: The Common Vulnerabilities and Exposures (CVE) ID. + nullable: true + url: + type: string + format: uri + description: The API URL for the advisory. + readOnly: true html_url: type: string format: uri - example: https://github.com/octocat/Hello-World + description: The URL for the advisory. + readOnly: true + summary: + type: string + description: A short summary of the advisory. + maxLength: 1024 description: type: string - example: This your first repo! + description: A detailed description of what the advisory entails. + maxLength: 65535 nullable: true - fork: - type: boolean + severity: + type: string + description: The severity of the advisory. + nullable: true + enum: + - critical + - high + - medium + - low + author: + readOnly: true + nullable: true + description: The author of the advisory. + allOf: + - "$ref": "#/components/schemas/simple-user" + publisher: + readOnly: true + nullable: true + description: The publisher of the advisory. + allOf: + - "$ref": "#/components/schemas/simple-user" + identifiers: + type: array + items: + type: object + properties: + type: + type: string + description: The type of identifier. + enum: + - CVE + - GHSA + value: + type: string + description: The identifier value. + required: + - type + - value + readOnly: true + state: + type: string + description: The state of the advisory. + enum: + - published + - closed + - withdrawn + - draft + - triage + created_at: + type: string + format: date-time + description: The date and time of when the advisory was created, in ISO + 8601 format. + readOnly: true + nullable: true + updated_at: + type: string + format: date-time + description: The date and time of when the advisory was last updated, in + ISO 8601 format. + readOnly: true + nullable: true + published_at: + type: string + format: date-time + description: The date and time of when the advisory was published, in ISO + 8601 format. + readOnly: true + nullable: true + closed_at: + type: string + format: date-time + description: The date and time of when the advisory was closed, in ISO 8601 + format. + readOnly: true + nullable: true + withdrawn_at: + type: string + format: date-time + description: The date and time of when the advisory was withdrawn, in ISO + 8601 format. + readOnly: true + nullable: true + submission: + type: object + nullable: true + readOnly: true + properties: + accepted: + type: boolean + description: Whether a private vulnerability report was accepted by + the repository's administrators. + readOnly: true + required: + - accepted + vulnerabilities: + type: array + nullable: true + items: + "$ref": "#/components/schemas/repository-advisory-vulnerability" + cvss: + type: object + nullable: true + properties: + vector_string: + type: string + description: The CVSS vector. + nullable: true + score: + type: number + description: The CVSS score. + minimum: 0 + maximum: 10 + nullable: true + readOnly: true + required: + - vector_string + - score + cwes: + type: array + nullable: true + items: + type: object + properties: + cwe_id: + type: string + description: The Common Weakness Enumeration (CWE) identifier. + name: + type: string + description: The name of the CWE. + readOnly: true + required: + - cwe_id + - name + readOnly: true + cwe_ids: + type: array + description: A list of only the CWE IDs. + nullable: true + items: + type: string + credits: + type: array + nullable: true + items: + type: object + properties: + login: + type: string + description: The username of the user credited. + type: + "$ref": "#/components/schemas/security-advisory-credit-types" + credits_detailed: + type: array + nullable: true + items: + "$ref": "#/components/schemas/repository-advisory-credit" + readOnly: true + collaborating_users: + type: array + description: A list of users that collaborate on the advisory. + nullable: true + items: + "$ref": "#/components/schemas/simple-user" + collaborating_teams: + type: array + description: A list of teams that collaborate on the advisory. + nullable: true + items: + "$ref": "#/components/schemas/team" + private_fork: + readOnly: true + nullable: true + description: A temporary private fork of the advisory's repository for collaborating + on a fix. + allOf: + - "$ref": "#/components/schemas/simple-repository" + required: + - ghsa_id + - cve_id + - url + - html_url + - summary + - description + - severity + - author + - publisher + - identifiers + - state + - created_at + - updated_at + - published_at + - closed_at + - withdrawn_at + - submission + - vulnerabilities + - cvss + - cwes + - cwe_ids + - credits + - credits_detailed + - collaborating_users + - collaborating_teams + - private_fork + additionalProperties: false + 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/repos/octocat/Hello-World - archive_url: + example: https://api.github.com/organizations/1/team/1 + members_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: + example: https://api.github.com/organizations/1/team/1/members{/member} + name: + description: Name of the team type: string - example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: + example: Justice League + description: + description: Description of the team type: string - example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: + nullable: true + example: A great team. + permission: + description: Permission that the team will have for its repositories type: string - example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: + example: admin + privacy: + description: The level of privacy this team should have type: string - example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: + example: closed + notification_setting: + description: The notification setting the team has set type: string - example: http://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: + example: notifications_enabled + html_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: + format: uri + example: https://github.com/orgs/rails/teams/core + repositories_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_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/contents/{+path} - contributors_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 - format: uri - example: http://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: + required: + - id + - node_id + - url + - members_url + - name + - description + - permission + - html_url + - repositories_url + - slug + 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. + ubuntu_4_core: + type: integer + description: Total minutes used on Ubuntu 4 core runner machines. + ubuntu_8_core: + type: integer + description: Total minutes used on Ubuntu 8 core runner machines. + ubuntu_16_core: + type: integer + description: Total minutes used on Ubuntu 16 core runner machines. + ubuntu_32_core: + type: integer + description: Total minutes used on Ubuntu 32 core runner machines. + ubuntu_64_core: + type: integer + description: Total minutes used on Ubuntu 64 core runner machines. + windows_4_core: + type: integer + description: Total minutes used on Windows 4 core runner machines. + windows_8_core: + type: integer + description: Total minutes used on Windows 8 core runner machines. + windows_16_core: + type: integer + description: Total minutes used on Windows 16 core runner machines. + windows_32_core: + type: integer + description: Total minutes used on Windows 32 core runner machines. + windows_64_core: + type: integer + description: Total minutes used on Windows 64 core runner machines. + macos_12_core: + type: integer + description: Total minutes used on macOS 12 core runner machines. + total: + type: integer + description: Total minutes used on all runner machines. + required: + - total_minutes_used + - total_paid_minutes_used + - included_minutes + - minutes_used_breakdown + 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. + required: + - total_gigabytes_bandwidth_used + - total_paid_gigabytes_bandwidth_used + - included_gigabytes_bandwidth + combined-billing-usage: + 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. + required: + - days_left_in_billing_cycle + - estimated_paid_storage_for_month + - estimated_storage_for_month + team-organization: + title: Team Organization + description: Team Organization + type: object + properties: + login: + type: string + example: github + id: + type: integer + example: 1 + node_id: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: + example: MDEyOk9yZ2FuaXphdGlvbjE= + url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/downloads - events_url: + example: https://api.github.com/orgs/github + repos_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/events - forks_url: + example: https://api.github.com/orgs/github/repos + events_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: + example: https://api.github.com/orgs/github/events + hooks_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number} + example: https://api.github.com/orgs/github/hooks 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: + example: https://api.github.com/orgs/github/issues + members_url: type: string - example: git@github.com:octocat/Hello-World.git - stargazers_url: + example: https://api.github.com/orgs/github/members{/member} + public_members_url: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: + example: https://api.github.com/orgs/github/public_members{/member} + avatar_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: + example: https://github.com/images/error/octocat_happy.gif + description: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: + example: A great organization + nullable: true + name: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscription - tags_url: + example: github + company: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/tags - teams_url: + example: GitHub + blog: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/teams - trees_url: + example: https://github.com/blog + location: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: + example: San Francisco + email: type: string - example: https://github.com/octocat/Hello-World.git - mirror_url: + format: email + example: octocat@github.com + twitter_username: type: string - format: uri - example: git:git.example.com/octocat/Hello-World + example: github nullable: true - hooks_url: - type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/hooks - svn_url: + is_verified: + type: boolean + example: true + has_organization_projects: + type: boolean + example: true + has_repository_projects: + type: boolean + example: true + public_repos: + type: integer + example: 2 + public_gists: + type: integer + example: 1 + followers: + type: integer + example: 20 + following: + type: integer + example: 0 + html_url: type: string format: uri - example: https://svn.github.com/octocat/Hello-World - homepage: + example: https://github.com/octocat + created_at: type: string - format: uri - example: https://github.com - nullable: true - language: + format: date-time + example: '2008-01-14T04:33:35Z' + type: type: string - nullable: true - forks_count: + example: Organization + total_private_repos: type: integer - example: 9 - stargazers_count: + example: 100 + owned_private_repos: type: integer - example: 80 - watchers_count: + example: 100 + private_gists: type: integer - example: 80 - size: + example: 81 + nullable: true + disk_usage: type: integer - example: 108 - default_branch: - description: The default branch of the repository. - type: string - example: master - open_issues_count: + example: 10000 + nullable: true + collaborators: type: integer - example: 0 - is_template: - description: Whether this repository acts as a template that can be used - to generate new repositories. - default: false + example: 8 + nullable: true + billing_email: + type: string + format: email + example: org@example.com + nullable: true + plan: + type: object + properties: + name: + type: string + space: + type: integer + private_repos: + type: integer + filled_seats: + type: integer + seats: + type: integer + required: + - name + - space + - private_repos + default_repository_permission: + type: string + nullable: true + members_can_create_repositories: type: boolean example: true - topics: - type: array - items: - type: string - has_issues: - description: Whether issues are enabled. - default: true + nullable: true + two_factor_requirement_enabled: type: boolean example: true - has_projects: - description: Whether projects are enabled. - default: true + nullable: true + members_allowed_repository_creation_type: + type: string + example: all + members_can_create_public_repositories: type: boolean example: true - has_wiki: - description: Whether the wiki is enabled. - default: true + members_can_create_private_repositories: type: boolean example: true - has_pages: - type: boolean - has_downloads: - description: Whether downloads are enabled. - default: true + members_can_create_internal_repositories: 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 + members_can_create_pages: 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 + members_can_create_public_pages: 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 + members_can_create_private_pages: type: boolean example: true - allow_forking: - description: Whether to allow forking this repo - default: false + members_can_fork_private_repositories: type: boolean example: false + nullable: true 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: + updated_at: + type: string + format: date-time + archived_at: type: string + format: date-time + 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 - - description - - downloads_url - - events_url - - fork - - forks_url - - full_name - - git_commits_url - - git_refs_url - - git_tags_url - - hooks_url - - html_url + - login + - url - id - node_id - - issue_comment_url - - issue_events_url + - repos_url + - events_url + - hooks_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 + - members_url + - public_members_url + - avatar_url + - description + - html_url + - has_organization_projects + - has_repository_projects + - public_repos + - public_gists + - followers + - following + - type - created_at - updated_at - project-card: - title: Project Card - description: Project cards represent a scope of work. + - archived_at + team-full: + title: Full Team + description: Groups of organization members that gives permissions on specified + repositories. 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 team example: 42 type: integer node_id: type: string - example: MDExOlByb2plY3RDYXJkMTQ3OA== - note: + example: MDQ6VGVhbTE= + url: + description: URL for the team + example: https://api.github.com/organizations/1/team/1 type: string - example: Add payload for delete Project column + format: uri + html_url: + type: string + format: uri + example: https://github.com/orgs/rails/teams/core + name: + description: Name of the team + example: Developers + type: string + slug: + type: string + example: justice-league + description: + type: string + example: A great team. nullable: true - creator: - "$ref": "#/components/schemas/nullable-simple-user" - created_at: + privacy: + description: The level of privacy this team should have type: string - format: date-time - example: '2016-09-05T14:21:06Z' - updated_at: + enum: + - closed + - secret + example: closed + notification_setting: + description: The notification setting the team has set 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: + enum: + - notifications_enabled + - notifications_disabled + example: notifications_enabled + permission: + description: Permission that the team will have for its repositories + example: push type: string - project_id: + members_url: type: string - column_url: + example: https://api.github.com/organizations/1/team/1/members{/member} + repositories_url: type: string format: uri - example: https://api.github.com/projects/columns/367 - content_url: + example: https://api.github.com/organizations/1/team/1/repos + parent: + "$ref": "#/components/schemas/nullable-team-simple" + members_count: + type: integer + example: 3 + repos_count: + type: integer + example: 10 + created_at: type: string - format: uri - example: https://api.github.com/repos/api-playground/projects-test/issues/3 - project_url: + format: date-time + example: '2017-07-14T16:53:42Z' + updated_at: + type: string + format: date-time + example: '2017-08-17T12:37:15Z' + organization: + "$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 type: string - format: uri - example: https://api.github.com/projects/120 required: - id - node_id - - note - url - - column_url - - project_url - - creator + - members_url + - name + - description + - permission + - html_url + - repositories_url + - slug - created_at - updated_at - project-column: - title: Project Column - description: Project columns contain cards of work. + - members_count + - repos_count + - organization + team-discussion: + title: Team Discussion + description: A team discussion is a persistent record of a free-form conversation + within a team. type: object properties: - url: + author: + "$ref": "#/components/schemas/nullable-simple-user" + body: + description: The main text of the discussion. + example: Please suggest improvements to our workflow in comments. type: string - format: uri - example: https://api.github.com/projects/columns/367 - project_url: + body_html: + type: string + example: "

Hi! This is an area for us to collaborate as a team

" + body_version: + description: The current version of the body content. If provided, this + update operation will be rejected if the given version does not match + the latest version on the server. + example: 0307116bbf7ced493b8d8a346c650b71 + type: string + comments_count: + type: integer + example: 0 + comments_url: type: string format: uri - example: https://api.github.com/projects/120 - cards_url: + example: https://api.github.com/organizations/1/team/2343027/discussions/1/comments + created_at: + type: string + format: date-time + example: '2018-01-25T18:56:31Z' + last_edited_at: + type: string + format: date-time + nullable: true + html_url: type: string format: uri - example: https://api.github.com/projects/columns/367/cards - id: - description: The unique identifier of the project column + example: https://github.com/orgs/github/teams/justice-league/discussions/1 + node_id: + type: string + example: MDE0OlRlYW1EaXNjdXNzaW9uMQ== + number: + description: The unique sequence number of a team discussion. example: 42 type: integer - node_id: + pinned: + description: Whether or not this discussion should be pinned for easy retrieval. + example: true + type: boolean + private: + description: Whether or not this discussion should be restricted to team + members and organization owners. + example: true + type: boolean + team_url: type: string - example: MDEzOlByb2plY3RDb2x1bW4zNjc= - name: - description: Name of the project column - example: Remaining tasks + format: uri + example: https://api.github.com/organizations/1/team/2343027 + title: + description: The title of the discussion. + example: How can we improve our workflow? + type: string + updated_at: + type: string + format: date-time + example: '2018-01-25T18:56:31Z' + url: + type: string + format: uri + example: https://api.github.com/organizations/1/team/2343027/discussions/1 + reactions: + "$ref": "#/components/schemas/reaction-rollup" + required: + - author + - body + - body_html + - body_version + - comments_count + - comments_url + - created_at + - last_edited_at + - html_url + - pinned + - private + - node_id + - number + - team_url + - title + - updated_at + - url + team-discussion-comment: + title: Team Discussion Comment + description: A reply to a discussion within a team. + type: object + properties: + author: + "$ref": "#/components/schemas/nullable-simple-user" + body: + description: The main text of the comment. + example: I agree with this suggestion. + type: string + body_html: + type: string + example: "

Do you like apples?

" + body_version: + description: The current version of the body content. If provided, this + update operation will be rejected if the given version does not match + the latest version on the server. + example: 0307116bbf7ced493b8d8a346c650b71 type: string created_at: type: string format: date-time - example: '2016-09-05T14:18:44Z' + example: '2018-01-15T23:53:58Z' + last_edited_at: + type: string + format: date-time + nullable: true + discussion_url: + type: string + format: uri + example: https://api.github.com/organizations/1/team/2403582/discussions/1 + html_url: + type: string + format: uri + example: https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 + node_id: + type: string + example: MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= + number: + description: The unique sequence number of a team discussion comment. + example: 42 + type: integer updated_at: type: string format: date-time - example: '2016-09-05T14:22:28Z' + example: '2018-01-15T23:53:58Z' + url: + type: string + format: uri + example: https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1 + reactions: + "$ref": "#/components/schemas/reaction-rollup" required: - - id - - node_id - - url - - project_url - - cards_url - - name + - author + - body + - body_html + - body_version - created_at + - last_edited_at + - discussion_url + - html_url + - node_id + - number - updated_at - project-collaborator-permission: - title: Project Collaborator Permission - description: Project Collaborator Permission + - url + reaction: + title: Reaction + description: Reactions to conversations provide a way to help people express + their feelings more simply and effectively. type: object properties: - permission: + id: + type: integer + example: 1 + node_id: type: string + example: MDg6UmVhY3Rpb24x user: "$ref": "#/components/schemas/nullable-simple-user" + content: + description: The reaction to use + example: heart + type: string + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes + created_at: + type: string + format: date-time + example: '2016-05-20T20:09:31Z' required: - - permission + - id + - node_id - user - rate-limit: - title: Rate Limit - type: object - properties: - limit: - type: integer - remaining: - type: integer - reset: - type: integer - used: - type: integer - required: - - limit - - remaining - - reset - - used - rate-limit-overview: - title: Rate Limit Overview - description: Rate Limit Overview + - content + - created_at + team-membership: + title: Team Membership + description: Team Membership type: object properties: - resources: - type: object - properties: - core: - "$ref": "#/components/schemas/rate-limit" - graphql: - "$ref": "#/components/schemas/rate-limit" - search: - "$ref": "#/components/schemas/rate-limit" - code_search: - "$ref": "#/components/schemas/rate-limit" - source_import: - "$ref": "#/components/schemas/rate-limit" - integration_manifest: - "$ref": "#/components/schemas/rate-limit" - code_scanning_upload: - "$ref": "#/components/schemas/rate-limit" - actions_runner_registration: - "$ref": "#/components/schemas/rate-limit" - scim: - "$ref": "#/components/schemas/rate-limit" - dependency_snapshots: - "$ref": "#/components/schemas/rate-limit" - required: - - core - - search - rate: - "$ref": "#/components/schemas/rate-limit" + url: + type: string + format: uri + role: + description: The role of the user in the team. + enum: + - member + - maintainer + default: member + example: member + type: string + state: + description: The state of the user's membership in the team. + type: string + enum: + - active + - pending required: - - rate - - resources - code-of-conduct-simple: - title: Code Of Conduct Simple - description: Code of Conduct Simple + - role + - state + - url + team-project: + title: Team Project + description: A team's access to a project. type: object properties: + owner_url: + type: string url: type: string - format: uri - example: https://api.github.com/repos/github/docs/community/code_of_conduct - key: + html_url: + type: string + columns_url: + type: string + id: + type: integer + node_id: type: string - example: citizen_code_of_conduct name: type: string - example: Citizen Code of Conduct - html_url: + body: type: string nullable: true - format: uri - example: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md + number: + type: integer + state: + type: string + creator: + "$ref": "#/components/schemas/simple-user" + created_at: + type: string + updated_at: + type: string + organization_permission: + description: The organization permission for this project. Only present + when owner is an organization. + type: string + private: + description: Whether the project is private or not. Only present when owner + is an organization. + type: boolean + permissions: + type: object + properties: + read: + type: boolean + write: + type: boolean + admin: + type: boolean + required: + - read + - write + - admin required: + - owner_url - url - - key - - name - html_url - full-repository: - title: Full Repository - description: Full Repository + - columns_url + - id + - node_id + - name + - body + - number + - state + - creator + - created_at + - updated_at + - permissions + team-repository: + title: Team Repository + description: A team's access to a repository. type: object properties: id: + description: Unique identifier of the repository + example: 42 type: integer - example: 1296269 node_id: type: string example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 name: + description: The name of the repository. type: string - example: Hello-World + example: Team Environment full_name: type: string 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 + example: admin owner: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/nullable-simple-user" private: + description: Whether the repository is private or public. + default: false type: boolean html_url: type: string @@ -70946,193 +73233,120 @@ 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: + 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 - example: - - octocat - - atom - - electron - - API 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: - type: boolean - example: true - has_discussions: + 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 - example: public 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' - permissions: - type: object - properties: - admin: - type: boolean - maintain: - type: boolean - push: - type: boolean - triage: - type: boolean - pull: - type: boolean - required: - - admin - - pull - - push + 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 - nullable: true 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_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: + description: Whether to allow forking this repo + default: false type: boolean - example: true + 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 - example: 42 network_count: type: integer - example: 0 - license: - "$ref": "#/components/schemas/nullable-license-simple" - organization: - "$ref": "#/components/schemas/nullable-simple-user" - parent: - "$ref": "#/components/schemas/repository" - source: - "$ref": "#/components/schemas/repository" - forks: - type: integer - master_branch: - type: string open_issues: type: integer watchers: type: integer - anonymous_access_enabled: - description: Whether anonymous git access is allowed. - default: true - type: boolean - code_of_conduct: - "$ref": "#/components/schemas/code-of-conduct-simple" - security_and_analysis: - "$ref": "#/components/schemas/security-and-analysis" + master_branch: + type: string required: - archive_url - assignees_url @@ -71190,7 +73404,6 @@ components: - has_projects - has_wiki - has_pages - - has_discussions - homepage - language - archived @@ -71208,8 +73421,176 @@ components: - watchers_count - created_at - updated_at - - network_count - - subscribers_count + 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: + title: Rate Limit + type: object + properties: + limit: + type: integer + remaining: + type: integer + reset: + type: integer + used: + type: integer + required: + - limit + - remaining + - reset + - used + rate-limit-overview: + title: Rate Limit Overview + description: Rate Limit Overview + type: object + properties: + resources: + type: object + properties: + core: + "$ref": "#/components/schemas/rate-limit" + graphql: + "$ref": "#/components/schemas/rate-limit" + search: + "$ref": "#/components/schemas/rate-limit" + code_search: + "$ref": "#/components/schemas/rate-limit" + source_import: + "$ref": "#/components/schemas/rate-limit" + integration_manifest: + "$ref": "#/components/schemas/rate-limit" + code_scanning_upload: + "$ref": "#/components/schemas/rate-limit" + actions_runner_registration: + "$ref": "#/components/schemas/rate-limit" + scim: + "$ref": "#/components/schemas/rate-limit" + dependency_snapshots: + "$ref": "#/components/schemas/rate-limit" + required: + - core + - search + rate: + "$ref": "#/components/schemas/rate-limit" + required: + - rate + - resources artifact: title: Artifact description: An artifact @@ -71364,6 +73745,9 @@ components: - queued - in_progress - completed + - waiting + - requested + - pending conclusion: description: The outcome of the job. example: success @@ -71598,7 +73982,7 @@ components: Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the repository. - `none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repos only. `organization` level access allows sharing across the organization. + `none` means the access is only possible from workflows in this repository. `user` level access allows sharing across user owned private repositories only. `organization` level access allows sharing across the organization. enum: - none - user @@ -73396,12 +75780,17 @@ components: nullable: true status: description: The phase of the lifecycle that the check is currently in. + Statuses of waiting, requested, and pending are reserved for GitHub Actions + check runs. example: queued type: string enum: - queued - in_progress - completed + - waiting + - requested + - pending conclusion: type: string example: neutral @@ -73621,11 +76010,17 @@ components: type: string status: type: string + description: The phase of the lifecycle that the check suite is currently + in. Statuses of waiting, requested, and pending are reserved for GitHub + Actions check suites. example: completed enum: - queued - in_progress - completed + - waiting + - requested + - pending nullable: true conclusion: type: string @@ -73724,34 +76119,6 @@ components: - setting repository: "$ref": "#/components/schemas/minimal-repository" - code-scanning-alert-rule-summary: - type: object - properties: - id: - nullable: true - type: string - description: A unique identifier for the rule used to detect the alert. - name: - type: string - description: The name of the rule used to detect the alert. - tags: - nullable: true - type: array - description: A set of tags applicable for the rule. - items: - type: string - severity: - nullable: true - type: string - description: The severity of the alert. - enum: - - none - - note - - warning - - error - description: - type: string - description: A short description of the rule used to detect the alert. code-scanning-alert-items: type: object properties: @@ -73798,6 +76165,55 @@ components: - rule - tool - most_recent_instance + code-scanning-alert-rule: + type: object + properties: + id: + nullable: true + type: string + description: A unique identifier for the rule used to detect the alert. + name: + type: string + description: The name of the rule used to detect the alert. + severity: + nullable: true + type: string + description: The severity of the alert. + enum: + - none + - note + - warning + - error + security_severity_level: + nullable: true + type: string + description: The security severity of the alert. + enum: + - low + - medium + - high + - critical + description: + type: string + description: A short description of the rule used to detect the alert. + full_description: + type: string + description: description of the rule used to detect the alert. + tags: + nullable: true + type: array + description: A set of tags applicable for the rule. + items: + type: string + help: + nullable: true + type: string + description: Detailed documentation for the rule as GitHub Flavored Markdown. + help_uri: + nullable: true + type: string + description: A link to the documentation for the rule used to detect the + alert. code-scanning-alert: type: object properties: @@ -73988,6 +76404,11 @@ components: format: uri description: The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. + commit_oid: + type: string + description: The commit SHA of the repository at the time the CodeQL database + was created. + nullable: true required: - id - name @@ -74009,7 +76430,7 @@ components: - configured - not-configured languages: - description: Languages to be analysed. + description: Languages to be analyzed. type: array items: type: string @@ -74047,8 +76468,7 @@ components: type: object properties: state: - description: Whether code scanning default setup has been configured or - not. + description: The desired state of code scanning default setup. type: string enum: - configured @@ -74060,9 +76480,7 @@ components: - default - extended languages: - description: 'CodeQL languages to be analyzed. Supported values are: `c-cpp`, - `csharp`, `go`, `java-kotlin`, `javascript-typescript`, `python`, `ruby`, - and `swift`.' + description: CodeQL languages to be analyzed. type: array items: type: string @@ -74075,8 +76493,7 @@ components: - python - ruby - swift - required: - - state + additionalProperties: false code-scanning-default-setup-update-response: description: |- You can use `run_url` to track the status of the run. This includes a property status and conclusion. @@ -74089,6 +76506,13 @@ components: run_url: description: URL of the corresponding run. type: string + code-scanning-ref-full: + type: string + description: |- + The full Git reference, formatted as `refs/heads/`, + `refs/tags/`, `refs/pull//merge`, or `refs/pull//head`. + pattern: "^refs/(heads|tags|pull)/.*$" + example: refs/heads/main code-scanning-analysis-sarif-file: 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) @@ -74238,6 +76662,18 @@ components: - memory_in_bytes - cpus - prebuild_availability + codespaces-permissions-check-for-devcontainer: + title: Codespaces Permissions Check + description: Permission check result for a given devcontainer config. + type: object + properties: + accepted: + description: Whether the user has accepted the permissions defined by the + devcontainer config + example: true + type: boolean + required: + - accepted repo-codespaces-secret: title: Codespaces Secret description: Set repository secrets for GitHub Codespaces. @@ -76408,6 +78844,11 @@ components: node_id: type: string example: MDQ6R2F0ZTM3NTU= + prevent_self_review: + type: boolean + example: false + description: Whether deployments to this environment can be approved + by the user who created the deployment. type: type: string example: required_reviewers @@ -76456,23 +78897,56 @@ components: - html_url - created_at - updated_at + prevent-self-review: + type: boolean + example: false + description: Whether or not a user who created the job is prevented from approving + their own job. deployment-branch-policy: title: Deployment branch policy - description: Details of a deployment branch policy. + description: Details of a deployment branch or tag policy. type: object properties: id: - description: The unique identifier of the branch policy. + description: The unique identifier of the branch or tag 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. + description: The name pattern that branches or tags must match in order + to deploy to the environment. + type: string + example: release/* + type: + description: Whether this rule targets a branch or tag. + type: string + example: branch + enum: + - branch + - tag + deployment-branch-policy-name-pattern-with-type: + title: Deployment branch and tag policy name pattern + type: object + properties: + name: + description: |- + The name pattern that branches or tags 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/* + type: + description: Whether this rule targets a branch or tag + type: string + example: branch + enum: + - branch + - tag + required: + - name deployment-branch-policy-name-pattern: title: Deployment branch policy name pattern type: object @@ -76911,34 +79385,7 @@ components: - push - pull_request config: - type: object - properties: - email: - type: string - example: '"foo@bar.com"' - password: - type: string - example: '"foo"' - room: - type: string - example: '"roomer"' - subdomain: - type: string - example: '"foo"' - url: - "$ref": "#/components/schemas/webhook-config-url" - insecure_ssl: - "$ref": "#/components/schemas/webhook-config-insecure-ssl" - content_type: - "$ref": "#/components/schemas/webhook-config-content-type" - digest: - type: string - example: '"sha256"' - secret: - "$ref": "#/components/schemas/webhook-config-secret" - token: - type: string - example: '"abc"' + "$ref": "#/components/schemas/webhook-config" updated_at: type: string format: date-time @@ -79270,11 +81717,17 @@ components: description: The GitHub Pages deployment status. type: object properties: + id: + oneOf: + - type: integer + - type: string + description: The ID of the GitHub Pages deployment. This is the Git SHA + of the deployed commit. status_url: type: string description: The URI to monitor GitHub Pages deployment status. format: uri - example: https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251/status + example: https://api.github.com/repos/github/hello-world/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251 page_url: type: string description: The URI to the deployed GitHub Pages. @@ -79286,8 +81739,28 @@ components: format: uri example: monalisa-1231a2312sa32-23sda74.drafts.github.io required: + - id - status_url - page_url + pages-deployment-status: + title: GitHub Pages deployment status + type: object + properties: + status: + type: string + description: The current status of the deployment. + enum: + - deployment_in_progress + - syncing_files + - finished_file_sync + - updating_pages + - purging_cdn + - deployment_cancelled + - deployment_failed + - deployment_content_failed + - deployment_attempt_error + - deployment_lost + - succeed pages-health-check: title: Pages Health Check Status description: Pages Health Check Status @@ -81088,6 +83561,9 @@ components: - allOf: - "$ref": "#/components/schemas/repository-rule-tag-name-pattern" - "$ref": "#/components/schemas/repository-rule-ruleset-info" + - allOf: + - "$ref": "#/components/schemas/repository-rule-workflows" + - "$ref": "#/components/schemas/repository-rule-ruleset-info" secret-scanning-alert: type: object properties: @@ -81143,6 +83619,13 @@ components: description: 'The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' nullable: true + validity: + type: string + description: The token status as of the latest validity check. + enum: + - active + - inactive + - unknown secret-scanning-alert-resolution-comment: description: An optional comment when closing an alert. Cannot be updated or deleted. Must be `null` when changing `state` to `open`. @@ -81195,6 +83678,56 @@ components: - blob_url - commit_sha - commit_url + secret-scanning-location-wiki-commit: + description: Represents a 'wiki_commit' secret scanning location type. This + location type shows that a secret was detected inside a commit to a repository + wiki. + type: object + properties: + path: + type: string + description: The file path of the wiki page + example: "/example/Home.md" + start_line: + type: number + description: Line number at which the secret starts in the file + end_line: + type: number + description: Line number at which the secret ends in the file + start_column: + type: number + description: The column at which the secret starts within the start line + when the file is interpreted as 8-bit ASCII. + end_column: + type: number + description: The column at which the secret ends within the end line when + the file is interpreted as 8-bit ASCII. + blob_sha: + type: string + description: SHA-1 hash ID of the associated blob + example: af5626b4a114abcb82d63db7c8082c3c4756e51b + page_url: + type: string + description: The GitHub URL to get the associated wiki page + example: https://github.com/octocat/Hello-World/wiki/Home/302c0b7e200761c9dd9b57e57db540ee0b4293a5 + commit_sha: + type: string + description: SHA-1 hash ID of the associated commit + example: 302c0b7e200761c9dd9b57e57db540ee0b4293a5 + commit_url: + type: string + description: The GitHub URL to get the associated wiki commit + example: https://github.com/octocat/Hello-World/wiki/_compare/302c0b7e200761c9dd9b57e57db540ee0b4293a5 + required: + - path + - start_line + - end_line + - start_column + - end_column + - blob_sha + - page_url + - commit_sha + - commit_url secret-scanning-location-issue-title: description: Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. @@ -81231,6 +83764,111 @@ components: example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 required: - issue_comment_url + secret-scanning-location-discussion-title: + description: Represents a 'discussion_title' secret scanning location type. + This location type shows that a secret was detected in the title of a discussion. + type: object + properties: + discussion_title_url: + type: string + format: uri + description: The URL to the discussion where the secret was detected. + example: https://github.com/community/community/discussions/39082 + required: + - discussion_title_url + secret-scanning-location-discussion-body: + description: Represents a 'discussion_body' secret scanning location type. This + location type shows that a secret was detected in the body of a discussion. + type: object + properties: + discussion_body_url: + type: string + format: uri + description: The URL to the discussion where the secret was detected. + example: https://github.com/community/community/discussions/39082#discussion-4566270 + required: + - discussion_body_url + secret-scanning-location-discussion-comment: + description: Represents a 'discussion_comment' secret scanning location type. + This location type shows that a secret was detected in a comment on a discussion. + type: object + properties: + discussion_comment_url: + type: string + format: uri + description: The API URL to get the discussion comment where the secret + was detected. + example: https://github.com/community/community/discussions/39082#discussioncomment-4158232 + required: + - discussion_comment_url + secret-scanning-location-pull-request-title: + description: Represents a 'pull_request_title' secret scanning location type. + This location type shows that a secret was detected in the title of a pull + request. + type: object + properties: + pull_request_title_url: + type: string + format: uri + description: The API URL to get the pull request where the secret was detected. + example: https://api.github.com/repos/octocat/Hello-World/pull/2846 + required: + - pull_request_title_url + secret-scanning-location-pull-request-body: + description: Represents a 'pull_request_body' secret scanning location type. + This location type shows that a secret was detected in the body of a pull + request. + type: object + properties: + pull_request_body_url: + type: string + format: uri + description: The API URL to get the pull request where the secret was detected. + example: https://api.github.com/repos/octocat/Hello-World/pull/2846 + required: + - pull_request_body_url + secret-scanning-location-pull-request-comment: + description: Represents a 'pull_request_comment' secret scanning location type. + This location type shows that a secret was detected in a comment on a pull + request. + type: object + properties: + pull_request_comment_url: + type: string + format: uri + description: The API URL to get the pull request comment where the secret + was detected. + example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + required: + - pull_request_comment_url + secret-scanning-location-pull-request-review: + description: Represents a 'pull_request_review' secret scanning location type. + This location type shows that a secret was detected in a review on a pull + request. + type: object + properties: + pull_request_review_url: + type: string + format: uri + description: The API URL to get the pull request review where the secret + was detected. + example: https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80 + required: + - pull_request_review_url + secret-scanning-location-pull-request-review-comment: + description: Represents a 'pull_request_review_comment' secret scanning location + type. This location type shows that a secret was detected in a review comment + on a pull request. + type: object + properties: + pull_request_review_comment_url: + type: string + format: uri + description: The API URL to get the pull request review comment where the + secret was detected. + example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/12 + required: + - pull_request_review_comment_url secret-scanning-location: type: object properties: @@ -81238,22 +83876,37 @@ components: type: string enum: - commit + - wiki_commit - issue_title - issue_body - issue_comment + - discussion_title + - discussion_body + - discussion_comment + - pull_request_title + - pull_request_body + - pull_request_comment + - pull_request_review + - pull_request_review_comment description: The location type. Because secrets may be found in different - types of resources (ie. code, comments, issues), this field identifies - the type of resource where the secret was found. + types of resources (ie. code, comments, issues, pull requests, discussions), + this field identifies the type of resource where the secret was found. example: commit details: oneOf: - "$ref": "#/components/schemas/secret-scanning-location-commit" + - "$ref": "#/components/schemas/secret-scanning-location-wiki-commit" - "$ref": "#/components/schemas/secret-scanning-location-issue-title" - "$ref": "#/components/schemas/secret-scanning-location-issue-body" - "$ref": "#/components/schemas/secret-scanning-location-issue-comment" - required: - - type - - details + - "$ref": "#/components/schemas/secret-scanning-location-discussion-title" + - "$ref": "#/components/schemas/secret-scanning-location-discussion-body" + - "$ref": "#/components/schemas/secret-scanning-location-discussion-comment" + - "$ref": "#/components/schemas/secret-scanning-location-pull-request-title" + - "$ref": "#/components/schemas/secret-scanning-location-pull-request-body" + - "$ref": "#/components/schemas/secret-scanning-location-pull-request-comment" + - "$ref": "#/components/schemas/secret-scanning-location-pull-request-review" + - "$ref": "#/components/schemas/secret-scanning-location-pull-request-review-comment" repository-advisory-create: type: object properties: @@ -81343,6 +83996,11 @@ components: description: The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. nullable: true + start_private_fork: + type: boolean + description: Whether to create a temporary private fork of the repository + to collaborate on a fix. + default: false required: - summary - description @@ -81417,6 +84075,11 @@ components: description: The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. nullable: true + start_private_fork: + type: boolean + description: Whether to create a temporary private fork of the repository + to collaborate on a fix. + default: false required: - summary - description @@ -83884,8 +86547,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. + description: The size of the repository, in kilobytes. Size is calculated + hourly. When a repository is initially created, the size is 0. type: integer example: 108 default_branch: @@ -83905,6 +86568,12 @@ components: type: array items: type: string + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true has_issues: description: Whether issues are enabled. default: true @@ -84988,7 +87657,7 @@ components: description: 'A group of pull requests that the merge queue has grouped together to be merged. -' + ' properties: head_sha: description: The SHA of the merge group. @@ -85231,8 +87900,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. + description: The size of the repository, in kilobytes. Size is calculated + hourly. When a repository is initially created, the size is 0. type: integer example: 108 default_branch: @@ -85252,6 +87921,12 @@ components: type: array items: type: string + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true has_issues: description: Whether issues are enabled. default: true @@ -86032,6 +88707,13 @@ components: secret_type: type: string description: The type of secret that secret scanning detected. + validity: + type: string + description: The token status as of the latest validity check. + enum: + - active + - inactive + - unknown push_protection_bypassed: type: boolean description: Whether push protection was bypassed for the detected secret. @@ -87133,9 +89815,8 @@ components: format: uri conclusion: description: The summary conclusion for all check runs that are part - of the check suite. Can be one of `success`, `failure`, `neutral`, - `cancelled`, `timed_out`, `action_required` or `stale`. This value - will be `null` until the check run has `completed`. + of the check suite. This value will be `null` until the check run + has `completed`. type: string nullable: true enum: @@ -87733,9 +90414,8 @@ components: format: uri conclusion: description: The summary conclusion for all check runs that are part - of the check suite. Can be one of `success`, `failure`,` neutral`, - `cancelled`, `timed_out`, `action_required` or `stale`. This value - will be `null` until the check run has completed. + of the check suite. This value will be `null` until the check run + has completed. type: string nullable: true enum: @@ -88326,9 +91006,8 @@ components: format: uri conclusion: description: The summary conclusion for all check runs that are part - of the check suite. Can be one of `success`, `failure`,` neutral`, - `cancelled`, `timed_out`, `action_required` or `stale`. This value - will be `null` until the check run has completed. + of the check suite. This value will be `null` until the check run + has completed. type: string nullable: true enum: @@ -88636,8 +91315,7 @@ components: - login - id dismissed_reason: - description: 'The reason for dismissing or closing the alert. Can be - one of: `false positive`, `won''t fix`, and `used in tests`.' + description: The reason for dismissing or closing the alert. type: string nullable: true enum: @@ -88888,8 +91566,7 @@ components: - login - id dismissed_reason: - description: 'The reason for dismissing or closing the alert. Can be - one of: `false positive`, `won''t fix`, and `used in tests`.' + description: The reason for dismissing or closing the alert. type: string nullable: true enum: @@ -89370,8 +92047,7 @@ components: - login - id dismissed_reason: - description: 'The reason for dismissing or closing the alert. Can be - one of: `false positive`, `won''t fix`, and `used in tests`.' + description: The reason for dismissing or closing the alert. type: string nullable: true enum: @@ -90175,6 +92851,112 @@ components: - pusher_type - repository - sender + webhook-custom-property-created: + title: custom property created event + type: object + properties: + action: + type: string + enum: + - created + definition: + "$ref": "#/components/schemas/org-custom-property" + enterprise: + "$ref": "#/components/schemas/enterprise-webhooks" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + sender: + "$ref": "#/components/schemas/simple-user-webhooks" + required: + - action + - definition + - organization + webhook-custom-property-deleted: + title: custom property deleted event + type: object + properties: + action: + type: string + enum: + - deleted + definition: + type: object + properties: + property_name: + type: string + description: The name of the property that was deleted. + required: + - property_name + enterprise: + "$ref": "#/components/schemas/enterprise-webhooks" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + sender: + "$ref": "#/components/schemas/simple-user-webhooks" + required: + - action + - definition + - organization + webhook-custom-property-updated: + title: custom property updated event + type: object + properties: + action: + type: string + enum: + - updated + definition: + "$ref": "#/components/schemas/org-custom-property" + enterprise: + "$ref": "#/components/schemas/enterprise-webhooks" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + sender: + "$ref": "#/components/schemas/simple-user-webhooks" + required: + - action + - definition + - organization + webhook-custom-property-values-updated: + title: Custom property values updated event + type: object + properties: + action: + type: string + enum: + - updated + enterprise: + "$ref": "#/components/schemas/enterprise-webhooks" + installation: + "$ref": "#/components/schemas/simple-installation" + repository: + "$ref": "#/components/schemas/repository-webhooks" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + sender: + "$ref": "#/components/schemas/simple-user-webhooks" + new_property_values: + type: array + description: The new custom property values for the repository. + items: + "$ref": "#/components/schemas/custom-property-value" + old_property_values: + type: array + description: The old custom property values for the repository. + items: + "$ref": "#/components/schemas/custom-property-value" + required: + - action + - repository + - organization + - new_property_values + - old_property_values webhook-delete: title: delete event type: object @@ -94064,9 +96846,8 @@ components: nullable: true format: date-time conclusion: - description: The result of the completed check run. Can be one of `success`, - `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` - or `stale`. This value will be `null` until the check run has completed. + description: The result of the completed check run. This value will + be `null` until the check run has completed. type: string nullable: true enum: @@ -97596,6 +100377,12 @@ components: - type: integer - type: string format: date-time + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true default_branch: description: The default branch of the repository. type: string @@ -98201,14 +100988,6 @@ components: type: string enum: - revoked - enterprise: - "$ref": "#/components/schemas/enterprise-webhooks" - installation: - "$ref": "#/components/schemas/simple-installation" - organization: - "$ref": "#/components/schemas/organization-simple-webhooks" - repository: - "$ref": "#/components/schemas/repository-webhooks" sender: "$ref": "#/components/schemas/simple-user-webhooks" required: @@ -112443,6 +115222,12 @@ components: - type: integer - type: string format: date-time + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the + corresponding custom property values. + additionalProperties: true default_branch: description: The default branch of the repository. type: string @@ -112489,6 +115274,9 @@ components: git_url: type: string format: uri + has_discussions: + description: Whether the repository has discussions enabled. + type: boolean has_downloads: description: Whether downloads are enabled. type: boolean @@ -112747,6 +115535,9 @@ components: type: integer watchers_count: type: integer + web_commit_signoff_required: + description: Whether to require commit signoff. + type: boolean required: - id - node_id @@ -116651,6 +119442,12 @@ components: - type: integer - type: string format: date-time + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the + corresponding custom property values. + additionalProperties: true default_branch: description: The default branch of the repository. type: string @@ -123207,6 +126004,11 @@ components: type: object properties: permission: + description: |- + This field is included for legacy purposes; use the `role_name` field instead. The `maintain` + role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role + assigned to the collaborator, use the `role_name` field instead, which will provide the full + role name, including custom roles. type: object properties: to: @@ -123217,6 +126019,14 @@ components: - read required: - to + role_name: + description: The role assigned to the collaborator. + type: object + properties: + to: + type: string + required: + - to enterprise: "$ref": "#/components/schemas/enterprise-webhooks" installation: @@ -187807,16 +190617,16 @@ components: description: An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the `compare` between the `before` commit and the `after` commit.) The array includes a maximum - of 20 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/commits) - to fetch additional commits. This limit is applied to timeline events - only and isn't applied to webhook deliveries. + of 2048 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/commits) + to fetch additional commits. type: array items: title: Commit type: object properties: added: - description: An array of files added in the commit. + description: An array of files added in the commit. A maximum of 3000 + changed files will be reported per commit. type: array items: type: string @@ -187870,12 +190680,14 @@ components: description: The commit message. type: string modified: - description: An array of files modified by the commit. + description: An array of files modified by the commit. A maximum of + 3000 changed files will be reported per commit. type: array items: type: string removed: - description: An array of files removed in the commit. + description: An array of files removed in the commit. A maximum of + 3000 changed files will be reported per commit. type: array items: type: string @@ -188099,6 +190911,12 @@ components: - type: integer - type: string format: date-time + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true default_branch: description: The default branch of the repository. type: string @@ -192080,14 +194898,16 @@ components: properties: action: type: string - enum: - - sample.collected + description: The `event_type` that was specified in the `POST /repos/{owner}/{repo}/dispatches` + request body. branch: type: string client_payload: type: object nullable: true additionalProperties: true + description: The `client_payload` that was specified in the `POST /repos/{owner}/{repo}/dispatches` + request body. enterprise: "$ref": "#/components/schemas/enterprise-webhooks" installation: @@ -193543,6 +196363,30 @@ components: - action - alert - repository + webhook-secret-scanning-alert-validated: + title: secret_scanning_alert validated event + type: object + properties: + action: + type: string + enum: + - validated + alert: + "$ref": "#/components/schemas/secret-scanning-alert-webhook" + enterprise: + "$ref": "#/components/schemas/enterprise-webhooks" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + repository: + "$ref": "#/components/schemas/repository-webhooks" + sender: + "$ref": "#/components/schemas/simple-user-webhooks" + required: + - action + - alert + - repository webhook-security-advisory-published: title: security_advisory published event type: object @@ -196193,6 +199037,12 @@ components: - type: integer - type: string format: date-time + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true default_branch: description: The default branch of the repository. type: string @@ -196774,6 +199624,12 @@ components: - type: integer - type: string format: date-time + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true default_branch: description: The default branch of the repository. type: string @@ -197356,6 +200212,12 @@ components: - type: integer - type: string format: date-time + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true default_branch: description: The default branch of the repository. type: string @@ -198002,6 +200864,12 @@ components: - type: integer - type: string format: date-time + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true default_branch: description: The default branch of the repository. type: string @@ -198585,6 +201453,12 @@ components: - type: integer - type: string format: date-time + custom_properties: + type: object + description: The custom properties that were defined for the repository. + The keys are the custom property names, and the values are the corresponding + custom property values. + additionalProperties: true default_branch: description: The default branch of the repository. type: string @@ -204713,10 +207587,7 @@ components: ## Attribution - This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - - [homepage]: http://contributor-covenant.org - [version]: http://contributor-covenant.org/version/1/4/ + This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4/). html_url: http://contributor-covenant.org/version/1/4/ emojis-get: value: @@ -207011,6 +209882,7 @@ components: push_protection_bypassed: true push_protection_bypassed_at: '2020-11-06T21:48:51Z' resolution_comment: Example comment + validity: active - number: 1 created_at: '2020-11-06T18:18:30Z' url: https://api.github.com/repos/owner/repo/secret-scanning/alerts/1 @@ -207092,6 +209964,7 @@ components: push_protection_bypassed: false push_protection_bypassed_at: resolution_comment: + validity: unknown public-events-items: value: - id: '22249084947' @@ -208548,7 +211421,6 @@ components: members_can_fork_private_repositories: false web_commit_signoff_required: false updated_at: '2014-03-03T18:58:10Z' - archived_at: dependency_graph_enabled_for_new_repositories: false dependabot_alerts_enabled_for_new_repositories: false dependabot_security_updates_enabled_for_new_repositories: false @@ -210874,6 +213746,96 @@ components: status: enabled secret_scanning_push_protection: status: disabled + organization-fine-grained-permission-example: + value: + - name: read_organization_custom_org_role + description: View organization roles + - name: write_organization_custom_org_role + description: Manage custom organization roles + organization-role-list: + value: + total_count: 2 + roles: + - id: 8030 + name: Custom Role Manager + description: Permissions to manage custom roles within an org + permissions: + - write_organization_custom_repo_role + - write_organization_custom_org_role + - read_organization_custom_repo_role + - read_organization_custom_org_role + organization: + 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 + created_at: '2022-07-04T22:19:11Z' + updated_at: '2022-07-04T22:20:11Z' + - id: 8031 + name: Auditor + description: Permissions to read the organization audit log + permissions: + - read_audit_logs + organization: + 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 + created_at: '2022-07-04T22:19:11Z' + updated_at: '2022-07-04T22:20:11Z' + organization-role: + value: + id: 8030 + name: Custom Role Manager + description: Permissions to manage custom roles within an org + permissions: + - write_organization_custom_repo_role + - write_organization_custom_org_role + - read_organization_custom_repo_role + - read_organization_custom_org_role + 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 + created_at: '2022-07-04T22:19:11Z' + updated_at: '2022-07-04T22:20:11Z' package-org: value: id: 197 @@ -211073,7 +214035,57 @@ components: site_admin: false created_at: '2011-04-11T20:09:31Z' updated_at: '2014-03-04T18:58:10Z' - repository: + org-custom-properties: + value: + - property_name: environment + value_type: single_select + required: true + default_value: production + description: Prod or dev environment + allowed_values: + - production + - development + values_editable_by: org_actors + - property_name: service + value_type: string + - property_name: team + value_type: string + description: Team owning the repository + org-custom-property: + value: + property_name: environment + value_type: single_select + required: true + default_value: production + description: Prod or dev environment + allowed_values: + - production + - development + org-repo-custom-property-values: + value: + - repository_id: 1296269 + repository_name: Hello-World + repository_full_name: octocat/Hello-World + properties: + - property_name: environment + value: production + - property_name: service + value: web + - property_name: team + value: octocat + org-repo-update-custom-property-values: + value: + repository_names: + - Hello-World + - octo-repo + properties: + - property_name: environment + value: production + - property_name: service + value: web + - property_name: team + value: octocat + full-repository: value: id: 1296269 node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 @@ -211145,25 +214157,24 @@ 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: + 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 language: - forks: 9 forks_count: 9 + forks: 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 + open_issues: 0 + is_template: false topics: - octocat - atom @@ -211181,18 +214192,389 @@ components: created_at: '2011-01-26T19:01:12Z' updated_at: '2011-01-26T19:14:43Z' permissions: - admin: false - push: false pull: true + push: false + admin: false allow_rebase_merge: true - template_repository: + 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 temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false delete_branch_on_merge: true allow_merge_commit: true + allow_forking: true + web_commit_signoff_required: false subscribers_count: 42 network_count: 0 + organization: + 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: Organization + site_admin: false + parent: + 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 + 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 + source: + 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 + 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 org-ruleset-items: value: - id: 21 @@ -211260,6 +214642,63 @@ components: href: https://github.com/organizations/my-org/settings/rules/21 created_at: '2023-08-15T08:43:03Z' updated_at: '2023-09-23T16:29:47Z' + rule-suite-items: + value: + - id: 21 + actor_id: 12 + username: octocat + before_sha: 893f768e172fb1bc9c5d6f3dd48557e45f14e01d + after_sha: dedd88641a362b6b4ea872da4847d6131a164d01 + ref: refs/heads/i-see-everything + repository_id: 404 + repository_name: octo-repo + pushed_at: '2023-07-06T08:43:03Z' + result: bypass + - id: 25 + actor_id: 11 + username: not-octocat + before_sha: 48994e4e01ccc943624c6231f172702b82b233cc + after_sha: ecfd5a1025fa271a33ca5608d089476a2df3c9a1 + ref: refs/heads/i-am-everything + repository_id: 404 + repository_name: octo-repo + pushed_at: '2023-07-07T08:43:03Z' + result: pass + evaluation_result: fail + rule-suite: + value: + id: 21 + actor_id: 12 + username: octocat + before_sha: 893f768e172fb1bc9c5d6f3dd48557e45f14e01d + after_sha: dedd88641a362b6b4ea872da4847d6131a164d01 + ref: refs/heads/i-see-everything + repository_id: 404 + repository_name: octo-repo + pushed_at: '2023-07-06T08:43:03Z' + result: bypass + evaluation_result: fail + rule_evaluations: + - rule_source: + type: ruleset + id: 2 + name: Author email must be a GitHub email address + enforcement: active + result: pass + rule_type: commit_author_email_pattern + - rule_source: + type: protected_branch + enforcement: active + result: fail + rule_type: pull_request + details: Changes must be made through a pull request. + - rule_source: + type: ruleset + id: 3 + name: Evaluate commit message pattern + enforcement: evaluate + result: fail + rule_type: commit_message_pattern list-repository-advisories: value: - ghsa_id: GHSA-abcd-1234-efgh @@ -211400,6 +214839,7 @@ components: repositories_url: https://api.github.com/teams/1/repos permission: admin parent: + private_fork: - ghsa_id: GHSA-1234-5678-9012 cve_id: CVE-2051-0000 url: https://api.github.com/repos/repo/a-package/security-advisories/GHSA-1234-5678-9012 @@ -211457,7 +214897,7 @@ components: closed_at: withdrawn_at: submission: - - accepted: true + accepted: true vulnerabilities: - package: ecosystem: pip @@ -211539,6 +214979,71 @@ components: repositories_url: https://api.github.com/teams/1/repos permission: admin parent: + private_fork: + id: 217723378 + node_id: MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg= + name: octo-repo-ghsa-1234-5678-9012 + full_name: octo-org/octo-repo-ghsa-1234-5678-9012 + owner: + login: octo-org + id: 6811672 + node_id: MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI= + avatar_url: https://avatars3.githubusercontent.com/u/6811672?v=4 + gravatar_id: '' + url: https://api.github.com/users/octo-org + html_url: https://github.com/octo-org + followers_url: https://api.github.com/users/octo-org/followers + following_url: https://api.github.com/users/octo-org/following{/other_user} + gists_url: https://api.github.com/users/octo-org/gists{/gist_id} + starred_url: https://api.github.com/users/octo-org/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octo-org/subscriptions + organizations_url: https://api.github.com/users/octo-org/orgs + repos_url: https://api.github.com/users/octo-org/repos + events_url: https://api.github.com/users/octo-org/events{/privacy} + received_events_url: https://api.github.com/users/octo-org/received_events + type: Organization + site_admin: false + private: true + html_url: https://github.com/octo-org/octo-repo-ghsa-1234-5678-9012 + description: + fork: false + url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012 + archive_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/{archive_format}{/ref} + assignees_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/assignees{/user} + blobs_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/git/blobs{/sha} + branches_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/branches{/branch} + collaborators_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/collaborators{/collaborator} + comments_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/comments{/number} + commits_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/commits{/sha} + compare_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/compare/{base}...{head} + contents_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/contents/{+path} + contributors_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/contributors + deployments_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/deployments + downloads_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/downloads + events_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/events + forks_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/forks + git_commits_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/git/commits{/sha} + git_refs_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/git/refs{/sha} + git_tags_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/git/tags{/sha} + hooks_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/hooks + issue_comment_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/issues/comments{/number} + issue_events_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/issues/events{/number} + issues_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/issues{/number} + keys_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/keys{/key_id} + labels_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/labels{/name} + languages_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/languages + merges_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/merges + milestones_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/milestones{/number} + notifications_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/notifications{?since,all,participating} + pulls_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/pulls{/number} + releases_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/releases{/id} + stargazers_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/stargazers + statuses_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/statuses/{sha} + subscribers_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/subscribers + subscription_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/subscription + tags_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/tags + teams_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/teams + trees_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-1234-5678-9012/git/trees{/sha} actions-billing-usage: value: total_minutes_used: 305 @@ -212091,972 +215596,350 @@ 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: - 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 - maintain: false - 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 - team-items-response-if-child-teams-exist: - value: - - id: 2 - node_id: MDQ6VGVhbTI= - url: https://api.github.com/teams/2 - name: Original Roster - slug: original-roster - description: Started it all. - privacy: closed - notification_setting: notifications_enabled - permission: admin - members_url: https://api.github.com/teams/2/members{/member} - repositories_url: https://api.github.com/teams/2/repos - parent: - 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 - notification_setting: notifications_enabled - permission: admin - members_url: https://api.github.com/teams/1/members{/member} - repositories_url: https://api.github.com/teams/1/repos - html_url: https://github.com/orgs/rails/teams/core - project-card: - value: - url: https://api.github.com/projects/columns/cards/1478 - id: 1478 - node_id: MDExOlByb2plY3RDYXJkMTQ3OA== - note: Add payload for delete Project column - 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: '2016-09-05T14:21:06Z' - updated_at: '2016-09-05T14:20:22Z' - archived: false - column_url: https://api.github.com/projects/columns/367 - content_url: https://api.github.com/repos/api-playground/projects-test/issues/3 - project_url: https://api.github.com/projects/120 - project-column: - 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' - project-card-items: - value: - - url: https://api.github.com/projects/columns/cards/1478 - id: 1478 - node_id: MDExOlByb2plY3RDYXJkMTQ3OA== - note: Add payload for delete Project column - 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: '2016-09-05T14:21:06Z' - updated_at: '2016-09-05T14:20:22Z' - archived: false - column_url: https://api.github.com/projects/columns/367 - content_url: https://api.github.com/repos/api-playground/projects-test/issues/3 - project_url: https://api.github.com/projects/120 - project-3: - value: - owner_url: https://api.github.com/repos/api-playground/projects-test - url: https://api.github.com/projects/1002604 - html_url: https://github.com/api-playground/projects-test/projects/1 - columns_url: https://api.github.com/projects/1002604/columns - id: 1002604 - node_id: MDc6UHJvamVjdDEwMDI2MDQ= - name: Projects Documentation - body: Developer documentation project for the developer site. - 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' - project-collaborator-permission: - value: - permission: admin - 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 - project-column-items: - 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' - rate-limit-overview: - value: - resources: - core: - limit: 5000 - used: 1 - remaining: 4999 - reset: 1691591363 - search: - limit: 30 - used: 12 - remaining: 18 - reset: 1691591091 - graphql: - limit: 5000 - used: 7 - remaining: 4993 - reset: 1691593228 - integration_manifest: - limit: 5000 - used: 1 - remaining: 4999 - reset: 1691594631 - source_import: - limit: 100 - used: 1 - remaining: 99 - reset: 1691591091 - code_scanning_upload: - limit: 500 - used: 1 - remaining: 499 - reset: 1691594631 - actions_runner_registration: - limit: 10000 - used: 0 - remaining: 10000 - reset: 1691594631 - scim: - limit: 15000 - used: 0 - remaining: 15000 - reset: 1691594631 - dependency_snapshots: - limit: 100 - used: 0 - remaining: 100 - reset: 1691591091 - code_search: - limit: 10 - used: 0 - remaining: 10 - reset: 1691591091 - rate: - limit: 5000 - used: 1 - remaining: 4999 - reset: 1372700873 - full-repository-default-response: - summary: Default response - 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 - forks: 9 - stargazers_count: 80 - watchers_count: 80 - watchers: 80 - size: 108 - default_branch: master - open_issues_count: 0 - open_issues: 0 - is_template: false - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - has_discussions: false - 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 - push: false - admin: false - 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: - 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 - 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 - spdx_id: MIT - url: https://api.github.com/licenses/mit - node_id: MDc6TGljZW5zZW1pdA== - organization: - 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: Organization - site_admin: false - parent: - 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 - 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 - source: - 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 - 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 - security_and_analysis: - advanced_security: - status: enabled - secret_scanning: - status: enabled - secret_scanning_push_protection: - status: disabled - full-repository: - 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 + maintain: false + push: false + triage: false + pull: true + role_name: read + 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 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 - language: + html_url: https://api.github.com/licenses/mit + forks: 1 + open_issues: 1 + watchers: 1 + team-items-response-if-child-teams-exist: + value: + - id: 2 + node_id: MDQ6VGVhbTI= + url: https://api.github.com/teams/2 + name: Original Roster + slug: original-roster + description: Started it all. + privacy: closed + notification_setting: notifications_enabled + permission: admin + members_url: https://api.github.com/teams/2/members{/member} + repositories_url: https://api.github.com/teams/2/repos + parent: + 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 + notification_setting: notifications_enabled + permission: admin + members_url: https://api.github.com/teams/1/members{/member} + repositories_url: https://api.github.com/teams/1/repos + html_url: https://github.com/orgs/rails/teams/core + project-card: + value: + url: https://api.github.com/projects/columns/cards/1478 + id: 1478 + node_id: MDExOlByb2plY3RDYXJkMTQ3OA== + note: Add payload for delete Project column + 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: '2016-09-05T14:21:06Z' + updated_at: '2016-09-05T14:20:22Z' + archived: false + column_url: https://api.github.com/projects/columns/367 + content_url: https://api.github.com/repos/api-playground/projects-test/issues/3 + project_url: https://api.github.com/projects/120 + project-column: + 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' + project-card-items: + value: + - url: https://api.github.com/projects/columns/cards/1478 + id: 1478 + node_id: MDExOlByb2plY3RDYXJkMTQ3OA== + note: Add payload for delete Project column + 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: '2016-09-05T14:21:06Z' + updated_at: '2016-09-05T14:20:22Z' + archived: false + column_url: https://api.github.com/projects/columns/367 + content_url: https://api.github.com/repos/api-playground/projects-test/issues/3 + project_url: https://api.github.com/projects/120 + project-3: + value: + owner_url: https://api.github.com/repos/api-playground/projects-test + url: https://api.github.com/projects/1002604 + html_url: https://github.com/api-playground/projects-test/projects/1 + columns_url: https://api.github.com/projects/1002604/columns + id: 1002604 + node_id: MDc6UHJvamVjdDEwMDI2MDQ= + name: Projects Documentation + body: Developer documentation project for the developer site. + 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' + project-collaborator-permission: + value: + permission: admin + 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 + project-column-items: + 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' + rate-limit-overview: + value: + resources: + core: + limit: 5000 + used: 1 + remaining: 4999 + reset: 1691591363 + search: + limit: 30 + used: 12 + remaining: 18 + reset: 1691591091 + graphql: + limit: 5000 + used: 7 + remaining: 4993 + reset: 1691593228 + integration_manifest: + limit: 5000 + used: 1 + remaining: 4999 + reset: 1691594631 + source_import: + limit: 100 + used: 1 + remaining: 99 + reset: 1691591091 + code_scanning_upload: + limit: 500 + used: 1 + remaining: 499 + reset: 1691594631 + actions_runner_registration: + limit: 10000 + used: 0 + remaining: 10000 + reset: 1691594631 + scim: + limit: 15000 + used: 0 + remaining: 15000 + reset: 1691594631 + dependency_snapshots: + limit: 100 + used: 0 + remaining: 100 + reset: 1691591091 + code_search: + limit: 10 + used: 0 + remaining: 10 + reset: 1691591091 + rate: + limit: 5000 + used: 1 + remaining: 4999 + reset: 1372700873 + full-repository-default-response: + summary: Default response + 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 forks_count: 9 forks: 9 stargazers_count: 80 @@ -213077,6 +215960,7 @@ components: has_wiki: true has_pages: false has_downloads: true + has_discussions: false archived: false disabled: false visibility: public @@ -213210,10 +216094,14 @@ components: allow_auto_merge: false delete_branch_on_merge: true allow_merge_commit: true - allow_forking: true - web_commit_signoff_required: false subscribers_count: 42 network_count: 0 + license: + key: mit + name: MIT License + spdx_id: MIT + url: https://api.github.com/licenses/mit + node_id: MDc6TGljZW5zZW1pdA== organization: login: octocat id: 1 @@ -213421,7 +216309,6 @@ 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: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -213467,6 +216354,13 @@ components: forks: 1 open_issues: 1 watchers: 1 + security_and_analysis: + advanced_security: + status: enabled + secret_scanning: + status: enabled + secret_scanning_push_protection: + status: disabled artifact-paginated: value: total_count: 2 @@ -213545,7 +216439,7 @@ components: node_id: MDEyOldvcmtmbG93IEpvYjM5OTQ0NDQ5Ng== head_sha: f83a356604ae3c5d03e1b46ef4d1ca77d64a90b0 url: https://api.github.com/repos/octo-org/octo-repo/actions/jobs/399444496 - html_url: https://github.com/octo-org/octo-repo/runs/399444496 + html_url: https://github.com/octo-org/octo-repo/runs/29679449/jobs/399444496 status: completed conclusion: success started_at: '2020-01-20T17:42:40Z' @@ -213670,6 +216564,7 @@ components: check_suite_node_id: MDEwOkNoZWNrU3VpdGU0Mg== head_branch: master head_sha: acb5820ced9479c074f688cc328bf03f341a511d + path: ".github/workflows/build.yml@main" run_number: 562 event: push display_title: Update README.md @@ -214133,7 +217028,7 @@ components: node_id: MDEyOldvcmtmbG93IEpvYjM5OTQ0NDQ5Ng== head_sha: f83a356604ae3c5d03e1b46ef4d1ca77d64a90b0 url: https://api.github.com/repos/octo-org/octo-repo/actions/jobs/399444496 - html_url: https://github.com/octo-org/octo-repo/runs/399444496 + html_url: https://github.com/octo-org/octo-repo/runs/29679449/jobs/399444496 status: completed conclusion: success started_at: '2020-01-20T17:42:40Z' @@ -216262,6 +219157,7 @@ components: created_at: '2022-09-12T12:14:32Z' updated_at: '2022-09-12T12:14:32Z' url: https://api.github.com/repos/octocat/Hello-World/code-scanning/codeql/databases/java + commit_oid: 1927de39fefa25a9d0e64e3f540ff824a72f538c - id: 2 name: database.zip language: ruby @@ -216289,6 +219185,7 @@ components: created_at: '2022-09-12T12:14:32Z' updated_at: '2022-09-12T12:14:32Z' url: https://api.github.com/repos/octocat/Hello-World/code-scanning/codeql/databases/ruby + commit_oid: 1927de39fefa25a9d0e64e3f540ff824a72f538c code-scanning-codeql-database: value: id: 1 @@ -216318,6 +219215,7 @@ components: created_at: '2022-09-12T12:14:32Z' updated_at: '2022-09-12T12:14:32Z' url: https://api.github.com/repos/octocat/Hello-World/code-scanning/codeql/databases/java + commit_oid: 1927de39fefa25a9d0e64e3f540ff824a72f538c code-scanning-default-setup: value: state: configured @@ -216695,6 +219593,9 @@ components: defaults: location: EastUs devcontainer_path: ".devcontainer/devcontainer.json" + codespaces-permissions-check-for-devcontainer: + value: + accepted: true collaborator-items: value: - login: octocat @@ -219013,6 +221914,7 @@ components: wait_timer: 30 - id: 3755 node_id: MDQ6R2F0ZTM3NTU= + prevent_self_review: false type: required_reviewers reviewers: - type: User @@ -219072,6 +221974,7 @@ components: wait_timer: 30 - id: 3755 node_id: MDQ6R2F0ZTM3NTU= + prevent_self_review: false type: required_reviewers reviewers: - type: User @@ -219135,6 +222038,12 @@ components: id: 364663 node_id: MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjQ2NjM= name: main + deployment-branch-policy-single-tag: + value: + id: 364663 + node_id: MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjQ2NjM= + name: v1 + type: tag deployment-protection-rules: value: - total_count: 2 @@ -221050,8 +223959,12 @@ components: updated_at: '2014-02-10T19:00:51Z' page-deployment: value: + id: 4fd754f7e594640989b406850d0bc8f06a121251 status_url: https://api.github.com/repos/github/developer.github.com/pages/deployments/4fd754f7e594640989b406850d0bc8f06a121251/status page_url: developer.github.com + pages-deployment-status: + value: + status: succeed pages-health-check: value: domain: @@ -221145,6 +224058,23 @@ components: site_admin: false created_at: '2011-04-10T20:09:31Z' updated_at: '2014-03-03T18:58:10Z' + custom-property-values: + value: + - property_name: environment + value: production + - property_name: service + value: web + - property_name: team + value: octocat + create-or-update-custom-properties-values: + value: + properties: + - property_name: environment + value: production + - property_name: service + value: web + - property_name: team + value: octocat pull-request: value: url: https://api.github.com/repos/octocat/Hello-World/pulls/1347 @@ -223497,6 +226427,7 @@ components: push_protection_bypassed: true push_protection_bypassed_at: '2020-11-06T21:48:51Z' resolution_comment: Example comment + validity: inactive - number: 1 created_at: '2020-11-06T18:18:30Z' url: https://api.github.com/repos/owner/repo/secret-scanning/alerts/1 @@ -223513,6 +226444,7 @@ components: push_protection_bypassed: false push_protection_bypassed_at: resolution_comment: + validity: unknown secret-scanning-alert-open: value: number: 42 @@ -223531,6 +226463,7 @@ components: push_protection_bypassed: false push_protection_bypassed_at: resolution_comment: + validity: unknown secret-scanning-alert-resolved: value: number: 42 @@ -223567,6 +226500,7 @@ components: push_protection_bypassed_by: push_protection_bypassed_at: resolution_comment: Example comment + validity: unknown secret-scanning-location-list: value: - type: commit @@ -223580,6 +226514,17 @@ components: blob_url: https://api.github.com/repos/octocat/hello-world/git/blobs/af5626b4a114abcb82d63db7c8082c3c4756e51b commit_sha: f14d7debf9775f957cf4f1e8176da0786431f72b commit_url: https://api.github.com/repos/octocat/hello-world/git/commits/f14d7debf9775f957cf4f1e8176da0786431f72b + - type: wiki_commit + details: + path: "/example/Home.md" + start_line: 1 + end_line: 1 + start_column: 1 + end_column: 64 + blob_sha: af5626b4a114abcb82d63db7c8082c3c4756e51b + page_url: https://github.com/octocat/Hello-World/wiki/Home/302c0b7e200761c9dd9b57e57db540ee0b4293a5 + commit_sha: 302c0b7e200761c9dd9b57e57db540ee0b4293a5 + commit_url: https://github.com/octocat/Hello-World/wiki/_compare/302c0b7e200761c9dd9b57e57db540ee0b4293a5 - type: issue_title details: issue_title_url: https://api.github.com/repos/octocat/Hello-World/issues/1347 @@ -223589,6 +226534,30 @@ components: - type: issue_comment details: issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments/1081119451 + - type: discussion_title + details: + discussion_title_url: https://github.com/community/community/discussions/39082 + - type: discussion_body + details: + discussion_body_url: https://github.com/community/community/discussions/39082#discussion-4566270 + - type: discussion_comment + details: + discussion_comment_url: https://github.com/community/community/discussions/39082#discussioncomment-4158232 + - type: pull_request_title + details: + pull_request_title_url: https://api.github.com/repos/octocat/Hello-World/pull/2846 + - type: pull_request_body + details: + pull_request_body_url: https://api.github.com/repos/octocat/Hello-World/pulls/2846 + - type: pull_request_comment + details: + pull_request_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments/1825855898 + - type: pull_request_review + details: + pull_request_review_url: https://api.github.com/repos/octocat/Hello-World/pulls/2846/reviews/80 + - type: pull_request_review_comment + details: + pull_request_review_comment_url: https://api.github.com/repos/octocat/Hello-World/pulls/comments/12 repository-advisory: value: ghsa_id: GHSA-abcd-1234-efgh @@ -223729,6 +226698,71 @@ components: repositories_url: https://api.github.com/teams/1/repos permission: admin parent: + private_fork: + id: 217723378 + node_id: MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg= + name: octo-repo-ghsa-abcd-1234-efgh + full_name: octo-org/octo-repo-ghsa-abcd-1234-efgh + owner: + login: octo-org + id: 6811672 + node_id: MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI= + avatar_url: https://avatars3.githubusercontent.com/u/6811672?v=4 + gravatar_id: '' + url: https://api.github.com/users/octo-org + html_url: https://github.com/octo-org + followers_url: https://api.github.com/users/octo-org/followers + following_url: https://api.github.com/users/octo-org/following{/other_user} + gists_url: https://api.github.com/users/octo-org/gists{/gist_id} + starred_url: https://api.github.com/users/octo-org/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octo-org/subscriptions + organizations_url: https://api.github.com/users/octo-org/orgs + repos_url: https://api.github.com/users/octo-org/repos + events_url: https://api.github.com/users/octo-org/events{/privacy} + received_events_url: https://api.github.com/users/octo-org/received_events + type: Organization + site_admin: false + private: true + html_url: https://github.com/octo-org/octo-repo-ghsa-abcd-1234-efgh + description: + fork: false + url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh + archive_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/{archive_format}{/ref} + assignees_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/assignees{/user} + blobs_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/git/blobs{/sha} + branches_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/branches{/branch} + collaborators_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/collaborators{/collaborator} + comments_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/comments{/number} + commits_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/commits{/sha} + compare_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/compare/{base}...{head} + contents_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/contents/{+path} + contributors_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/contributors + deployments_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/deployments + downloads_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/downloads + events_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/events + forks_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/forks + git_commits_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/git/commits{/sha} + git_refs_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/git/refs{/sha} + git_tags_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/git/tags{/sha} + hooks_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/hooks + issue_comment_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/issues/comments{/number} + issue_events_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/issues/events{/number} + issues_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/issues{/number} + keys_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/keys{/key_id} + labels_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/labels{/name} + languages_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/languages + merges_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/merges + milestones_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/milestones{/number} + notifications_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/notifications{?since,all,participating} + pulls_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/pulls{/number} + releases_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/releases{/id} + stargazers_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/stargazers + statuses_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/statuses/{sha} + subscribers_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/subscribers + subscription_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/subscription + tags_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/tags + teams_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/teams + trees_url: https://api.github.com/repos/octo-org/octo-repo-ghsa-abcd-1234-efgh/git/trees{/sha} repository-advisory-pvr: value: ghsa_id: GHSA-abcd-1234-efgh @@ -223843,6 +226877,7 @@ components: repositories_url: https://api.github.com/teams/1/repos permission: admin parent: + private_fork: simple-user-items-default-response: summary: Default response value: @@ -224494,118 +227529,6 @@ components: allow_forking: true subscribers_count: 42 network_count: 0 - repository-3: - 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 - forks: 9 - stargazers_count: 80 - watchers_count: 80 - watchers: 80 - size: 108 - default_branch: master - open_issues_count: 0 - open_issues: 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 - allow_rebase_merge: true - allow_auto_merge: false - 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 public-repository-items: value: - id: 1296269 @@ -225299,125 +228222,6 @@ components: 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 @@ -229663,7 +232467,8 @@ components: pagination-before: name: before description: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). - If specified, the query only searches for results before this cursor. + If specified, the query only searches for results before this cursor. For + more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query required: false schema: @@ -229671,7 +232476,8 @@ components: pagination-after: name: after description: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). - If specified, the query only searches for results after this cursor. + If specified, the query only searches for results after this cursor. For more + information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query required: false schema: @@ -229696,7 +232502,8 @@ components: type: string per-page: name: per_page - description: The number of results per page (max 100). + description: The number of results per page (max 100). For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer @@ -229718,7 +232525,8 @@ components: type: integer page: name: page - description: Page number of the results to fetch. + description: The page number of the results to fetch. For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer @@ -229905,6 +232713,15 @@ components: - created - updated default: created + secret-scanning-alert-validity: + name: validity + in: query + description: A comma-separated list of validities that, when present, will return + alerts that match the validities in this list. Valid options are `active`, + `inactive`, and `unknown`. + required: false + schema: + type: string gist-id: name: gist_id description: The unique identifier of the gist. @@ -230047,7 +232864,8 @@ components: type: string variables-per-page: name: per_page - description: The number of results per page (max 30). + description: The number of results per page (max 30). For more information, + see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer @@ -230087,7 +232905,8 @@ components: "$ref": "#/components/schemas/code-scanning-analysis-tool-guid" hook-id: name: hook_id - description: The unique identifier of the hook. + description: The unique identifier of the hook. You can find this value in the + `X-GitHub-Hook-ID` header of a webhook delivery. in: path required: true schema: @@ -230120,6 +232939,20 @@ components: required: true schema: type: string + team-slug: + name: team_slug + description: The slug of the team name. + in: path + required: true + schema: + type: string + role-id: + name: role_id + description: The unique identifier of the role. + in: path + required: true + schema: + type: integer package-visibility: name: visibility description: |- @@ -230231,6 +233064,67 @@ components: required: true schema: type: integer + custom-property-name: + name: custom_property_name + description: The custom property name. The name is case sensitive. + in: path + required: true + schema: + type: string + repository-name-in-query: + name: repository_name + description: The name of the repository to filter on. When specified, only rule + evaluations from this repository will be returned. + in: query + schema: + type: integer + time-period: + name: time_period + description: |- + The time period to filter by. + + For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). + in: query + required: false + schema: + type: string + enum: + - hour + - day + - week + - month + default: day + actor-name-in-query: + name: actor_name + description: The handle for the GitHub user account to filter on. When specified, + only rule evaluations triggered by this actor will be returned. + in: query + schema: + type: string + rule-suite-result: + name: rule_suite_result + description: The rule results to filter on. When specified, only suites with + this result will be returned. + in: query + schema: + type: string + enum: + - pass + - fail + - bypass + - all + default: all + rule-suite-id: + name: rule_suite_id + description: |- + The unique identifier of the rule suite result. + To get this ID, you can use [GET /repos/{owner}/{repo}/rulesets/rule-suites](https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites) + for repositories and [GET /orgs/{org}/rulesets/rule-suites](https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites) + for organizations. + in: path + required: true + schema: + type: integer secret-scanning-pagination-before-org-repo: name: before description: A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). @@ -230249,13 +233143,6 @@ components: required: false schema: type: string - team-slug: - name: team_slug - description: The slug of the team name. - in: path - required: true - schema: - type: string discussion-number: name: discussion_number description: The number that identifies the discussion. @@ -230422,7 +233309,8 @@ components: name: status 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`. + be `in_progress`. Only GitHub Actions can set a status of `waiting`, `pending`, + or `requested`. in: query required: false schema: @@ -230619,7 +233507,8 @@ components: name: environment_name in: path required: true - description: The name of the environment. + description: The name of the environment. The name must be URL encoded. For + example, any slashes in the name must be replaced with `%2F`. schema: type: string branch-policy-id: @@ -230636,6 +233525,16 @@ components: required: true schema: type: integer + git-ref-only: + name: ref + description: The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" + in the Git documentation. + in: path + required: true + example: heads/feature-a + schema: + type: string + x-multi-segment: true since-user: name: since description: A user ID. Only return users with an ID greater than this ID. @@ -230664,6 +233563,16 @@ components: required: true schema: type: integer + pages-deployment-id: + name: pages_deployment_id + description: The ID of the Pages deployment. You can also give the commit SHA + of the deployment. + in: path + required: true + schema: + oneOf: + - type: integer + - type: string pull-number: name: pull_number description: The number that identifies the pull request. @@ -230692,6 +233601,14 @@ components: required: true schema: type: integer + ref-in-query: + name: ref + description: The name of the ref. Cannot contain wildcard characters. When specified, + only rule evaluations triggered for this ref will be returned. + in: query + schema: + type: string + x-multi-segment: true tag-protection-id: name: tag_protection_id description: The unique identifier of the tag protection. @@ -231007,6 +233924,12 @@ components: application/json: schema: "$ref": "#/components/schemas/basic-error" + unacceptable: + description: Unacceptable + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" headers: link: example: ; rel="next", ; diff --git a/integration-tests-definitions/stripe.yaml b/integration-tests-definitions/stripe.yaml index f3f7bf74..12a68d48 100644 --- a/integration-tests-definitions/stripe.yaml +++ b/integration-tests-definitions/stripe.yaml @@ -15,12 +15,11 @@ components: accounts, some properties are returned until that account has started to go through Connect Onboarding. Once you create an - [Account Link](https://stripe.com/docs/api/account_links) + [Account Link](https://stripe.com/docs/api/account_links) or [Account + Session](https://stripe.com/docs/api/account_sessions), - for a Standard or Express account, some parameters are no longer - returned. These are marked as **Custom Only** or **Custom and Express** - - below. Learn about the differences [between + some properties are only returned for Custom accounts. Learn about the + differences [between accounts](https://stripe.com/docs/connect/accounts). properties: business_profile: @@ -29,7 +28,11 @@ components: description: Business information about the account. nullable: true business_type: - description: The business type. + description: >- + The business type. Once you create an [Account + Link](https://stripe.com/docs/api/account_links) or [Account + Session](https://stripe.com/docs/api/account_sessions), this + property is only returned for Custom accounts. enum: - company - government_entity @@ -80,7 +83,8 @@ components: external_accounts: description: >- External accounts (bank accounts and debit cards) currently attached - to this account + to this account. External accounts are only returned for requests + where `controller[is_controller]` is true. properties: data: description: >- @@ -161,6 +165,7 @@ components: - express - standard type: string + x-stripeBypassValidation: true required: - id - object @@ -178,15 +183,58 @@ components: - settings - tos_acceptance x-resourceId: account + account_annual_revenue: + description: '' + properties: + amount: + description: >- + A non-negative integer representing the amount in the [smallest + currency unit](https://docs.stripe.com/currencies#zero-decimal). + 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 + fiscal_year_end: + description: >- + The close-out date of the preceding fiscal year in ISO 8601 format. + E.g. 2023-12-31 for the 31st of December, 2023. + maxLength: 5000 + nullable: true + type: string + title: AccountAnnualRevenue + type: object + x-expandableFields: [] account_bacs_debit_payments_settings: description: '' properties: display_name: description: >- - The Bacs Direct Debit Display Name for this account. For payments - made with Bacs Direct Debit, this will appear on the mandate, and as - the statement descriptor. + The Bacs Direct Debit display name for this account. For payments + made with Bacs Direct Debit, this name appears on the mandate as the + statement descriptor. Mobile banking apps display it as the name of + the business. To use custom branding, set the Bacs Direct Debit + Display Name during or right after creation. Custom branding incurs + an additional monthly fee for the platform. The fee appears 5 + business days after requesting Bacs. If you don't set the display + name before requesting Bacs capability, it's automatically set as + "Stripe" and the account is onboarded to Stripe branding, which is + free. + maxLength: 5000 + nullable: true + type: string + service_user_number: + description: >- + The Bacs Direct Debit Service user number for this account. For + payments made with Bacs Direct Debit, this number is a unique + identifier of the account with our banking partners. maxLength: 5000 + nullable: true type: string title: AccountBacsDebitPaymentsSettings type: object @@ -242,6 +290,17 @@ components: account_business_profile: description: '' properties: + annual_revenue: + anyOf: + - $ref: '#/components/schemas/account_annual_revenue' + description: The applicant's gross annual revenue for its preceding fiscal year. + nullable: true + estimated_worker_count: + description: >- + An estimated upper bound of employees, contractors, vendors, etc. + currently working for the business. + nullable: true + type: integer mcc: description: >- [The merchant category code for the @@ -293,6 +352,7 @@ components: title: AccountBusinessProfile type: object x-expandableFields: + - annual_revenue - monthly_estimated_revenue - support_address account_capabilities: @@ -326,6 +386,15 @@ components: - inactive - pending type: string + amazon_pay_payments: + description: >- + The status of the AmazonPay capability of the account, or whether + the account can directly process AmazonPay payments. + enum: + - active + - inactive + - pending + type: string au_becs_debit_payments: description: >- The status of the BECS Direct Debit (AU) payments capability of the @@ -520,6 +589,15 @@ components: - inactive - pending type: string + mobilepay_payments: + description: >- + The status of the MobilepPay capability of the account, or whether + the account can directly process MobilePay charges. + enum: + - active + - inactive + - pending + type: string oxxo_payments: description: >- The status of the OXXO payments capability of the account, or @@ -556,6 +634,15 @@ components: - inactive - pending type: string + revolut_pay_payments: + description: >- + The status of the RevolutPay capability of the account, or whether + the account can directly process RevolutPay payments. + enum: + - active + - inactive + - pending + type: string sepa_debit_payments: description: >- The status of the SEPA Direct Debits payments capability of the @@ -575,6 +662,15 @@ components: - inactive - pending type: string + swish_payments: + description: >- + The status of the Swish capability of the account, or whether the + account can directly process Swish payments. + enum: + - active + - inactive + - pending + type: string tax_reporting_us_1099_k: description: >- The status of the tax reporting 1099-K (US) capability of the @@ -942,9 +1038,7 @@ components: disabled_reason: description: >- This is typed as a string for consistency with - `requirements.disabled_reason`, but it safe to assume - `future_requirements.disabled_reason` is empty because fields in - `future_requirements` will never disable the account. + `requirements.disabled_reason`. maxLength: 5000 nullable: true type: string @@ -994,6 +1088,27 @@ components: x-expandableFields: - alternatives - errors + account_invoices_settings: + description: '' + properties: + default_account_tax_ids: + description: >- + The list of default Account Tax IDs to automatically include on + invoices. Account Tax IDs get added when an invoice is finalized. + items: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/tax_id' + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/tax_id' + nullable: true + type: array + title: AccountInvoicesSettings + type: object + x-expandableFields: + - default_account_tax_ids account_link: description: >- Account Links are the means by which a Connect platform grants a @@ -1042,7 +1157,7 @@ components: description: >- A non-negative integer representing how much to charge in the [smallest currency - unit](https://stripe.com/docs/currencies#zero-decimal). + unit](https://docs.stripe.com/currencies#zero-decimal). type: integer currency: description: >- @@ -1165,10 +1280,14 @@ components: type: array disabled_reason: description: >- - If the account is disabled, this string describes why. Can be + If the account is disabled, this string describes why. [Learn more + about handling verification + issues](https://stripe.com/docs/connect/handling-api-verification). + Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, - `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, - `rejected.terms_of_service`, `rejected.other`, `under_review`, or + `listed`, `platform_paused`, `rejected.fraud`, + `rejected.incomplete_verification`, `rejected.listed`, + `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`. maxLength: 5000 nullable: true @@ -1248,10 +1367,43 @@ components: description: The code for the type of error. enum: - invalid_address_city_state_postal_code + - invalid_address_highway_contract_box + - invalid_address_private_mailbox + - invalid_business_profile_name + - invalid_business_profile_name_denylisted + - invalid_company_name_denylisted + - invalid_dob_age_over_maximum - invalid_dob_age_under_18 + - invalid_dob_age_under_minimum + - invalid_product_description_length + - invalid_product_description_url_match - invalid_representative_country + - invalid_statement_descriptor_business_mismatch + - invalid_statement_descriptor_denylisted + - invalid_statement_descriptor_length + - invalid_statement_descriptor_prefix_denylisted + - invalid_statement_descriptor_prefix_mismatch - invalid_street_address + - invalid_tax_id + - invalid_tax_id_format - invalid_tos_acceptance + - invalid_url_denylisted + - invalid_url_format + - invalid_url_web_presence_detected + - invalid_url_website_business_information_mismatch + - invalid_url_website_empty + - invalid_url_website_inaccessible + - invalid_url_website_inaccessible_geoblocked + - invalid_url_website_inaccessible_password_protected + - invalid_url_website_incomplete + - invalid_url_website_incomplete_cancellation_policy + - invalid_url_website_incomplete_customer_service_details + - invalid_url_website_incomplete_legal_restrictions + - invalid_url_website_incomplete_refund_policy + - invalid_url_website_incomplete_return_policy + - invalid_url_website_incomplete_terms_and_conditions + - invalid_url_website_incomplete_under_construction + - invalid_url_website_other - invalid_value_other - verification_directors_mismatch - verification_document_address_mismatch @@ -1293,6 +1445,7 @@ components: - verification_failed_keyed_match - verification_failed_name_match - verification_failed_other + - verification_failed_representative_authority - verification_failed_residential_address - verification_failed_tax_id_match - verification_failed_tax_id_not_issued @@ -1416,6 +1569,8 @@ components: $ref: '#/components/schemas/account_card_payments_settings' dashboard: $ref: '#/components/schemas/account_dashboard_settings' + invoices: + $ref: '#/components/schemas/account_invoices_settings' payments: $ref: '#/components/schemas/account_payments_settings' payouts: @@ -1437,6 +1592,7 @@ components: - card_issuing - card_payments - dashboard + - invoices - payments - payouts - sepa_debit_payments @@ -1631,8 +1787,8 @@ components: - $ref: '#/components/schemas/card' - $ref: '#/components/schemas/source' description: >- - The source object for errors returned on a request involving a - source. + The [source object](https://stripe.com/docs/api/sources/object) for + errors returned on a request involving a source. type: description: >- The type of error returned. One of `api_error`, `card_error`, @@ -1957,6 +2113,15 @@ components: amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. type: boolean + liability: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The account that's liable for tax. If set, the business address and + tax registrations required to perform the tax calculation are loaded + from this account. The tax transaction is returned in the report of + the connected account. + nullable: true status: description: >- The status of the most recent automated tax calculation for this @@ -1971,7 +2136,8 @@ components: - enabled title: AutomaticTax type: object - x-expandableFields: [] + x-expandableFields: + - liability balance: description: >- This is an object representing your Stripe balance. You can retrieve it @@ -2019,7 +2185,7 @@ components: instant_available: description: Funds that you can pay out using Instant Payouts. items: - $ref: '#/components/schemas/balance_amount' + $ref: '#/components/schemas/balance_amount_net' type: array issuing: $ref: '#/components/schemas/balance_detail' @@ -2094,6 +2260,28 @@ components: title: BalanceAmountBySourceType type: object x-expandableFields: [] + balance_amount_net: + description: '' + properties: + amount: + description: Balance 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 + source_types: + $ref: '#/components/schemas/balance_amount_by_source_type' + required: + - amount + - currency + title: BalanceAmountNet + type: object + x-expandableFields: + - source_types balance_detail: description: '' properties: @@ -2120,7 +2308,10 @@ components: types](https://stripe.com/docs/reports/balance-transaction-types) properties: amount: - description: Gross amount of the transaction (in cents (or local equivalent)). + description: >- + Gross amount of this transaction (in cents (or local equivalent)). A + positive value represents funds charged to another party, and a + negative value represents funds sent to another party. type: integer available_on: description: >- @@ -2161,7 +2352,9 @@ components: nullable: true type: number fee: - description: Fees (in cents (or local equivalent)) paid for this transaction. + description: >- + Fees (in cents (or local equivalent)) paid for this transaction. + Represented as a positive integer when assessed. type: integer fee_details: description: >- @@ -2175,7 +2368,11 @@ components: maxLength: 5000 type: string net: - description: Net amount of the transaction (in cents (or local equivalent)). + description: >- + Net impact to a Stripe balance (in cents (or local equivalent)). A + positive value represents incrementing a Stripe balance, and a + negative value decrementing a Stripe balance. You can calculate the + net impact of a transaction on a balance by `amount` - `fee` type: integer object: description: >- @@ -2186,9 +2383,10 @@ components: type: string reporting_category: description: >- - Learn more about how [reporting categories] - (https://stripe.com/docs/reports/reporting-categories) can help you - understand balance transactions from an accounting perspective. + Learn more about how [reporting + categories](https://stripe.com/docs/reports/reporting-categories) + can help you understand balance transactions from an accounting + perspective. maxLength: 5000 type: string source: @@ -2244,13 +2442,14 @@ components: description: >- Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, - `application_fee_refund`, `charge`, `connect_collection_transfer`, + `application_fee_refund`, `charge`, `climate_order_purchase`, + `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, - `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, - `obligation_reversal_inbound`, `obligation_reversal_outbound`, - `obligation_payout`, `obligation_payout_failure`, `payment`, - `payment_failure_refund`, `payment_refund`, `payment_reversal`, + `issuing_transaction`, `obligation_outbound`, + `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, + `payment_network_reserve_hold`, `payment_network_reserve_release`, + `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, @@ -2268,22 +2467,23 @@ components: - application_fee - application_fee_refund - charge + - climate_order_purchase + - climate_order_refund - connect_collection_transfer - contribution - issuing_authorization_hold - issuing_authorization_release - issuing_dispute - issuing_transaction - - obligation_inbound - obligation_outbound - - obligation_payout - - obligation_payout_failure - obligation_reversal_inbound - - obligation_reversal_outbound - payment - payment_failure_refund + - payment_network_reserve_hold + - payment_network_reserve_release - payment_refund - payment_reversal + - payment_unreconciled - payout - payout_cancel - payout_failure @@ -2479,15 +2679,17 @@ components: run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be - `verification_failed`. If a transfer sent to this bank account - fails, we'll set the status to `errored` and will not continue to - send transfers until the bank details are updated. + `verification_failed`. If a payout sent to this bank account fails, + we'll set the status to `errored` and will not continue to send + [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) + until the bank details are updated. For external accounts, possible values are `new`, `errored` and - `verification_failed`. If a transfer fails, the status is set to - `errored` and transfers are stopped until account details are - updated. In India, if we can't [verify the owner of the bank + `verification_failed`. If a payout fails, the status is set to + `errored` and scheduled payouts are stopped until account details + are updated. In the US and India, if we can't [verify the owner of + the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for @@ -2651,6 +2853,14 @@ components: in seconds since the Unix epoch. format: unix-time type: integer + next_refresh_available_at: + description: >- + Time at which the next balance refresh can be initiated. This value + will be `null` when `status` is `pending`. Measured in seconds since + the Unix epoch. + format: unix-time + nullable: true + type: integer status: description: The status of the last refresh attempt. enum: @@ -2699,6 +2909,315 @@ components: title: BankConnectionsResourceOwnershipRefresh type: object x-expandableFields: [] + bank_connections_resource_transaction_refresh: + description: '' + properties: + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + 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 + next_refresh_available_at: + description: >- + Time at which the next transaction refresh can be initiated. This + value will be `null` when `status` is `pending`. Measured in seconds + since the Unix epoch. + format: unix-time + nullable: true + type: integer + status: + description: The status of the last refresh attempt. + enum: + - failed + - pending + - succeeded + type: string + required: + - id + - last_attempted_at + - status + title: BankConnectionsResourceTransactionRefresh + type: object + x-expandableFields: [] + bank_connections_resource_transaction_resource_status_transitions: + description: '' + properties: + posted_at: + description: >- + Time at which this transaction posted. Measured in seconds since the + Unix epoch. + format: unix-time + nullable: true + type: integer + void_at: + description: >- + Time at which this transaction was voided. Measured in seconds since + the Unix epoch. + format: unix-time + nullable: true + type: integer + title: BankConnectionsResourceTransactionResourceStatusTransitions + type: object + x-expandableFields: [] + billing.meter: + description: >- + A billing meter is a resource that allows you to track usage of a + particular event. For example, you might create a billing meter to track + the number of API calls made by a particular user. You can then use the + billing meter to charge the user for the number of API calls they make. + properties: + created: + description: >- + Time at which the object was created. Measured in seconds since the + Unix epoch. + format: unix-time + type: integer + customer_mapping: + $ref: >- + #/components/schemas/billing_meter_resource_customer_mapping_settings + default_aggregation: + $ref: '#/components/schemas/billing_meter_resource_aggregation_settings' + display_name: + description: The meter's name. + maxLength: 5000 + type: string + event_name: + description: >- + The name of the usage event to record usage for. Corresponds with + the `event_name` field on usage events. + maxLength: 5000 + type: string + event_time_window: + description: 'The time window to pre-aggregate usage events for, if any.' + enum: + - day + - hour + 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 + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - billing.meter + type: string + status: + description: The meter's status. + enum: + - active + - inactive + type: string + status_transitions: + $ref: >- + #/components/schemas/billing_meter_resource_billing_meter_status_transitions + updated: + description: >- + Time at which the object was last updated. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + value_settings: + $ref: '#/components/schemas/billing_meter_resource_billing_meter_value' + required: + - created + - customer_mapping + - default_aggregation + - display_name + - event_name + - id + - livemode + - object + - status + - status_transitions + - updated + - value_settings + title: BillingMeter + type: object + x-expandableFields: + - customer_mapping + - default_aggregation + - status_transitions + - value_settings + x-resourceId: billing.meter + billing.meter_event: + description: >- + A billing meter event represents a customer's usage of a product. Meter + events are used to bill a customer based on their usage. + + Meter events are associated with billing meters, which define the shape + of the event's payload and how those events are aggregated for billing. + properties: + created: + description: >- + Time at which the object was created. Measured in seconds since the + Unix epoch. + format: unix-time + type: integer + event_name: + description: >- + The name of the meter event. Corresponds with the `event_name` field + on a meter. + maxLength: 100 + type: string + identifier: + description: A unique identifier for the event. + 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: + - billing.meter_event + type: string + payload: + additionalProperties: + maxLength: 100 + type: string + description: The payload of the event. + type: object + timestamp: + description: >- + The timestamp passed in when creating the event. Measured in seconds + since the Unix epoch. + format: unix-time + type: integer + required: + - created + - event_name + - identifier + - livemode + - object + - payload + - timestamp + title: BillingMeterEvent + type: object + x-expandableFields: [] + x-resourceId: billing.meter_event + billing.meter_event_adjustment: + description: >- + A billing meter event adjustment represents the status of a meter event + adjustment. + properties: + cancel: + $ref: >- + #/components/schemas/billing_meter_resource_billing_meter_event_adjustment_cancel + event_name: + description: >- + The name of the meter event. Corresponds with the `event_name` field + on a meter. + maxLength: 100 + 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: + - billing.meter_event_adjustment + type: string + status: + description: The meter event adjustment's status. + enum: + - complete + - pending + type: string + type: + description: >- + Specifies whether to cancel a single event or a range of events for + a time period. + enum: + - cancel + type: string + required: + - cancel + - event_name + - livemode + - object + - status + - type + title: BillingMeterEventAdjustment + type: object + x-expandableFields: + - cancel + x-resourceId: billing.meter_event_adjustment + billing.meter_event_summary: + description: >- + A billing meter event summary represents an aggregated view of a + customer's billing meter events within a specified timeframe. It + indicates how much + + usage was accrued by a customer for that period. + properties: + aggregated_value: + description: >- + Aggregated value of all the events within start_time (inclusive) and + end_time (inclusive). The aggregation strategy is defined on meter + via `default_aggregation``. + type: number + end_time: + description: End timestamp for this usage summary (inclusive). + 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 + meter: + description: The meter associated with this usage summary. + maxLength: 5000 + type: string + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - billing.meter_event_summary + type: string + start_time: + description: Start timestamp for this usage summary (inclusive). + format: unix-time + type: integer + required: + - aggregated_value + - end_time + - id + - livemode + - meter + - object + - start_time + title: BillingMeterEventSummary + type: object + x-expandableFields: [] + x-resourceId: billing.meter_event_summary billing_details: description: '' properties: @@ -2726,6 +3245,79 @@ components: type: object x-expandableFields: - address + billing_meter_resource_aggregation_settings: + description: '' + properties: + formula: + description: Specifies how events are aggregated. + enum: + - count + - sum + type: string + required: + - formula + title: BillingMeterResourceAggregationSettings + type: object + x-expandableFields: [] + billing_meter_resource_billing_meter_event_adjustment_cancel: + description: '' + properties: + identifier: + description: Unique identifier for the event. + maxLength: 100 + type: string + required: + - identifier + title: BillingMeterResourceBillingMeterEventAdjustmentCancel + type: object + x-expandableFields: [] + billing_meter_resource_billing_meter_status_transitions: + description: '' + properties: + deactivated_at: + description: >- + The time the meter was deactivated, if any. Measured in seconds + since Unix epoch. + format: unix-time + nullable: true + type: integer + title: BillingMeterResourceBillingMeterStatusTransitions + type: object + x-expandableFields: [] + billing_meter_resource_billing_meter_value: + description: '' + properties: + event_payload_key: + description: >- + The key in the usage event payload to use as the value for this + meter. + maxLength: 5000 + type: string + required: + - event_payload_key + title: BillingMeterResourceBillingMeterValue + type: object + x-expandableFields: [] + billing_meter_resource_customer_mapping_settings: + description: '' + properties: + event_payload_key: + description: >- + The key in the usage event payload to use for mapping the event to a + customer. + maxLength: 5000 + type: string + type: + description: The method for mapping a meter event to a customer. + enum: + - by_id + type: string + required: + - event_payload_key + - type + title: BillingMeterResourceCustomerMappingSettings + type: object + x-expandableFields: [] billing_portal.configuration: description: >- A portal configuration describes the functionality and behavior of a @@ -3294,6 +3886,8 @@ components: maxLength: 5000 nullable: true type: string + networks: + $ref: '#/components/schemas/token_card_networks' object: description: >- String representing the object's type. Objects of the same type @@ -3303,9 +3897,10 @@ components: type: string 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. + For external accounts that are cards, possible values are `new` and + `errored`. If a payout fails, the status is set to `errored` and + [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) + are stopped until account details are updated. maxLength: 5000 nullable: true type: string @@ -3330,6 +3925,7 @@ components: x-expandableFields: - account - customer + - networks x-resourceId: card card_generated_from_payment_method_details: description: '' @@ -4034,7 +4630,7 @@ components: billing_address_collection: description: >- Describes whether Checkout should collect the customer's billing - address. + address. Defaults to `auto`. enum: - auto - required @@ -4056,6 +4652,13 @@ components: maxLength: 5000 nullable: true type: string + client_secret: + description: >- + Client secret to be used when initializing Stripe.js embedded + checkout. + maxLength: 5000 + nullable: true + type: string consent: anyOf: - $ref: '#/components/schemas/payment_pages_checkout_session_consent' @@ -4094,7 +4697,7 @@ components: custom_fields: description: >- Collect additional information from your customer using custom - fields. Up to 2 fields are supported. + fields. Up to 3 fields are supported. items: $ref: '#/components/schemas/payment_pages_checkout_session_custom_fields' type: array @@ -4138,8 +4741,8 @@ components: #/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 the customer's email is present on - Sessions in `setup` mode. + the customer's tax IDs. Customer's address details are not present + on Sessions in `setup` mode. nullable: true customer_email: description: >- @@ -4317,7 +4920,7 @@ components: payment_method_collection: description: >- Configure whether a Checkout Session should collect a payment - method. + method. Defaults to `always`. enum: - always - if_required @@ -4368,6 +4971,24 @@ components: maxLength: 5000 nullable: true type: string + redirect_on_completion: + description: >- + This parameter applies to `ui_mode: embedded`. Learn more about the + [redirect + behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) + of embedded sessions. Defaults to `always`. + enum: + - always + - if_required + - never + type: string + return_url: + description: >- + Applies to Checkout Sessions with `ui_mode: embedded`. The URL to + redirect your customer back to after they authenticate or cancel + their payment on the payment method's app or site. + maxLength: 5000 + type: string setup_intent: anyOf: - maxLength: 5000 @@ -4423,10 +5044,8 @@ components: relevant text on the page, such as the submit button. `submit_type` can only be - specified on Checkout Sessions in `payment` mode, but not Checkout - Sessions - - in `subscription` or `setup` mode. + specified on Checkout Sessions in `payment` mode. If blank or + `auto`, `pay` is used. enum: - auto - book @@ -4462,6 +5081,14 @@ components: #/components/schemas/payment_pages_checkout_session_total_details description: Tax and discount details for the computed total amount. nullable: true + ui_mode: + description: The UI mode of the Session. Defaults to `hosted`. + enum: + - embedded + - hosted + nullable: true + type: string + x-stripeBypassValidation: true url: description: >- The URL to the Checkout Session. Redirect customers to this URL to @@ -4830,6 +5457,24 @@ components: properties: installments: $ref: '#/components/schemas/checkout_card_installments_options' + 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. If not provided, this value + defaults to `automatic`. Read our guide on [manually requesting 3D + Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) + for more information on how this configuration interacts with Radar + and our SCA Engine. + enum: + - any + - automatic + - challenge + type: string + x-stripeBypassValidation: true setup_future_usage: description: >- Indicates that you intend to make future payments with this @@ -4875,6 +5520,8 @@ components: characters. maxLength: 5000 type: string + required: + - request_three_d_secure title: CheckoutCardPaymentMethodOptions type: object x-expandableFields: @@ -5320,6 +5967,58 @@ components: title: CheckoutPaynowPaymentMethodOptions type: object x-expandableFields: [] + checkout_paypal_payment_method_options: + 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: string + reference: + description: >- + A reference of the PayPal transaction visible to customer which is + mapped to PayPal's invoice ID. This must be a globally unique ID if + you have configured in your PayPal settings to block multiple + payments per invoice ID. + 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 + - off_session + type: string + title: CheckoutPaypalPaymentMethodOptions + type: object + x-expandableFields: [] checkout_pix_payment_method_options: description: '' properties: @@ -5330,6 +6029,12 @@ components: title: CheckoutPixPaymentMethodOptions type: object x-expandableFields: [] + checkout_revolut_pay_payment_method_options: + description: '' + properties: {} + title: CheckoutRevolutPayPaymentMethodOptions + type: object + x-expandableFields: [] checkout_sepa_debit_payment_method_options: description: '' properties: @@ -5409,12 +6114,18 @@ components: $ref: '#/components/schemas/checkout_p24_payment_method_options' paynow: $ref: '#/components/schemas/checkout_paynow_payment_method_options' + paypal: + $ref: '#/components/schemas/checkout_paypal_payment_method_options' pix: $ref: '#/components/schemas/checkout_pix_payment_method_options' + revolut_pay: + $ref: '#/components/schemas/checkout_revolut_pay_payment_method_options' sepa_debit: $ref: '#/components/schemas/checkout_sepa_debit_payment_method_options' sofort: $ref: '#/components/schemas/checkout_sofort_payment_method_options' + swish: + $ref: '#/components/schemas/checkout_swish_payment_method_options' us_bank_account: $ref: '#/components/schemas/checkout_us_bank_account_payment_method_options' title: CheckoutSessionPaymentMethodOptions @@ -5442,9 +6153,12 @@ components: - oxxo - p24 - paynow + - paypal - pix + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account checkout_sofort_payment_method_options: description: '' @@ -5474,6 +6188,19 @@ components: title: CheckoutSofortPaymentMethodOptions type: object x-expandableFields: [] + checkout_swish_payment_method_options: + description: '' + properties: + reference: + description: >- + The order reference that will be displayed to customers in the Swish + application. Defaults to the `id` of the Payment Intent. + maxLength: 5000 + nullable: true + type: string + title: CheckoutSwishPaymentMethodOptions + type: object + x-expandableFields: [] checkout_us_bank_account_payment_method_options: description: '' properties: @@ -5514,28 +6241,91 @@ components: type: object x-expandableFields: - financial_connections - connect_collection_transfer: - description: '' + climate.order: + description: >- + Orders represent your intent to purchase a particular Climate product. + When you create an order, the + + payment is deducted from your merchant balance. properties: - amount: - description: 'Amount transferred, in cents (or local equivalent).' + amount_fees: + description: >- + Total amount of [Frontier](https://frontierclimate.com/)'s service + fees in the currency's smallest unit. + type: integer + amount_subtotal: + description: Total amount of the carbon removal in the currency's smallest unit. + type: integer + amount_total: + description: >- + Total amount of the order including fees in the currency's smallest + unit. + type: integer + beneficiary: + $ref: '#/components/schemas/climate_removals_beneficiary' + canceled_at: + description: >- + Time at which the order was canceled. Measured in seconds since the + Unix epoch. + format: unix-time + nullable: true + type: integer + cancellation_reason: + description: Reason for the cancellation of this order. + enum: + - expired + - product_unavailable + - requested + nullable: true + type: string + x-stripeBypassValidation: true + certificate: + description: 'For delivered orders, a URL to a delivery certificate for the order.' + maxLength: 5000 + nullable: true + type: string + confirmed_at: + description: >- + Time at which the order was confirmed. 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 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). + lowercase, representing the currency for this order. + maxLength: 5000 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' + delayed_at: + description: >- + Time at which the order's expected_delivery_year was delayed. + Measured in seconds since the Unix epoch. + format: unix-time + nullable: true + type: integer + delivered_at: + description: >- + Time at which the order was delivered. Measured in seconds since the + Unix epoch. + format: unix-time + nullable: true + type: integer + delivery_details: + description: Details about the delivery of carbon removal for this order. + items: + $ref: '#/components/schemas/climate_removals_order_deliveries' + type: array + expected_delivery_year: + description: The year this order is expected to be delivered. + type: integer id: description: Unique identifier for the object. maxLength: 5000 @@ -5545,70 +6335,119 @@ components: 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 + metric_tons: + description: Quantity of carbon removal that is included in this order. + format: decimal + type: string object: description: >- String representing the object's type. Objects of the same type share the same value. enum: - - connect_collection_transfer + - climate.order + type: string + product: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/climate.product' + description: Unique ID for the Climate `Product` this order is purchasing. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/climate.product' + product_substituted_at: + description: >- + Time at which the order's product was substituted for a different + product. Measured in seconds since the Unix epoch. + format: unix-time + nullable: true + type: integer + status: + description: The current status of this order. + enum: + - awaiting_funds + - canceled + - confirmed + - delivered + - open type: string required: - - amount + - amount_fees + - amount_subtotal + - amount_total + - created - currency - - destination + - delivery_details + - expected_delivery_year - id - livemode + - metadata + - metric_tons - object - title: ConnectCollectionTransfer - type: object - x-expandableFields: - - destination - connect_embedded_account_session_create_components: - description: '' - properties: - account_onboarding: - $ref: '#/components/schemas/connect_embedded_base_config_claim' - required: - - account_onboarding - title: ConnectEmbeddedAccountSessionCreateComponents + - product + - status + title: ClimateRemovalsOrders type: object x-expandableFields: - - account_onboarding - connect_embedded_base_config_claim: - description: '' - properties: - enabled: - description: Whether the embedded component is enabled. - type: boolean - required: - - enabled - title: ConnectEmbeddedBaseConfigClaim - type: object - x-expandableFields: [] - country_spec: + - beneficiary + - delivery_details + - product + x-resourceId: climate.order + climate.product: 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. - + A Climate product represents a type of carbon removal unit available for + reservation. - You can also view the information from this API call as [an online - - guide](/docs/connect/required-verification-information). + You can retrieve it to see the current price and availability. properties: - default_currency: + created: description: >- - The default currency for this country. This applies to both payment - methods and bank accounts. + Time at which the object was created. Measured in seconds since the + Unix epoch. + format: unix-time + type: integer + current_prices_per_metric_ton: + additionalProperties: + $ref: '#/components/schemas/climate_removals_products_price' + description: >- + Current prices for a metric ton of carbon removal in a currency's + smallest unit. + type: object + delivery_year: + description: The year in which the carbon removal is expected to be delivered. + nullable: true + type: integer + id: + description: >- + Unique identifier for the object. For convenience, Climate product + IDs are human-readable strings + + that start with `climsku_`. See [carbon removal + inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) + + for a list of available carbon removal products. maxLength: 5000 type: string - id: + livemode: description: >- - Unique identifier for the object. Represented as the ISO country - code for this country. + Has the value `true` if the object exists in live mode or the value + `false` if the object exists in test mode. + type: boolean + metric_tons_available: + description: The quantity of metric tons available for reservation. + format: decimal + type: string + name: + description: The Climate product's name. maxLength: 5000 type: string object: @@ -5616,280 +6455,577 @@ components: String representing the object's type. Objects of the same type share the same value. enum: - - country_spec + - climate.product 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: + suppliers: description: >- - Currencies that can be accepted in the specified country (for - payments). + The carbon removal suppliers that fulfill orders for this Climate + product. items: - maxLength: 5000 - type: string + $ref: '#/components/schemas/climate.supplier' type: array - supported_payment_methods: + required: + - created + - current_prices_per_metric_ton + - id + - livemode + - metric_tons_available + - name + - object + - suppliers + title: ClimateRemovalsProducts + type: object + x-expandableFields: + - current_prices_per_metric_ton + - suppliers + x-resourceId: climate.product + climate.supplier: + description: A supplier of carbon removal. + properties: + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + info_url: + description: Link to a webpage to learn more about the supplier. + maxLength: 5000 + type: string + livemode: 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. + Has the value `true` if the object exists in live mode or the value + `false` if the object exists in test mode. + type: boolean + locations: + description: The locations in which this supplier operates. items: - maxLength: 5000 - type: string + $ref: '#/components/schemas/climate_removals_location' type: array - verification_fields: - $ref: '#/components/schemas/country_spec_verification_fields' + name: + description: Name of this carbon removal supplier. + maxLength: 5000 + type: string + object: + description: >- + String representing the object’s type. Objects of the same type + share the same value. + enum: + - climate.supplier + type: string + removal_pathway: + description: The scientific pathway used for carbon removal. + enum: + - biomass_carbon_removal_and_storage + - direct_air_capture + - enhanced_weathering + type: string required: - - default_currency - id + - info_url + - livemode + - locations + - name - object - - supported_bank_account_currencies - - supported_payment_currencies - - supported_payment_methods - - supported_transfer_countries - - verification_fields - title: CountrySpec + - removal_pathway + title: ClimateRemovalsSuppliers type: object x-expandableFields: - - verification_fields - x-resourceId: country_spec - country_spec_verification_field_details: + - locations + x-resourceId: climate.supplier + climate_removals_beneficiary: description: '' properties: - additional: - description: Additional fields which are only required for some users. - items: - maxLength: 5000 - type: string - type: array - minimum: - description: Fields which every account must eventually provide. - items: - maxLength: 5000 - type: string - type: array + public_name: + description: Publicly displayable name for the end beneficiary of carbon removal. + maxLength: 5000 + type: string required: - - additional - - minimum - title: CountrySpecVerificationFieldDetails + - public_name + title: ClimateRemovalsBeneficiary type: object x-expandableFields: [] - country_spec_verification_fields: + climate_removals_location: description: '' properties: - company: - $ref: '#/components/schemas/country_spec_verification_field_details' - individual: - $ref: '#/components/schemas/country_spec_verification_field_details' + city: + description: The city where the supplier is located. + maxLength: 5000 + nullable: true + type: string + country: + description: >- + Two-letter ISO code representing the country where the supplier is + located. + maxLength: 5000 + type: string + latitude: + description: The geographic latitude where the supplier is located. + nullable: true + type: number + longitude: + description: The geographic longitude where the supplier is located. + nullable: true + type: number + region: + description: The state/county/province/region where the supplier is located. + maxLength: 5000 + nullable: true + type: string required: - - company - - individual - title: CountrySpecVerificationFields + - country + title: ClimateRemovalsLocation + type: object + x-expandableFields: [] + climate_removals_order_deliveries: + description: The delivery of a specified quantity of carbon for an order. + properties: + delivered_at: + description: >- + Time at which the delivery occurred. Measured in seconds since the + Unix epoch. + format: unix-time + type: integer + location: + anyOf: + - $ref: '#/components/schemas/climate_removals_location' + description: Specific location of this delivery. + nullable: true + metric_tons: + description: Quantity of carbon removal supplied by this delivery. + maxLength: 5000 + type: string + registry_url: + description: >- + Once retired, a URL to the registry entry for the tons from this + delivery. + maxLength: 5000 + nullable: true + type: string + supplier: + $ref: '#/components/schemas/climate.supplier' + required: + - delivered_at + - metric_tons + - supplier + title: ClimateRemovalsOrderDeliveries type: object x-expandableFields: - - company - - individual - coupon: + - location + - supplier + climate_removals_products_price: + description: '' + properties: + amount_fees: + description: >- + Fees for one metric ton of carbon removal in the currency's smallest + unit. + type: integer + amount_subtotal: + description: >- + Subtotal for one metric ton of carbon removal (excluding fees) in + the currency's smallest unit. + type: integer + amount_total: + description: >- + Total for one metric ton of carbon removal (including fees) in the + currency's smallest unit. + type: integer + required: + - amount_fees + - amount_subtotal + - amount_total + title: ClimateRemovalsProductsPrice + type: object + x-expandableFields: [] + confirmation_token: description: >- - A coupon contains information about a percent-off or amount-off discount - you + ConfirmationTokens help transport client side data collected by Stripe + JS over - 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), + to your server for confirming a PaymentIntent or SetupIntent. If the + confirmation - [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). + is successful, values present on the ConfirmationToken are written onto + the Intent. + + + To learn more about how to use ConfirmationToken, visit the related + guides: + + - [Finalize payments on the + server](https://stripe.com/docs/payments/finalize-payments-on-the-server) + + - [Build two-step + confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation). properties: - amount_off: - description: >- - Amount (in the `currency` specified) that will be taken off the - subtotal of any invoices for this customer. - nullable: true - type: integer - applies_to: - $ref: '#/components/schemas/coupon_applies_to' created: description: >- Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - currency: + expires_at: 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. + Time at which this ConfirmationToken expires and can no longer be + used to confirm a PaymentIntent or SetupIntent. This is set to null + once this ConfirmationToken has been used. + format: unix-time nullable: true + type: integer + id: + description: Unique identifier for the object. + maxLength: 5000 type: string - currency_options: - additionalProperties: - $ref: '#/components/schemas/coupon_currency_option' + livemode: 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: + 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_data: + anyOf: + - $ref: '#/components/schemas/confirmation_tokens_resource_mandate_data' + description: Data used for generating a Mandate. + nullable: true + object: description: >- - One of `forever`, `once`, and `repeating`. Describes how long a - customer who applies this coupon will get the discount. + String representing the object's type. Objects of the same type + share the same value. enum: - - forever - - once - - repeating + - confirmation_token type: string - x-stripeBypassValidation: true - duration_in_months: + payment_intent: description: >- - If `duration` is `repeating`, the number of months the coupon - applies. Null if coupon `duration` is `forever` or `once`. - nullable: true - type: integer - id: - description: Unique identifier for the object. + ID of the PaymentIntent that this ConfirmationToken was used to + confirm, or null if this ConfirmationToken has not yet been used. 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 - max_redemptions: - description: >- - Maximum number of times this coupon can be redeemed, in total, - across all customers, before it is no longer valid. nullable: true - type: integer - metadata: - additionalProperties: - maxLength: 500 - type: string + type: string + payment_method_preview: + anyOf: + - $ref: >- + #/components/schemas/confirmation_tokens_resource_payment_method_preview description: >- - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that - you can attach to an object. This can be useful for storing - additional information about the object in a structured format. + Payment details collected by the Payment Element, used to create a + PaymentMethod when a PaymentIntent or SetupIntent is confirmed with + this ConfirmationToken. nullable: true - type: object - name: - description: >- - Name of the coupon displayed to customers on for instance invoices - or receipts. + return_url: + description: Return URL used to confirm the Intent. maxLength: 5000 nullable: true type: string - object: + setup_future_usage: description: >- - String representing the object's type. Objects of the same type - share the same value. + Indicates that you intend to make future payments with this + ConfirmationToken's payment method. + + + The presence of this property will [attach the payment + method](https://stripe.com/docs/payments/save-during-payment) to the + PaymentIntent's Customer, if present, after the PaymentIntent is + confirmed and any required actions from the user are complete. enum: - - coupon + - off_session + - on_session + nullable: true type: string - percent_off: + setup_intent: description: >- - Percent that will be taken off the subtotal of any invoices for this - customer for the duration of the coupon. For example, a coupon with - percent_off of 50 will make a $ (or local equivalent)100 invoice $ - (or local equivalent)50 instead. + ID of the SetupIntent that this ConfirmationToken was used to + confirm, or null if this ConfirmationToken has not yet been used. + maxLength: 5000 nullable: true - type: number - redeem_by: - description: Date after which the coupon can no longer be redeemed. - format: unix-time + type: string + shipping: + anyOf: + - $ref: '#/components/schemas/confirmation_tokens_resource_shipping' + description: Shipping information collected on this ConfirmationToken. nullable: true - type: integer - times_redeemed: - description: Number of times this coupon has been applied to a customer. - type: integer - valid: + use_stripe_sdk: description: >- - Taking account of the above properties, whether this coupon can - still be applied to a customer. + Indicates whether the Stripe SDK is used to handle confirmation + flow. Defaults to `true` on ConfirmationToken. type: boolean required: - created - - duration - id - livemode - object - - times_redeemed - - valid - title: Coupon + - use_stripe_sdk + title: ConfirmationTokensResourceConfirmationToken type: object x-expandableFields: - - applies_to - - currency_options - x-resourceId: coupon - coupon_applies_to: - description: '' + - mandate_data + - payment_method_preview + - shipping + x-resourceId: confirmation_token + confirmation_tokens_resource_mandate_data: + description: Data used for generating a Mandate. properties: - products: - description: A list of product IDs this coupon applies to - items: - maxLength: 5000 - type: string - type: array + customer_acceptance: + $ref: >- + #/components/schemas/confirmation_tokens_resource_mandate_data_resource_customer_acceptance required: - - products - title: CouponAppliesTo + - customer_acceptance + title: ConfirmationTokensResourceMandateData type: object - x-expandableFields: [] - coupon_currency_option: - description: '' + x-expandableFields: + - customer_acceptance + confirmation_tokens_resource_mandate_data_resource_customer_acceptance: + description: This hash contains details about the customer acceptance of the Mandate. properties: - amount_off: + online: + anyOf: + - $ref: >- + #/components/schemas/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online description: >- - Amount (in the `currency` specified) that will be taken off the - subtotal of any invoices for this customer. - type: integer + If this is a Mandate accepted online, this hash contains details + about the online acceptance. + nullable: true + type: + description: >- + The type of customer acceptance information included with the + Mandate. + maxLength: 5000 + type: string required: - - amount_off - title: CouponCurrencyOption + - type + title: ConfirmationTokensResourceMandateDataResourceCustomerAcceptance type: object - x-expandableFields: [] - credit_note: - description: >- - Issue a credit note to adjust an invoice's amount after the invoice is - finalized. - - - Related guide: [Credit - notes](https://stripe.com/docs/billing/invoices/credit-notes) + x-expandableFields: + - online + confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online: + description: This hash contains details about the online acceptance. properties: - amount: + ip_address: + description: The IP address from which the Mandate was accepted by the customer. + maxLength: 5000 + nullable: true + type: string + user_agent: description: >- - The integer amount in cents (or local equivalent) representing the - total amount of the credit note, including tax. - type: integer - amount_shipping: - description: This is the sum of all the shipping amounts. - type: integer - created: + The user agent of the browser from which the Mandate was accepted by + the customer. + maxLength: 5000 + nullable: true + type: string + title: >- + ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline + type: object + x-expandableFields: [] + confirmation_tokens_resource_payment_method_preview: + description: Details of the PaymentMethod collected by Payment Element + 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' + cashapp: + $ref: '#/components/schemas/payment_method_cashapp' + 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' + 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' + mobilepay: + $ref: '#/components/schemas/payment_method_mobilepay' + oxxo: + $ref: '#/components/schemas/payment_method_oxxo' + p24: + $ref: '#/components/schemas/payment_method_p24' + paynow: + $ref: '#/components/schemas/payment_method_paynow' + paypal: + $ref: '#/components/schemas/payment_method_paypal' + pix: + $ref: '#/components/schemas/payment_method_pix' + promptpay: + $ref: '#/components/schemas/payment_method_promptpay' + revolut_pay: + $ref: '#/components/schemas/payment_method_revolut_pay' + sepa_debit: + $ref: '#/components/schemas/payment_method_sepa_debit' + sofort: + $ref: '#/components/schemas/payment_method_sofort' + swish: + $ref: '#/components/schemas/payment_method_swish' + type: description: >- - Time at which the object was created. Measured in seconds since the - Unix epoch. - format: unix-time + 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 + - cashapp + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - interac_present + - klarna + - konbini + - link + - mobilepay + - oxxo + - p24 + - paynow + - paypal + - pix + - promptpay + - revolut_pay + - sepa_debit + - sofort + - swish + - us_bank_account + - wechat_pay + - zip + 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' + zip: + $ref: '#/components/schemas/payment_method_zip' + required: + - billing_details + - type + title: ConfirmationTokensResourcePaymentMethodPreview + type: object + x-expandableFields: + - acss_debit + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - billing_details + - blik + - boleto + - card + - card_present + - cashapp + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - interac_present + - klarna + - konbini + - link + - mobilepay + - oxxo + - p24 + - paynow + - paypal + - pix + - promptpay + - revolut_pay + - sepa_debit + - sofort + - swish + - us_bank_account + - wechat_pay + - zip + confirmation_tokens_resource_shipping: + description: '' + properties: + address: + $ref: '#/components/schemas/address' + name: + description: Recipient name. + maxLength: 5000 + type: string + phone: + description: Recipient phone (including extension). + maxLength: 5000 + nullable: true + type: string + required: + - address + - name + title: ConfirmationTokensResourceShipping + type: object + x-expandableFields: + - address + connect_account_reference: + description: '' + properties: + account: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/account' + description: The connected account being referenced when `type` is `account`. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/account' + type: + description: Type of the account referenced. + enum: + - account + - self + type: string + required: + - type + title: ConnectAccountReference + type: object + x-expandableFields: + - account + connect_collection_transfer: + description: '' + properties: + amount: + description: 'Amount transferred, in cents (or local equivalent).' type: integer currency: description: >- @@ -5898,519 +7034,338 @@ components: 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. - x-expansionResources: - oneOf: - - $ref: '#/components/schemas/customer' - - $ref: '#/components/schemas/deleted_customer' - customer_balance_transaction: + destination: anyOf: - maxLength: 5000 type: string - - $ref: '#/components/schemas/customer_balance_transaction' - description: Customer balance transaction related to this credit note. - nullable: true + - $ref: '#/components/schemas/account' + description: ID of the account that funds are being collected for. x-expansionResources: oneOf: - - $ref: '#/components/schemas/customer_balance_transaction' - discount_amount: - description: >- - The integer amount in cents (or local equivalent) representing the - total amount of discount that was credited. - type: integer - discount_amounts: - description: The aggregate amounts calculated per discount for all line items. - items: - $ref: '#/components/schemas/discounts_resource_discount_amount' - type: array - effective_at: - description: >- - The date when this credit note is in effect. Same as `created` - unless overwritten. When defined, this value replaces the - system-generated 'Date of issue' printed on the credit note PDF. - format: unix-time - nullable: true - type: integer + - $ref: '#/components/schemas/account' 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. - x-expansionResources: - oneOf: - - $ref: '#/components/schemas/invoice' - lines: - description: Line items that make up the credit note - properties: - data: - description: Details about each object. - items: - $ref: '#/components/schemas/credit_note_line_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: CreditNoteLinesList - 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 - memo: - description: Customer-facing text that appears on the credit note PDF. - 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. - nullable: true - type: object - number: - description: >- - A unique number that identifies this particular credit note and - appears on the PDF of the credit note and its associated invoice. - maxLength: 5000 - type: string object: description: >- String representing the object's type. Objects of the same type share the same value. enum: - - credit_note - type: string - out_of_band_amount: - description: Amount that was credited outside of Stripe. - nullable: true - type: integer - pdf: - description: The link to download the PDF of the credit note. - maxLength: 5000 - type: string - reason: - description: >- - Reason for issuing this credit note, one of `duplicate`, - `fraudulent`, `order_change`, or `product_unsatisfactory` - enum: - - duplicate - - fraudulent - - order_change - - product_unsatisfactory - nullable: true - type: string - refund: - anyOf: - - maxLength: 5000 - type: string - - $ref: '#/components/schemas/refund' - description: Refund related to this credit note. - nullable: true - x-expansionResources: - oneOf: - - $ref: '#/components/schemas/refund' - shipping_cost: - anyOf: - - $ref: '#/components/schemas/invoices_shipping_cost' - description: >- - The details of the cost of shipping, including the ShippingRate - applied to the invoice. - nullable: true - status: - 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: - - issued - - void + - connect_collection_transfer type: string - subtotal: - description: >- - The integer amount in cents (or local equivalent) representing the - amount of the credit note, excluding exclusive tax and invoice level - discounts. - type: integer - subtotal_excluding_tax: - description: >- - The integer amount in cents (or local equivalent) 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 items. - items: - $ref: '#/components/schemas/credit_note_tax_amount' - type: array - total: - description: >- - The integer amount in cents (or local equivalent) representing the - total amount of the credit note, including tax and all discount. - type: integer - total_excluding_tax: - description: >- - The integer amount in cents (or local equivalent) 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. A `post_payment` credit note means it was issued when the - invoice was paid. - enum: - - post_payment - - pre_payment - type: string - voided_at: - description: The time that the credit note was voided. - format: unix-time - nullable: true - type: integer required: - amount - - amount_shipping - - created - currency - - customer - - discount_amount - - discount_amounts + - destination - id - - invoice - - lines - livemode - - number - object - - pdf - - status - - subtotal - - tax_amounts - - total - - type - title: CreditNote + title: ConnectCollectionTransfer type: object x-expandableFields: - - customer - - customer_balance_transaction - - discount_amounts - - invoice - - lines - - refund - - shipping_cost - - tax_amounts - x-resourceId: credit_note - credit_note_line_item: - description: The credit note line item object + - destination + connect_embedded_account_config: + description: '' properties: - amount: - description: >- - The integer amount in cents (or local equivalent) 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 cents (or local equivalent) 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 - nullable: true - type: string - discount_amount: - description: >- - The integer amount in cents (or local equivalent) representing the - discount being credited for this line item. - type: integer - discount_amounts: - description: The amount of discount calculated per discount for this line item - items: - $ref: '#/components/schemas/discounts_resource_discount_amount' - type: array - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - invoice_line_item: - description: ID of the invoice line item being credited - 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: Whether the embedded component is enabled. type: boolean - object: - description: >- - String representing the object's type. Objects of the same type - share the same value. - enum: - - credit_note_line_item - type: string - quantity: - description: The number of units of product being credited. - nullable: true - type: integer - tax_amounts: - description: The amount of tax calculated per tax rate for this line item - items: - $ref: '#/components/schemas/credit_note_tax_amount' - type: array - tax_rates: - description: The tax rates which apply to the line item. - items: - $ref: '#/components/schemas/tax_rate' - type: array - type: + features: + $ref: '#/components/schemas/connect_embedded_account_features' + required: + - enabled + - features + title: ConnectEmbeddedAccountConfig + type: object + x-expandableFields: + - features + connect_embedded_account_features: + description: '' + properties: {} + title: ConnectEmbeddedAccountFeatures + type: object + x-expandableFields: [] + connect_embedded_account_session_create_components: + description: '' + properties: + account_onboarding: + $ref: '#/components/schemas/connect_embedded_account_config' + documents: + $ref: '#/components/schemas/connect_embedded_base_config_claim' + payment_details: + $ref: '#/components/schemas/connect_embedded_payments_config' + payments: + $ref: '#/components/schemas/connect_embedded_payments_config' + payouts: + $ref: '#/components/schemas/connect_embedded_payouts_config' + required: + - account_onboarding + - documents + - payment_details + - payments + - payouts + title: ConnectEmbeddedAccountSessionCreateComponents + type: object + x-expandableFields: + - account_onboarding + - documents + - payment_details + - payments + - payouts + connect_embedded_base_config_claim: + description: '' + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + features: + $ref: '#/components/schemas/connect_embedded_base_features' + required: + - enabled + - features + title: ConnectEmbeddedBaseConfigClaim + type: object + x-expandableFields: + - features + connect_embedded_base_features: + description: '' + properties: {} + title: ConnectEmbeddedBaseFeatures + type: object + x-expandableFields: [] + connect_embedded_payments_config: + description: '' + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + features: + $ref: '#/components/schemas/connect_embedded_payments_features' + required: + - enabled + - features + title: ConnectEmbeddedPaymentsConfig + type: object + x-expandableFields: + - features + connect_embedded_payments_features: + description: '' + properties: + capture_payments: description: >- - The type of the credit note line item, one of `invoice_line_item` or - `custom_line_item`. When the type is `invoice_line_item` there is an - additional `invoice_line_item` property on the resource the value of - which is the id of the credited line item on the invoice. - enum: - - custom_line_item - - invoice_line_item - type: string - unit_amount: - description: The cost of each unit of product being credited. - nullable: true - type: integer - unit_amount_decimal: + Whether to allow capturing and cancelling payment intents. This is + `true` by default. + type: boolean + destination_on_behalf_of_charge_management: description: >- - Same as `unit_amount`, but contains a decimal value with at most 12 - decimal places. - format: decimal - nullable: true - type: string - unit_amount_excluding_tax: + Whether to allow connected accounts to manage destination charges + that are created on behalf of them. This is `false` by default. + type: boolean + dispute_management: description: >- - The amount in cents (or local equivalent) representing the unit - amount being credited for this line item, excluding all tax and - discounts. - format: decimal - nullable: true - type: string + Whether to allow responding to disputes, including submitting + evidence and accepting disputes. This is `true` by default. + type: boolean + refund_management: + description: Whether to allow sending refunds. This is `true` by default. + type: boolean required: - - amount - - discount_amount - - discount_amounts - - id - - livemode - - object - - tax_amounts - - tax_rates - - type - title: CreditNoteLineItem + - capture_payments + - dispute_management + - refund_management + title: ConnectEmbeddedPaymentsFeatures + type: object + x-expandableFields: [] + connect_embedded_payouts_config: + description: '' + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + features: + $ref: '#/components/schemas/connect_embedded_payouts_features' + required: + - enabled + - features + title: ConnectEmbeddedPayoutsConfig type: object x-expandableFields: - - discount_amounts - - tax_amounts - - tax_rates - x-resourceId: credit_note_line_item - credit_note_tax_amount: + - features + connect_embedded_payouts_features: description: '' properties: - amount: - description: 'The amount, in cents (or local equivalent), of the tax.' - type: integer - inclusive: - description: Whether this tax amount is inclusive or exclusive. + edit_payout_schedule: + description: >- + Whether to allow payout schedule to be changed. Default `true` when + Stripe owns Loss Liability, default `false` otherwise. type: boolean - tax_rate: - anyOf: - - maxLength: 5000 - type: string - - $ref: '#/components/schemas/tax_rate' - description: The tax rate that was applied to get this tax amount. - x-expansionResources: - oneOf: - - $ref: '#/components/schemas/tax_rate' - taxability_reason: + instant_payouts: description: >- - The reasoning behind this tax, for example, if the product is tax - exempt. The possible values for this field may be extended as new - tax rules are supported. - enum: - - customer_exempt - - not_collecting - - not_subject_to_tax - - not_supported - - portion_product_exempt - - portion_reduced_rated - - portion_standard_rated - - product_exempt - - product_exempt_holiday - - proportionally_rated - - reduced_rated - - reverse_charge - - standard_rated - - taxable_basis_reduced - - zero_rated - nullable: true - type: string - x-stripeBypassValidation: true - taxable_amount: + Whether to allow creation of instant payouts. Default `true` when + Stripe owns Loss Liability, default `false` otherwise. + type: boolean + standard_payouts: description: >- - The amount on which tax is calculated, in cents (or local - equivalent). - nullable: true - type: integer + Whether to allow creation of standard payouts. Default `true` when + Stripe owns Loss Liability, default `false` otherwise. + type: boolean required: - - amount - - inclusive - - tax_rate - title: CreditNoteTaxAmount + - edit_payout_schedule + - instant_payouts + - standard_payouts + title: ConnectEmbeddedPayoutsFeatures type: object - x-expandableFields: - - tax_rate - currency_option: - description: '' + x-expandableFields: [] + 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: - custom_unit_amount: - anyOf: - - $ref: '#/components/schemas/custom_unit_amount' + default_currency: description: >- - When set, provides configuration for the amount to be adjusted by - the customer during Checkout Sessions and Payment Links. - nullable: true - tax_behavior: + The default currency for this country. This applies to both payment + methods and bank accounts. + maxLength: 5000 + type: string + id: description: >- - Only required if a [default tax - behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) - was not provided in the Stripe Tax settings. 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. + 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: - - exclusive - - inclusive - - unspecified - nullable: true + - country_spec type: string - tiers: + supported_bank_account_currencies: + additionalProperties: + items: + maxLength: 5000 + type: string + type: array description: >- - Each element represents a pricing tier. This parameter requires - `billing_scheme` to be set to `tiered`. See also the documentation - for `billing_scheme`. + 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: - $ref: '#/components/schemas/price_tier' + maxLength: 5000 + type: string type: array - unit_amount: - description: >- - The unit amount in cents (or local equivalent) to be charged, - represented as a whole integer if possible. Only set if - `billing_scheme=per_unit`. - nullable: true - type: integer - unit_amount_decimal: + supported_payment_methods: description: >- - The unit amount in cents (or local equivalent) 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 + 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: - - custom_unit_amount - - tiers - custom_unit_amount: + - verification_fields + x-resourceId: country_spec + country_spec_verification_field_details: description: '' properties: - maximum: - description: The maximum unit amount the customer can specify for this item. - nullable: true - type: integer + additional: + description: Additional fields which are only required for some users. + items: + maxLength: 5000 + type: string + type: array 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 + description: Fields which every account must eventually provide. + items: + maxLength: 5000 + type: string + type: array + required: + - additional + - minimum + title: CountrySpecVerificationFieldDetails type: object x-expandableFields: [] - customer: + country_spec_verification_fields: + description: '' + properties: + company: + $ref: '#/components/schemas/country_spec_verification_field_details' + individual: + $ref: '#/components/schemas/country_spec_verification_field_details' + required: + - company + - individual + title: CountrySpecVerificationFields + type: object + x-expandableFields: + - company + - individual + coupon: description: >- - This object represents a customer of your business. Use it to create - recurring charges and track payments that belong to the same customer. + 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 + [subscriptions](https://stripe.com/docs/api#subscriptions), + [invoices](https://stripe.com/docs/api#invoices), - Related guide: [Save a card during - payment](https://stripe.com/docs/payments/save-during-payment) + [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: - address: - anyOf: - - $ref: '#/components/schemas/address' - description: The customer's address. - nullable: true - balance: - description: >- - The current balance, if any, that's 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's added to their next - invoice. The balance only considers amounts that Stripe hasn't - successfully applied to any invoice. It doesn't reflect unpaid - invoices. This balance is only taken into account after invoices - finalize. - type: integer - cash_balance: - anyOf: - - $ref: '#/components/schemas/cash_balance' + amount_off: description: >- - The current funds being held by Stripe on behalf of the customer. - You can apply these funds towards payment intents when the source is - "cash_balance". The `settings[reconciliation_mode]` field describes - if these funds apply to these payment intents manually or - automatically. + Amount (in the `currency` specified) that will be taken off the + subtotal of any invoices for this customer. nullable: true + type: integer + applies_to: + $ref: '#/components/schemas/coupon_applies_to' created: description: >- Time at which the object was created. Measured in seconds since the @@ -6419,96 +7374,51 @@ components: type: integer currency: description: >- - Three-letter [ISO code for the - currency](https://stripe.com/docs/currencies) the customer can be - charged in for recurring billing purposes. - maxLength: 5000 + 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. nullable: true type: string - default_source: - anyOf: - - maxLength: 5000 - type: string - - $ref: '#/components/schemas/bank_account' - - $ref: '#/components/schemas/card' - - $ref: '#/components/schemas/source' + currency_options: + additionalProperties: + $ref: '#/components/schemas/coupon_currency_option' description: >- - ID of the default payment source for the customer. - - - If you use payment methods created through 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. - nullable: true - x-expansionResources: - oneOf: - - $ref: '#/components/schemas/bank_account' - - $ref: '#/components/schemas/card' - - $ref: '#/components/schemas/source' - x-stripeBypassValidation: true - delinquent: - description: >- - If Stripe bills the customer's latest invoice by automatically - charging and the latest charge fails, it sets `delinquent`` to - `true``. If Stripe bills the invoice by sending it, and the invoice - isn't paid by the due date, it also sets `delinquent`` to `true`. - - - If an invoice becomes uncollectible by - [dunning](https://stripe.com/docs/billing/automatic-collection), - `delinquent` doesn't reset to `false`. - nullable: true - type: boolean - 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: >- - An arbitrary string attached to the object. Often useful for - displaying to users. - maxLength: 5000 - nullable: true + One of `forever`, `once`, and `repeating`. Describes how long a + customer who applies this coupon will get the discount. + enum: + - forever + - once + - repeating type: string - discount: - anyOf: - - $ref: '#/components/schemas/discount' + x-stripeBypassValidation: true + duration_in_months: description: >- - Describes the current discount active on the customer, if there is - one. - nullable: true - email: - description: The customer's email address. - maxLength: 5000 + If `duration` is `repeating`, the number of months the coupon + applies. Null if coupon `duration` is `forever` or `once`. nullable: true - type: string + type: integer id: description: Unique identifier for the object. maxLength: 5000 type: string - invoice_credit_balance: - additionalProperties: - type: integer - description: >- - The current multi-currency balances, if any, that's 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's added to their next - invoice denominated in that currency. These balances don't apply to - unpaid invoices. They solely track amounts that Stripe hasn't - successfully applied to any invoice. Stripe only applies a balance - in a specific currency to an invoice after that invoice (which is in - the same currency) finalizes. - type: object - invoice_prefix: - description: The prefix for the customer used to generate unique invoice numbers. - maxLength: 5000 - nullable: true - type: string - invoice_settings: - $ref: '#/components/schemas/invoice_setting_customer_setting' 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 coupon can be redeemed, in total, + across all customers, before it is no longer valid. + nullable: true + type: integer metadata: additionalProperties: maxLength: 500 @@ -6517,88 +7427,173 @@ components: Set of [key-value pairs](https://stripe.com/docs/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 name: - description: The customer's full name or business name. + description: >- + Name of the coupon displayed to customers on for instance invoices + or receipts. maxLength: 5000 nullable: true type: string - next_invoice_sequence: - description: >- - The suffix of the customer's next invoice number (for example, - 0001). - type: integer object: description: >- String representing the object's type. Objects of the same type share the same value. enum: - - customer + - coupon type: string - phone: - description: The customer's phone number. - maxLength: 5000 + percent_off: + description: >- + Percent that will be taken off the subtotal of any invoices for this + customer for the duration of the coupon. For example, a coupon with + percent_off of 50 will make a $ (or local equivalent)100 invoice $ + (or local equivalent)50 instead. nullable: true - type: string - preferred_locales: - description: 'The customer''s preferred locales (languages), ordered by preference.' + type: number + redeem_by: + description: Date after which the coupon can no longer be redeemed. + format: unix-time + nullable: true + type: integer + times_redeemed: + description: Number of times this coupon has been applied to a customer. + type: integer + valid: + description: >- + Taking account of the above properties, whether this coupon can + still be applied to a customer. + type: boolean + required: + - created + - duration + - id + - livemode + - object + - times_redeemed + - valid + title: Coupon + type: object + x-expandableFields: + - applies_to + - currency_options + x-resourceId: coupon + coupon_applies_to: + description: '' + properties: + products: + description: A list of product IDs this coupon applies to items: maxLength: 5000 type: string - nullable: true type: array - shipping: + required: + - products + 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. + + + Related guide: [Credit + notes](https://stripe.com/docs/billing/invoices/credit-notes) + properties: + amount: + description: >- + The integer amount in cents (or local equivalent) representing the + total amount of the credit note, including tax. + type: integer + amount_shipping: + description: This is the sum of all the shipping amounts. + 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 + customer: anyOf: - - $ref: '#/components/schemas/shipping' + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/customer' + - $ref: '#/components/schemas/deleted_customer' + description: ID of the customer. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/customer' + - $ref: '#/components/schemas/deleted_customer' + customer_balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/customer_balance_transaction' + description: Customer balance transaction related to this credit note. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/customer_balance_transaction' + discount_amount: description: >- - Mailing and shipping address for the customer. Appears on invoices - emailed to this customer. + The integer amount in cents (or local equivalent) representing the + total amount of discount that was credited. + type: integer + discount_amounts: + description: The aggregate amounts calculated per discount for all line items. + items: + $ref: '#/components/schemas/discounts_resource_discount_amount' + type: array + effective_at: + description: >- + The date when this credit note is in effect. Same as `created` + unless overwritten. When defined, this value replaces the + system-generated 'Date of issue' printed on the credit note PDF. + format: unix-time nullable: true - sources: - description: 'The customer''s payment sources, if any.' - properties: - data: - description: Details about each object. - items: - anyOf: - - $ref: '#/components/schemas/bank_account' - - $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 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: integer + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + invoice: + anyOf: + - maxLength: 5000 type: string - required: - - data - - has_more - - object - - url - title: ApmsSourcesSourceList - type: object - x-expandableFields: - - data - subscriptions: - description: 'The customer''s current subscriptions, if any.' + - $ref: '#/components/schemas/invoice' + description: ID of the invoice. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/invoice' + lines: + description: Line items that make up the credit note properties: data: description: Details about each object. items: - $ref: '#/components/schemas/subscription' + $ref: '#/components/schemas/credit_note_line_item' type: array has_more: description: >- @@ -6621,435 +7616,495 @@ components: - has_more - object - url - title: SubscriptionList + title: CreditNoteLinesList type: object x-expandableFields: - data - tax: - $ref: '#/components/schemas/customer_tax' - tax_exempt: + livemode: description: >- - Describes the customer's tax exemption status, which is `none`, - `exempt`, or `reverse`. When set to `reverse`, invoice and receipt - PDFs include the following text: **"Reverse charge"**. - enum: - - exempt - - none - - reverse + Has the value `true` if the object exists in live mode or the value + `false` if the object exists in test mode. + type: boolean + memo: + description: Customer-facing text that appears on the credit note PDF. + maxLength: 5000 nullable: true type: string - tax_ids: - description: The customer's tax IDs. - properties: - data: - description: Details about each object. - items: - $ref: '#/components/schemas/tax_id' - 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: TaxIDsList + 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 - x-expandableFields: - - data - test_clock: + number: + description: >- + A unique number that identifies this particular credit note and + appears on the PDF of the credit note and its associated invoice. + maxLength: 5000 + type: string + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - credit_note + type: string + out_of_band_amount: + description: Amount that was credited outside of Stripe. + nullable: true + type: integer + pdf: + description: The link to download the PDF of the credit note. + maxLength: 5000 + type: string + reason: + description: >- + Reason for issuing this credit note, one of `duplicate`, + `fraudulent`, `order_change`, or `product_unsatisfactory` + enum: + - duplicate + - fraudulent + - order_change + - product_unsatisfactory + nullable: true + type: string + refund: anyOf: - maxLength: 5000 type: string - - $ref: '#/components/schemas/test_helpers.test_clock' - description: ID of the test clock that this customer belongs to. + - $ref: '#/components/schemas/refund' + description: Refund related to this credit note. nullable: true x-expansionResources: oneOf: - - $ref: '#/components/schemas/test_helpers.test_clock' - required: - - created - - id - - livemode - - object - title: Customer - type: object - x-expandableFields: - - address - - cash_balance - - default_source - - discount - - invoice_settings - - shipping - - sources - - subscriptions - - tax - - tax_ids - - test_clock - x-resourceId: customer - customer_acceptance: - description: '' - properties: - accepted_at: - description: The time that the customer accepts the mandate. - format: unix-time + - $ref: '#/components/schemas/refund' + shipping_cost: + anyOf: + - $ref: '#/components/schemas/invoices_resource_shipping_cost' + description: >- + The details of the cost of shipping, including the ShippingRate + applied to the invoice. + nullable: true + status: + 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: + - issued + - void + type: string + x-stripeBypassValidation: true + subtotal: + description: >- + The integer amount in cents (or local equivalent) representing the + amount of the credit note, excluding exclusive tax and invoice level + discounts. + type: integer + subtotal_excluding_tax: + description: >- + The integer amount in cents (or local equivalent) 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 items. + items: + $ref: '#/components/schemas/credit_note_tax_amount' + type: array + total: + description: >- + The integer amount in cents (or local equivalent) representing the + total amount of the credit note, including tax and all discount. + type: integer + total_excluding_tax: + description: >- + The integer amount in cents (or local equivalent) representing the + total amount of the credit note, excluding tax, but including + discounts. nullable: true type: integer - offline: - $ref: '#/components/schemas/offline_acceptance' - online: - $ref: '#/components/schemas/online_acceptance' type: description: >- - The mandate includes the type of customer acceptance information, - such as: `online` or `offline`. + 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: - - offline - - online + - post_payment + - pre_payment type: string + voided_at: + description: The time that the credit note was voided. + format: unix-time + nullable: true + type: integer required: + - amount + - amount_shipping + - created + - currency + - customer + - discount_amount + - discount_amounts + - id + - invoice + - lines + - livemode + - number + - object + - pdf + - status + - subtotal + - tax_amounts + - total - type - title: customer_acceptance + title: CreditNote type: object x-expandableFields: - - offline - - online - customer_balance_customer_balance_settings: - description: '' + - customer + - customer_balance_transaction + - discount_amounts + - invoice + - lines + - refund + - shipping_cost + - tax_amounts + x-resourceId: credit_note + credit_note_line_item: + description: The credit note line item object properties: - reconciliation_mode: + amount: description: >- - The configuration for how funds that land in the customer cash - balance are reconciled. - enum: - - automatic - - manual - type: string - using_merchant_default: + The integer amount in cents (or local equivalent) representing the + gross amount being credited for this line item, excluding + (exclusive) tax and discounts. + type: integer + amount_excluding_tax: description: >- - A flag to indicate if reconciliation mode returned is the user's - default or is specific to this customer cash balance + The integer amount in cents (or local equivalent) 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 + nullable: true + type: string + discount_amount: + description: >- + The integer amount in cents (or local equivalent) representing the + discount being credited for this line item. + type: integer + discount_amounts: + description: The amount of discount calculated per discount for this line item + items: + $ref: '#/components/schemas/discounts_resource_discount_amount' + type: array + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + invoice_line_item: + description: ID of the invoice line item being credited + 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 - required: - - reconciliation_mode - - using_merchant_default - title: CustomerBalanceCustomerBalanceSettings - type: object - x-expandableFields: [] - customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft: - description: '' - properties: - balance_transaction: - anyOf: - - maxLength: 5000 - type: string - - $ref: '#/components/schemas/balance_transaction' + object: description: >- - The [Balance Transaction](docs/api/balance_transactions/object) that - corresponds to funds taken out of your Stripe balance. - x-expansionResources: - oneOf: - - $ref: '#/components/schemas/balance_transaction' - linked_transaction: - anyOf: - - maxLength: 5000 - type: string - - $ref: '#/components/schemas/customer_cash_balance_transaction' + String representing the object's type. Objects of the same type + share the same value. + enum: + - credit_note_line_item + type: string + quantity: + description: The number of units of product being credited. + nullable: true + type: integer + tax_amounts: + description: The amount of tax calculated per tax rate for this line item + items: + $ref: '#/components/schemas/credit_note_tax_amount' + type: array + tax_rates: + description: The tax rates which apply to the line item. + items: + $ref: '#/components/schemas/tax_rate' + type: array + type: description: >- - The [Cash Balance - Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) - that brought the customer balance negative, triggering the clawback - of funds. - x-expansionResources: - oneOf: - - $ref: '#/components/schemas/customer_cash_balance_transaction' + The type of the credit note line item, one of `invoice_line_item` or + `custom_line_item`. When the type is `invoice_line_item` there is an + additional `invoice_line_item` property on the resource the value of + which is the id of the credited line item on the invoice. + enum: + - custom_line_item + - invoice_line_item + type: string + unit_amount: + description: The cost of each unit of product being credited. + 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 + unit_amount_excluding_tax: + description: >- + The amount in cents (or local equivalent) representing the unit + amount being credited for this line item, excluding all tax and + discounts. + format: decimal + nullable: true + type: string required: - - balance_transaction - - linked_transaction - title: >- - CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft + - amount + - discount_amount + - discount_amounts + - id + - livemode + - object + - tax_amounts + - tax_rates + - type + title: CreditNoteLineItem type: object x-expandableFields: - - balance_transaction - - linked_transaction - customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction: + - discount_amounts + - tax_amounts + - tax_rates + x-resourceId: credit_note_line_item + credit_note_tax_amount: description: '' properties: - payment_intent: + amount: + description: 'The amount, in cents (or local equivalent), of the tax.' + type: integer + inclusive: + description: Whether this tax amount is inclusive or exclusive. + type: boolean + tax_rate: 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 applied to. + - $ref: '#/components/schemas/tax_rate' + description: The tax rate that was applied to get this tax amount. x-expansionResources: oneOf: - - $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 - gb_bank_transfer: - $ref: >- - #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer - jp_bank_transfer: - $ref: >- - #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer - reference: - description: The user-supplied reference field on the bank transfer. - maxLength: 5000 - nullable: true - type: string - type: + - $ref: '#/components/schemas/tax_rate' + taxability_reason: description: >- - The funding method type used to fund the customer balance. Permitted - values include: `eu_bank_transfer`, `gb_bank_transfer`, - `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + The reasoning behind this tax, for example, if the product is tax + exempt. The possible values for this field may be extended as new + tax rules are supported. enum: - - eu_bank_transfer - - gb_bank_transfer - - jp_bank_transfer - - mx_bank_transfer - - us_bank_transfer + - customer_exempt + - not_collecting + - not_subject_to_tax + - not_supported + - portion_product_exempt + - portion_reduced_rated + - portion_standard_rated + - product_exempt + - product_exempt_holiday + - proportionally_rated + - reduced_rated + - reverse_charge + - standard_rated + - taxable_basis_reduced + - zero_rated + nullable: true type: string x-stripeBypassValidation: true - us_bank_transfer: - $ref: >- - #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer + taxable_amount: + description: >- + The amount on which tax is calculated, in cents (or local + equivalent). + nullable: true + type: integer required: - - type - title: >- - CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer + - amount + - inclusive + - tax_rate + title: CreditNoteTaxAmount type: object x-expandableFields: - - eu_bank_transfer - - gb_bank_transfer - - jp_bank_transfer - - us_bank_transfer - customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer: + - tax_rate + currency_option: 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 + 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 - type: string - title: >- - CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer - type: object - x-expandableFields: [] - customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer: - description: '' - properties: - account_number_last4: + tax_behavior: description: >- - The last 4 digits of the account number of the sender of the - funding. - maxLength: 5000 + Only required if a [default tax + behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) + was not provided in the Stripe Tax settings. 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 - sender_name: - description: 'The full name of the sender, as supplied by the sending bank.' - maxLength: 5000 + 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 cents (or local equivalent) to be charged, + represented as a whole integer if possible. Only set if + `billing_scheme=per_unit`. nullable: true - type: string - sort_code: - description: The sort code of the bank of the sender of the funding - maxLength: 5000 + type: integer + unit_amount_decimal: + description: >- + The unit amount in cents (or local equivalent) 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: >- - CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransfer + title: CurrencyOption type: object - x-expandableFields: [] - customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer: + x-expandableFields: + - custom_unit_amount + - tiers + custom_unit_amount: description: '' properties: - sender_bank: - description: The name of the bank of the sender of the funding. - maxLength: 5000 - nullable: true - type: string - sender_branch: - description: The name of the bank branch of the sender of the funding. - maxLength: 5000 + maximum: + description: The maximum unit amount the customer can specify for this item. nullable: true - type: string - sender_name: - description: 'The full name of the sender, as supplied by the sending bank.' - maxLength: 5000 + 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: string - title: >- - CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransfer - type: object - x-expandableFields: [] - customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer: - description: '' - properties: - network: - description: The banking network used for this funding. - enum: - - ach - - domestic_wire_us - - swift - type: string - sender_name: - description: 'The full name of the sender, as supplied by the sending bank.' - maxLength: 5000 + type: integer + preset: + description: The starting unit amount which can be updated by the customer. nullable: true - type: string - title: >- - CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransfer + type: integer + title: CustomUnitAmount 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: + customer: 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`. + This object represents a customer of your business. Use it to create + recurring charges and track payments that belong to the same customer. - Related guide: [Customer - balance](https://stripe.com/docs/billing/customer/balance) + Related guide: [Save a card during + payment](https://stripe.com/docs/payments/save-during-payment) properties: - amount: + address: + anyOf: + - $ref: '#/components/schemas/address' + description: The customer's address. + nullable: true + balance: 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`. + The current balance, if any, that's 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's added to their next + invoice. The balance only considers amounts that Stripe hasn't + successfully applied to any invoice. It doesn't reflect unpaid + invoices. This balance is only taken into account after invoices + finalize. type: integer + cash_balance: + anyOf: + - $ref: '#/components/schemas/cash_balance' + description: >- + The current funds being held by Stripe on behalf of the customer. + You can apply these funds towards payment intents when the source is + "cash_balance". The `settings[reconciliation_mode]` field describes + if these funds apply to these payment intents manually or + automatically. + nullable: true 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). + Three-letter [ISO code for the + currency](https://stripe.com/docs/currencies) the customer can be + charged in for recurring billing purposes. + maxLength: 5000 + nullable: true type: string - customer: + default_source: anyOf: - maxLength: 5000 type: string - - $ref: '#/components/schemas/customer' - description: The ID of the customer the transaction belongs to. + - $ref: '#/components/schemas/bank_account' + - $ref: '#/components/schemas/card' + - $ref: '#/components/schemas/source' + description: >- + ID of the default payment source for the customer. + + + If you use payment methods created through 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. + nullable: true x-expansionResources: oneOf: - - $ref: '#/components/schemas/customer' + - $ref: '#/components/schemas/bank_account' + - $ref: '#/components/schemas/card' + - $ref: '#/components/schemas/source' + x-stripeBypassValidation: true + delinquent: + description: >- + Tracks the most recent state change on any invoice belonging to the + customer. Paying an invoice or marking it uncollectible via the API + will set this field to false. An automatic payment failure or + passing the `invoice.due_date` will set this field to `true`. + + + If an invoice becomes uncollectible by + [dunning](https://stripe.com/docs/billing/automatic-collection), + `delinquent` doesn't reset to `false`. + + + If you care whether the customer has paid their most recent + subscription invoice, use `subscription.status` instead. Paying or + marking uncollectible any customer invoice regardless of whether it + is the latest invoice for a subscription will always set this field + to `false`. + nullable: true + type: boolean description: description: >- An arbitrary string attached to the object. Often useful for @@ -7057,27 +8112,43 @@ components: maxLength: 5000 nullable: true type: string - ending_balance: + discount: + anyOf: + - $ref: '#/components/schemas/discount' 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. - type: integer + Describes the current discount active on the customer, if there is + one. + nullable: true + email: + description: The customer's email address. + 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: The ID of the invoice (if any) related to the transaction. + invoice_credit_balance: + additionalProperties: + type: integer + description: >- + The current multi-currency balances, if any, that's 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's added to their next + invoice denominated in that currency. These balances don't apply to + unpaid invoices. They solely track amounts that Stripe hasn't + successfully applied to any invoice. Stripe only applies a balance + in a specific currency to an invoice after that invoice (which is in + the same currency) finalizes. + type: object + invoice_prefix: + description: The prefix for the customer used to generate unique invoice numbers. + maxLength: 5000 nullable: true - x-expansionResources: - oneOf: - - $ref: '#/components/schemas/invoice' + type: string + invoice_settings: + $ref: '#/components/schemas/invoice_setting_customer_setting' livemode: description: >- Has the value `true` if the object exists in live mode or the value @@ -7091,558 +8162,1272 @@ components: Set of [key-value pairs](https://stripe.com/docs/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 + name: + description: The customer's full name or business name. + maxLength: 5000 + nullable: true + type: string + next_invoice_sequence: + description: >- + The suffix of the customer's next invoice number (for example, + 0001). + type: integer object: description: >- String representing the object's type. Objects of the same type share the same value. enum: - - customer_balance_transaction + - customer type: string - type: - description: >- - Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, - `initial`, `invoice_overpaid`, `invoice_too_large`, - `invoice_too_small`, `unspent_receiver_credit`, or - `unapplied_from_invoice`. See the [Customer Balance - page](https://stripe.com/docs/billing/customer/balance#types) to - learn more about transaction types. - enum: - - adjustment - - applied_to_invoice - - credit_note - - initial - - invoice_overpaid - - invoice_too_large - - invoice_too_small - - migration - - unapplied_from_invoice - - unspent_receiver_credit + phone: + description: The customer's phone number. + maxLength: 5000 + nullable: true type: string - required: - - amount - - created - - currency - - customer - - ending_balance - - id - - livemode - - object - - type - title: CustomerBalanceTransaction - type: object - x-expandableFields: - - credit_note - - 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: - adjusted_for_overdraft: - $ref: >- - #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft - applied_to_payment: - $ref: >- - #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction - created: + preferred_locales: + description: 'The customer''s preferred locales (languages), ordered by preference.' + items: + maxLength: 5000 + type: string + nullable: true + type: array + shipping: + anyOf: + - $ref: '#/components/schemas/shipping' description: >- - Time at which the object was created. Measured in seconds since the - Unix epoch. - format: unix-time - type: integer - currency: + Mailing and shipping address for the customer. Appears on invoices + emailed to this customer. + nullable: true + sources: + description: 'The customer''s payment sources, if any.' + properties: + data: + description: Details about each object. + items: + anyOf: + - $ref: '#/components/schemas/bank_account' + - $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 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: ApmsSourcesSourceList + type: object + x-expandableFields: + - data + subscriptions: + description: 'The customer''s current subscriptions, if any.' + properties: + data: + description: Details about each object. + 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 + type: string + required: + - data + - has_more + - object + - url + title: SubscriptionList + type: object + x-expandableFields: + - data + tax: + $ref: '#/components/schemas/customer_tax' + tax_exempt: description: >- - Three-letter [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 + Describes the customer's tax exemption status, which is `none`, + `exempt`, or `reverse`. When set to `reverse`, invoice and receipt + PDFs include the following text: **"Reverse charge"**. + enum: + - exempt + - none + - reverse + nullable: true type: string - customer: + tax_ids: + description: The customer's tax IDs. + properties: + data: + description: Details about each object. + items: + $ref: '#/components/schemas/tax_id' + 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: TaxIDsList + type: object + x-expandableFields: + - data + test_clock: anyOf: - maxLength: 5000 type: string - - $ref: '#/components/schemas/customer' - description: >- - The customer whose available cash balance changed as a result of - this transaction. + - $ref: '#/components/schemas/test_helpers.test_clock' + description: ID of the test clock that this customer belongs to. + nullable: true 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. 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: - - adjusted_for_overdraft - - applied_to_payment - - funded - - funding_reversed - - 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 + - $ref: '#/components/schemas/test_helpers.test_clock' required: - created - - currency - - customer - - ending_balance - id - livemode - - net_amount - object - - type - title: CustomerCashBalanceTransaction + title: Customer type: object x-expandableFields: - - adjusted_for_overdraft - - applied_to_payment - - customer - - funded - - refunded_from_payment - - unapplied_from_payment - x-resourceId: customer_cash_balance_transaction - customer_tax: + - address + - cash_balance + - default_source + - discount + - invoice_settings + - shipping + - sources + - subscriptions + - tax + - tax_ids + - test_clock + x-resourceId: customer + customer_acceptance: description: '' properties: - automatic_tax: + accepted_at: + description: The time that the customer accepts the mandate. + format: unix-time + nullable: true + type: integer + offline: + $ref: '#/components/schemas/offline_acceptance' + online: + $ref: '#/components/schemas/online_acceptance' + type: description: >- - Surfaces if automatic tax computation is possible given the current - customer location information. + The mandate includes the type of customer acceptance information, + such as: `online` or `offline`. enum: - - failed - - not_collecting - - supported - - unrecognized_location - type: string - ip_address: - description: >- - A recent IP address of the customer used for tax reporting and tax - location inference. - maxLength: 5000 - nullable: true + - offline + - online type: string - location: - anyOf: - - $ref: '#/components/schemas/customer_tax_location' - description: The customer's location as identified by Stripe Tax. - nullable: true required: - - automatic_tax - title: CustomerTax + - type + title: customer_acceptance type: object x-expandableFields: - - location - customer_tax_location: + - offline + - online + customer_balance_customer_balance_settings: description: '' properties: - country: - description: The customer's country as identified by Stripe Tax. - maxLength: 5000 - type: string - source: - description: The data source used to infer the customer's location. + reconciliation_mode: + description: >- + The configuration for how funds that land in the customer cash + balance are reconciled. enum: - - billing_address - - ip_address - - payment_method - - shipping_destination + - automatic + - manual type: string - state: + using_merchant_default: description: >- - The customer's state, county, province, or region as identified by - Stripe Tax. - maxLength: 5000 - nullable: true - type: string + A flag to indicate if reconciliation mode returned is the user's + default or is specific to this customer cash balance + type: boolean required: - - country - - source - title: CustomerTaxLocation + - reconciliation_mode + - using_merchant_default + title: CustomerBalanceCustomerBalanceSettings type: object x-expandableFields: [] - deleted_account: + customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft: 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: + balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/balance_transaction' description: >- - String representing the object's type. Objects of the same type - share the same value. - enum: - - account - type: string + The [Balance + Transaction](https://stripe.com/docs/api/balance_transactions/object) + that corresponds to funds taken out of your Stripe balance. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/balance_transaction' + linked_transaction: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/customer_cash_balance_transaction' + description: >- + The [Cash Balance + Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) + that brought the customer balance negative, triggering the clawback + of funds. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/customer_cash_balance_transaction' required: - - deleted - - id - - object - title: DeletedAccount + - balance_transaction + - linked_transaction + title: >- + CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft type: object - x-expandableFields: [] - x-resourceId: deleted_account - deleted_apple_pay_domain: + x-expandableFields: + - balance_transaction + - linked_transaction + customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction: 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: + payment_intent: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/payment_intent' description: >- - String representing the object's type. Objects of the same type - share the same value. - enum: - - apple_pay_domain - type: string + The [Payment + Intent](https://stripe.com/docs/api/payment_intents/object) that + funds were applied to. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/payment_intent' required: - - deleted - - id - - object - title: DeletedApplePayDomain + - payment_intent + title: >- + CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction type: object - x-expandableFields: [] - x-resourceId: deleted_apple_pay_domain - deleted_application: + x-expandableFields: + - payment_intent + customer_balance_resource_cash_balance_transaction_resource_funded_transaction: 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 - name: - description: The name of the application. + 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 + gb_bank_transfer: + $ref: >- + #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer + jp_bank_transfer: + $ref: >- + #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer + reference: + description: The user-supplied reference field on the bank transfer. maxLength: 5000 nullable: true type: string - object: + type: description: >- - String representing the object's type. Objects of the same type - share the same value. + The funding method type used to fund the customer balance. Permitted + values include: `eu_bank_transfer`, `gb_bank_transfer`, + `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. enum: - - application + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + - us_bank_transfer type: string + x-stripeBypassValidation: true + us_bank_transfer: + $ref: >- + #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer required: - - deleted - - id - - object - title: DeletedApplication + - type + title: >- + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer type: object - x-expandableFields: [] - deleted_bank_account: + x-expandableFields: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - us_bank_transfer + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer: description: '' properties: - currency: - description: >- - Three-letter [ISO code for the - currency](https://stripe.com/docs/payouts) paid out to the bank - account. + bic: + description: The BIC of the bank of the sender of the funding. maxLength: 5000 nullable: true type: string - deleted: - description: Always true for a deleted object - enum: - - true - type: boolean - id: - description: Unique identifier for the object. + iban_last4: + description: The last 4 digits of the IBAN of the sender of the funding. maxLength: 5000 + nullable: true type: string - object: - description: >- - String representing the object's type. Objects of the same type - share the same value. - enum: - - bank_account + sender_name: + description: 'The full name of the sender, as supplied by the sending bank.' + maxLength: 5000 + nullable: true type: string - required: - - deleted - - id - - object - title: DeletedBankAccount + title: >- + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer type: object x-expandableFields: [] - deleted_card: + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer: description: '' properties: - currency: + account_number_last4: description: >- - Three-letter [ISO code for the - currency](https://stripe.com/docs/payouts) paid out to the bank - account. + The last 4 digits of the account number of the sender of the + funding. maxLength: 5000 nullable: true type: string - deleted: - description: Always true for a deleted object - enum: - - true - type: boolean - id: - description: Unique identifier for the object. + sender_name: + description: 'The full name of the sender, as supplied by the sending bank.' maxLength: 5000 + nullable: true type: string - object: - description: >- - String representing the object's type. Objects of the same type - share the same value. - enum: - - card + sort_code: + description: The sort code of the bank of the sender of the funding + maxLength: 5000 + nullable: true type: string - required: - - deleted - - id - - object - title: DeletedCard + title: >- + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransfer type: object x-expandableFields: [] - deleted_coupon: + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer: description: '' properties: - deleted: - description: Always true for a deleted object - enum: - - true - type: boolean - id: - description: Unique identifier for the object. + sender_bank: + description: The name of the bank of the sender of the funding. maxLength: 5000 + nullable: true type: string - object: - description: >- - String representing the object's type. Objects of the same type - share the same value. - enum: - - coupon + sender_branch: + description: The name of the bank branch of the sender of the funding. + maxLength: 5000 + nullable: true type: string - required: - - deleted - - id - - object - title: DeletedCoupon + sender_name: + description: 'The full name of the sender, as supplied by the sending bank.' + maxLength: 5000 + nullable: true + type: string + title: >- + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransfer type: object x-expandableFields: [] - x-resourceId: deleted_coupon - deleted_customer: + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer: description: '' properties: - deleted: - description: Always true for a deleted object + network: + description: The banking network used for this funding. enum: - - true - type: boolean - id: - description: Unique identifier for the object. + - ach + - domestic_wire_us + - swift + type: string + sender_name: + description: 'The full name of the sender, as supplied by the sending bank.' maxLength: 5000 + nullable: true type: string - object: + title: >- + CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransfer + 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: >- - String representing the object's type. Objects of the same type - share the same value. - enum: - - customer - type: string + 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: - - deleted - - id - - object - title: DeletedCustomer + - refund + title: >- + CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction type: object - x-expandableFields: [] - x-resourceId: deleted_customer - deleted_discount: + x-expandableFields: + - refund + customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance: description: '' properties: - checkout_session: + balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/balance_transaction' description: >- - The Checkout session that this coupon is applied to, if it is - applied to a particular session in payment mode. Will not be present - for subscription mode. - maxLength: 5000 + The [Balance + Transaction](https://stripe.com/docs/api/balance_transactions/object) + that corresponds to funds transferred to your Stripe balance. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/balance_transaction' + required: + - balance_transaction + title: >- + CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalance + type: object + x-expandableFields: + - balance_transaction + 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) + 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 - coupon: - $ref: '#/components/schemas/coupon' customer: anyOf: - maxLength: 5000 type: string - $ref: '#/components/schemas/customer' - - $ref: '#/components/schemas/deleted_customer' - description: The ID of the customer associated with this discount. - nullable: true + description: The ID of the customer the transaction belongs to. x-expansionResources: oneOf: - $ref: '#/components/schemas/customer' - - $ref: '#/components/schemas/deleted_customer' - deleted: - description: Always true for a deleted object - enum: - - true - type: boolean - id: - description: >- - The ID of the discount object. Discounts cannot be fetched by ID. - Use `expand[]=discounts` in API calls to expand discount IDs in an - array. - maxLength: 5000 - type: string - invoice: + description: description: >- - The invoice that the discount's coupon was applied to, if it was - applied directly to a particular invoice. + An arbitrary string attached to the object. Often useful for + displaying to users. maxLength: 5000 nullable: true type: string - invoice_item: + ending_balance: description: >- - The invoice item `id` (or invoice line item `id` for invoice line - items of type='subscription') that the discount's coupon was applied - to, if it was applied directly to a particular invoice item or - invoice line item. + 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. + type: integer + id: + description: Unique identifier for the object. maxLength: 5000 - nullable: true - type: string - object: - description: >- - String representing the object's type. Objects of the same type - share the same value. - enum: - - discount type: string - promotion_code: + invoice: anyOf: - maxLength: 5000 type: string - - $ref: '#/components/schemas/promotion_code' - description: The promotion code applied to create this discount. + - $ref: '#/components/schemas/invoice' + description: The ID of the invoice (if any) related to the transaction. nullable: true x-expansionResources: oneOf: - - $ref: '#/components/schemas/promotion_code' - start: - description: Date that the coupon was applied. - format: unix-time - type: integer - subscription: + - $ref: '#/components/schemas/invoice' + livemode: description: >- - The subscription that this coupon is applied to, if it is applied to - a particular subscription. - maxLength: 5000 + 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: + - customer_balance_transaction + type: string + type: + description: >- + Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, + `initial`, `invoice_overpaid`, `invoice_too_large`, + `invoice_too_small`, `unspent_receiver_credit`, or + `unapplied_from_invoice`. See the [Customer Balance + page](https://stripe.com/docs/billing/customer/balance#types) to + learn more about transaction types. + enum: + - adjustment + - applied_to_invoice + - credit_note + - initial + - invoice_overpaid + - invoice_too_large + - invoice_too_small + - migration + - unapplied_from_invoice + - unspent_receiver_credit type: string + x-stripeBypassValidation: true required: - - coupon - - deleted + - amount + - created + - currency + - customer + - ending_balance - id + - livemode - object - - start - title: DeletedDiscount + - type + title: CustomerBalanceTransaction type: object x-expandableFields: - - coupon + - credit_note - customer - - promotion_code - x-resourceId: deleted_discount - deleted_external_account: - anyOf: - - $ref: '#/components/schemas/deleted_bank_account' - - $ref: '#/components/schemas/deleted_card' - title: Polymorphic - x-resourceId: deleted_external_account - x-stripeBypassValidation: true - deleted_invoice: - description: '' + - 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: - deleted: - description: Always true for a deleted object - enum: - - true - type: boolean + adjusted_for_overdraft: + $ref: >- + #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft + 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: - - invoice + - customer_cash_balance_transaction type: string - required: + refunded_from_payment: + $ref: >- + #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction + transferred_to_balance: + $ref: >- + #/components/schemas/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance + type: + description: >- + The type of the cash balance transaction. 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: + - adjusted_for_overdraft + - applied_to_payment + - funded + - funding_reversed + - refunded_from_payment + - return_canceled + - return_initiated + - transferred_to_balance + - 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: + - adjusted_for_overdraft + - applied_to_payment + - customer + - funded + - refunded_from_payment + - transferred_to_balance + - unapplied_from_payment + x-resourceId: customer_cash_balance_transaction + customer_session: + description: >- + A customer session allows you to grant client access to Stripe's + frontend SDKs (like StripeJs) + + control over a customer. + properties: + client_secret: + description: >- + The client secret of this customer session. Used on the client to + set up secure access to the given `customer`. + + + The client secret can be used to provide access to `customer` from + your frontend. It should not be stored, logged, or exposed to anyone + other than the relevant customer. Make sure that you have TLS + enabled on any page that includes the client secret. + maxLength: 5000 + type: string + components: + $ref: '#/components/schemas/customer_session_resource_components' + 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 customer the customer session was created for. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/customer' + expires_at: + description: The timestamp at which this customer session will expire. + format: unix-time + 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 + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - customer_session + type: string + required: + - client_secret + - created + - customer + - expires_at + - livemode + - object + title: CustomerSessionResourceCustomerSession + type: object + x-expandableFields: + - components + - customer + x-resourceId: customer_session + customer_session_resource_components: + description: Configuration for the components supported by this customer session. + properties: + buy_button: + $ref: >- + #/components/schemas/customer_session_resource_components_resource_buy_button + pricing_table: + $ref: >- + #/components/schemas/customer_session_resource_components_resource_pricing_table + required: + - buy_button + - pricing_table + title: CustomerSessionResourceComponents + type: object + x-expandableFields: + - buy_button + - pricing_table + customer_session_resource_components_resource_buy_button: + description: This hash contains whether the buy button is enabled. + properties: + enabled: + description: Whether the buy button is enabled. + type: boolean + required: + - enabled + title: CustomerSessionResourceComponentsResourceBuyButton + type: object + x-expandableFields: [] + customer_session_resource_components_resource_pricing_table: + description: This hash contains whether the pricing table is enabled. + properties: + enabled: + description: Whether the pricing table is enabled. + type: boolean + required: + - enabled + title: CustomerSessionResourceComponentsResourcePricingTable + type: object + x-expandableFields: [] + customer_tax: + description: '' + properties: + automatic_tax: + description: >- + Surfaces if automatic tax computation is possible given the current + customer location information. + enum: + - failed + - not_collecting + - supported + - unrecognized_location + type: string + ip_address: + description: >- + A recent IP address of the customer used for tax reporting and tax + location inference. + maxLength: 5000 + nullable: true + type: string + location: + anyOf: + - $ref: '#/components/schemas/customer_tax_location' + description: The customer's location as identified by Stripe Tax. + nullable: true + required: + - automatic_tax + title: CustomerTax + type: object + x-expandableFields: + - location + customer_tax_location: + description: '' + properties: + country: + description: The customer's country as identified by Stripe Tax. + maxLength: 5000 + type: string + source: + description: The data source used to infer the customer's location. + enum: + - billing_address + - ip_address + - payment_method + - shipping_destination + type: string + state: + description: >- + The customer's state, county, province, or region as identified by + Stripe Tax. + maxLength: 5000 + nullable: true + type: string + required: + - country + - source + title: CustomerTaxLocation + type: object + x-expandableFields: [] + deleted_account: + 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: + - account + type: string + required: + - deleted + - id + - object + title: DeletedAccount + type: object + x-expandableFields: [] + x-resourceId: deleted_account + deleted_apple_pay_domain: + 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: + - apple_pay_domain + type: string + required: + - deleted + - id + - object + title: DeletedApplePayDomain + type: object + x-expandableFields: [] + x-resourceId: deleted_apple_pay_domain + deleted_application: + 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 + 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: + - application + type: string + required: + - deleted + - id + - object + title: DeletedApplication + type: object + x-expandableFields: [] + deleted_bank_account: + description: '' + properties: + currency: + description: >- + Three-letter [ISO code for the + currency](https://stripe.com/docs/payouts) paid out to the bank + account. + maxLength: 5000 + nullable: true + type: string + 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: + - bank_account + type: string + required: + - deleted + - id + - object + title: DeletedBankAccount + type: object + x-expandableFields: [] + deleted_card: + description: '' + properties: + currency: + description: >- + Three-letter [ISO code for the + currency](https://stripe.com/docs/payouts) paid out to the bank + account. + maxLength: 5000 + nullable: true + type: string + 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: + - card + type: string + required: + - deleted + - id + - object + title: DeletedCard + type: object + x-expandableFields: [] + deleted_coupon: + 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: + - coupon + type: string + required: + - deleted + - id + - object + title: DeletedCoupon + type: object + x-expandableFields: [] + x-resourceId: deleted_coupon + deleted_customer: + 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: + - customer + type: string + required: + - deleted + - id + - object + title: DeletedCustomer + type: object + x-expandableFields: [] + x-resourceId: deleted_customer + deleted_discount: + description: '' + properties: + checkout_session: + description: >- + The Checkout session that this coupon is applied to, if it is + applied to a particular session in payment mode. Will not be present + for subscription mode. + maxLength: 5000 + nullable: true + type: string + coupon: + $ref: '#/components/schemas/coupon' + customer: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/customer' + - $ref: '#/components/schemas/deleted_customer' + description: The ID of the customer associated with this discount. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/customer' + - $ref: '#/components/schemas/deleted_customer' + deleted: + description: Always true for a deleted object + enum: + - true + type: boolean + id: + description: >- + The ID of the discount object. Discounts cannot be fetched by ID. + Use `expand[]=discounts` in API calls to expand discount IDs in an + array. + maxLength: 5000 + type: string + invoice: + description: >- + The invoice that the discount's coupon was applied to, if it was + applied directly to a particular invoice. + maxLength: 5000 + nullable: true + type: string + invoice_item: + description: >- + The invoice item `id` (or invoice line item `id` for invoice line + items of type='subscription') that the discount's coupon was applied + to, if it was applied directly to a particular invoice item or + invoice line item. + maxLength: 5000 + nullable: true + type: string + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - discount + type: string + promotion_code: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/promotion_code' + description: The promotion code applied to create this discount. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/promotion_code' + start: + description: Date that the coupon was applied. + format: unix-time + type: integer + subscription: + description: >- + The subscription that this coupon is applied to, if it is applied to + a particular subscription. + maxLength: 5000 + nullable: true + type: string + subscription_item: + description: >- + The subscription item that this coupon is applied to, if it is + applied to a particular subscription item. + maxLength: 5000 + nullable: true + type: string + required: + - coupon + - deleted + - id + - object + - start + title: DeletedDiscount + type: object + x-expandableFields: + - coupon + - customer + - promotion_code + x-resourceId: deleted_discount + deleted_external_account: + anyOf: + - $ref: '#/components/schemas/deleted_bank_account' + - $ref: '#/components/schemas/deleted_card' + title: Polymorphic + x-resourceId: deleted_external_account + x-stripeBypassValidation: true + deleted_invoice: + 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: + - invoice + type: string + required: - deleted - id - object @@ -8034,6 +9819,12 @@ components: type: object x-expandableFields: [] x-resourceId: deleted_webhook_endpoint + destination_details_unimplemented: + description: '' + properties: {} + title: destination_details_unimplemented + type: object + x-expandableFields: [] discount: description: >- A discount represents the actual application of a @@ -8128,8 +9919,15 @@ components: maxLength: 5000 nullable: true type: string - required: - - coupon + subscription_item: + description: >- + The subscription item that this coupon is applied to, if it is + applied to a particular subscription item. + maxLength: 5000 + nullable: true + type: string + required: + - coupon - id - object - start @@ -8164,6 +9962,47 @@ components: type: object x-expandableFields: - discount + discounts_resource_stackable_discount: + description: '' + properties: + coupon: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/coupon' + description: ID of the coupon to create a new discount for. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/coupon' + discount: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/discount' + description: >- + ID of an existing discount on the object (or one of its ancestors) + to reuse. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/discount' + promotion_code: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/promotion_code' + description: ID of the promotion code to create a new discount for. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/promotion_code' + title: DiscountsResourceStackableDiscount + type: object + x-expandableFields: + - coupon + - discount + - promotion_code dispute: description: >- A dispute occurs when a customer questions your charge with their card @@ -8757,10 +10596,9 @@ components: [account settings](https://dashboard.stripe.com/account/webhooks). Learn how - to [listen for events] + to [listen for events](https://stripe.com/docs/webhooks) - (/docs/webhooks) so that your integration can automatically trigger - reactions. + so that your integration can automatically trigger reactions. When using [Connect](https://stripe.com/docs/connect), you can also @@ -8843,33 +10681,64 @@ components: x-resourceId: event exchange_rate: description: >- - `Exchange Rate` objects allow you to determine the rates that Stripe is + `ExchangeRate` objects allow you to determine the rates that Stripe is + currently + + using to convert from one currency to another. Since this number is + variable + + throughout the day, there are various reasons why you might want to know + the current + + rate (for example, to dynamically price an item for a user with a + default + + payment in a foreign currency). + + + Please refer to our [Exchange Rates + API](https://stripe.com/docs/fx-rates) guide for more details. + + + *[Note: this integration path is supported but no longer recommended]* + Additionally, + + you can guarantee that a charge is made with an exchange rate that you + expect is + + current. To do so, you must pass in the exchange_rate to charges + endpoints. If the + + value is no longer up to date, the charge won't go through. Please refer + to our - currently using to convert from one currency to another. Since this - number is + [Using with charges](https://stripe.com/docs/exchange-rates) guide for + more details. - variable throughout the day, there are various reasons why you might - want to - know the current rate (for example, to dynamically price an item for a - user + ----- - with a default payment in a foreign currency). +   - If you want a guarantee that the charge is made with a certain exchange - rate - you expect is current, you can pass in `exchange_rate` to charges - endpoints. + *This Exchange Rates API is a Beta Service and is subject to Stripe's + terms of service. You may use the API solely for the purpose of + transacting on Stripe. For example, the API may be queried in order to:* - If the value is no longer up to date, the charge won't go through. - Please - refer to our [Exchange Rates - API](https://stripe.com/docs/exchange-rates) guide for more + - *localize prices for processing payments on Stripe* - details. + - *reconcile Stripe transactions* + + - *determine how much money to send to a connected account* + + - *determine app fees to charge a connected account* + + + *Using this Exchange Rates API beta for any purpose other than to + transact on Stripe is strictly prohibited and constitutes a violation of + Stripe's terms of service.* properties: id: description: >- @@ -8980,7 +10849,9 @@ components: nullable: true type: string type: - description: 'Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`.' + description: >- + Type of the fee, one of: `application_fee`, + `payment_method_passthrough_fee`, `stripe_fee` or `tax`. maxLength: 5000 type: string required: @@ -9084,7 +10955,7 @@ components: (for example, when uploading dispute evidence). Stripe also - creates files independetly (for example, the results of a [Sigma + creates files independently (for example, the results of a [Sigma scheduled query](#scheduled_queries)). @@ -9145,7 +11016,7 @@ components: - has_more - object - url - title: FileFileLinkList + title: FileResourceFileLinkList type: object x-expandableFields: - data @@ -9406,6 +11277,15 @@ components: - other - savings type: string + subscriptions: + description: The list of data refresh subscriptions requested on this account. + items: + enum: + - transactions + type: string + x-stripeBypassValidation: true + nullable: true + type: array supported_payment_method_types: description: >- The [PaymentMethod @@ -9417,6 +11297,14 @@ components: - us_bank_account type: string type: array + transaction_refresh: + anyOf: + - $ref: >- + #/components/schemas/bank_connections_resource_transaction_refresh + description: >- + The state of the most recent attempt to refresh the account + transactions. + nullable: true required: - category - created @@ -9435,6 +11323,7 @@ components: - balance_refresh - ownership - ownership_refresh + - transaction_refresh x-resourceId: financial_connections.account financial_connections.account_owner: description: Describes an owner of an account. @@ -9638,6 +11527,7 @@ components: enum: - balances - ownership + - transactions type: string x-stripeBypassValidation: true nullable: true @@ -9663,6 +11553,94 @@ components: - accounts - filters x-resourceId: financial_connections.session + financial_connections.transaction: + description: >- + A Transaction represents a real transaction that affects a Financial + Connections Account balance. + properties: + account: + description: >- + The ID of the Financial Connections Account this transaction belongs + to. + maxLength: 5000 + type: string + amount: + description: 'The amount of this transaction, in cents (or local equivalent).' + 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: The description of this transaction. + 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. + enum: + - financial_connections.transaction + type: string + status: + description: The status of the transaction. + enum: + - pending + - posted + - void + type: string + status_transitions: + $ref: >- + #/components/schemas/bank_connections_resource_transaction_resource_status_transitions + transacted_at: + description: >- + Time at which the transaction was transacted. Measured in seconds + since the Unix epoch. + format: unix-time + type: integer + transaction_refresh: + description: >- + The token of the transaction refresh that last updated or created + this transaction. + maxLength: 5000 + type: string + updated: + description: >- + Time at which the object was last updated. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + required: + - account + - amount + - currency + - description + - id + - livemode + - object + - status + - status_transitions + - transacted_at + - transaction_refresh + - updated + title: BankConnectionsResourceTransaction + type: object + x-expandableFields: + - status_transitions + x-resourceId: financial_connections.transaction financial_reporting_finance_report_run_run_parameters: description: '' properties: @@ -9714,6 +11692,219 @@ components: title: FinancialReportingFinanceReportRunRunParameters type: object x-expandableFields: [] + forwarded_request_context: + description: Metadata about the forwarded request. + properties: + destination_duration: + description: >- + The time it took in milliseconds for the destination endpoint to + respond. + type: integer + destination_ip_address: + description: The IP address of the destination. + maxLength: 5000 + type: string + required: + - destination_duration + - destination_ip_address + title: ForwardedRequestContext + type: object + x-expandableFields: [] + forwarded_request_details: + description: Details about the request forwarded to the destination endpoint. + properties: + body: + description: The body payload to send to the destination endpoint. + maxLength: 5000 + type: string + headers: + description: >- + The headers to include in the forwarded request. Can be omitted if + no additional headers (excluding Stripe-generated ones such as the + Content-Type header) should be included. + items: + $ref: '#/components/schemas/forwarded_request_header' + type: array + http_method: + description: The HTTP method used to call the destination endpoint. + enum: + - POST + type: string + required: + - body + - headers + - http_method + title: ForwardedRequestDetails + type: object + x-expandableFields: + - headers + forwarded_request_header: + description: Header data. + properties: + name: + description: The header name. + maxLength: 5000 + type: string + value: + description: The header value. + maxLength: 5000 + type: string + required: + - name + - value + title: ForwardedRequestHeader + type: object + x-expandableFields: [] + forwarded_response_details: + description: Details about the response from the destination endpoint. + properties: + body: + description: The response body from the destination endpoint to Stripe. + maxLength: 5000 + type: string + headers: + description: HTTP headers that the destination endpoint returned. + items: + $ref: '#/components/schemas/forwarded_request_header' + type: array + status: + description: The HTTP status code that the destination endpoint returned. + type: integer + required: + - body + - headers + - status + title: ForwardedResponseDetails + type: object + x-expandableFields: + - headers + forwarding.request: + description: >- + Instructs Stripe to make a request on your behalf using the destination + URL and HTTP method in the config. + + A config is set up for each destination URL by Stripe at the time of + onboarding. Stripe verifies requests with + + your credentials in the config, and injects card details from the + payment_method into the request. + + + Stripe redacts all sensitive fields and headers, including + authentication credentials and card numbers, + + before storing the request and response data in the forwarding Request + object, which are subject to a + + 30-day retention period. + + + You can provide a Stripe idempotency key to make sure that requests with + the same key result in only one + + outbound request. The Stripe idempotency key provided should be unique + and different from any idempotency + + keys provided on the underlying third-party request. + + + Forwarding Requests are synchronous requests that return a response or + time out according to + + Stripe’s limits. + + + Related guide: [Forward card details to third-party API + endpoints](https://docs.stripe.com/payments/forwarding). + properties: + config: + description: >- + The Forwarding Config used when making the forwarded request. The + config specifes the HTTP method, merchant credentials, connection + settings, and supported destination URLs. + 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 + 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: + - forwarding.request + type: string + payment_method: + description: >- + The PaymentMethod to insert into the forwarded request. Forwarding + previously consumed PaymentMethods is allowed. + maxLength: 5000 + type: string + replacements: + description: The field kinds to be replaced in the forwarded request. + items: + enum: + - card_cvc + - card_expiry + - card_number + - cardholder_name + type: string + type: array + request_context: + anyOf: + - $ref: '#/components/schemas/forwarded_request_context' + description: >- + Context about the request from Stripe's servers to the destination + endpoint. + nullable: true + request_details: + anyOf: + - $ref: '#/components/schemas/forwarded_request_details' + description: >- + The request that was sent to the destination endpoint. We redact any + sensitive fields. + nullable: true + response_details: + anyOf: + - $ref: '#/components/schemas/forwarded_response_details' + description: >- + The response that the destination endpoint returned to us. We redact + any sensitive fields. + nullable: true + url: + description: >- + The destination URL for the forwarded request. Must be supported by + the config. + maxLength: 5000 + nullable: true + type: string + required: + - config + - created + - id + - livemode + - object + - payment_method + - replacements + title: ForwardingRequest + type: object + x-expandableFields: + - request_context + - request_details + - response_details + x-resourceId: forwarding.request funding_instructions: description: >- Each customer has a @@ -9799,11 +11990,35 @@ components: type: object x-expandableFields: - financial_addresses + funding_instructions_bank_transfer_aba_record: + description: ABA Records contain U.S. bank account details per the ABA format. + properties: + account_number: + description: The ABA account number + maxLength: 5000 + type: string + bank_name: + description: The bank name + maxLength: 5000 + type: string + routing_number: + description: The ABA routing number + maxLength: 5000 + type: string + required: + - account_number + - bank_name + - routing_number + title: FundingInstructionsBankTransferABARecord + type: object + x-expandableFields: [] funding_instructions_bank_transfer_financial_address: description: >- FinancialAddresses contain identifying information that resolves to a FinancialAccount. properties: + aba: + $ref: '#/components/schemas/funding_instructions_bank_transfer_aba_record' iban: $ref: '#/components/schemas/funding_instructions_bank_transfer_iban_record' sort_code: @@ -9815,20 +12030,27 @@ components: description: The payment networks supported by this FinancialAddress items: enum: + - ach - bacs + - domestic_wire_us - fps - sepa - spei + - swift - zengin type: string x-stripeBypassValidation: true type: array + swift: + $ref: '#/components/schemas/funding_instructions_bank_transfer_swift_record' type: description: The type of financial address enum: + - aba - iban - sort_code - spei + - swift - zengin type: string x-stripeBypassValidation: true @@ -9840,9 +12062,11 @@ components: title: FundingInstructionsBankTransferFinancialAddress type: object x-expandableFields: + - aba - iban - sort_code - spei + - swift - zengin funding_instructions_bank_transfer_iban_record: description: Iban Records contain E.U. bank account details per the SEPA format. @@ -9919,6 +12143,28 @@ components: title: FundingInstructionsBankTransferSpeiRecord type: object x-expandableFields: [] + funding_instructions_bank_transfer_swift_record: + description: SWIFT Records contain U.S. bank account details per the SWIFT format. + properties: + account_number: + description: The account number + maxLength: 5000 + type: string + bank_name: + description: The bank name + maxLength: 5000 + type: string + swift_code: + description: The SWIFT code + maxLength: 5000 + type: string + required: + - account_number + - bank_name + - swift_code + title: FundingInstructionsBankTransferSwiftRecord + type: object + x-expandableFields: [] funding_instructions_bank_transfer_zengin_record: description: Zengin Records contain Japan bank account details per the Zengin format. properties: @@ -10158,6 +12404,56 @@ components: title: GelatoDocumentReportError type: object x-expandableFields: [] + gelato_email_report: + description: Result from a email check + properties: + email: + description: Email to be verified. + maxLength: 5000 + nullable: true + type: string + error: + anyOf: + - $ref: '#/components/schemas/gelato_email_report_error' + description: >- + Details on the verification error. Present when status is + `unverified`. + nullable: true + status: + description: Status of this `email` check. + enum: + - unverified + - verified + type: string + x-stripeBypassValidation: true + required: + - status + title: GelatoEmailReport + type: object + x-expandableFields: + - error + gelato_email_report_error: + description: '' + properties: + code: + description: >- + A short machine-readable string giving the reason for the + verification failure. + enum: + - email_unverified_other + - email_verification_declined + nullable: true + type: string + reason: + description: >- + A human-readable message giving the reason for the failure. These + messages can be shown to your users. + maxLength: 5000 + nullable: true + type: string + title: GelatoEmailReportError + type: object + x-expandableFields: [] gelato_id_number_report: description: Result from an id_number check properties: @@ -10179,7 +12475,9 @@ components: nullable: true type: string id_number: - description: ID number. + description: >- + ID number. When `id_number_type` is `us_ssn`, only the last 4 digits + are present. maxLength: 5000 nullable: true type: string @@ -10233,6 +12531,70 @@ components: title: GelatoIdNumberReportError type: object x-expandableFields: [] + gelato_phone_report: + description: Result from a phone check + properties: + error: + anyOf: + - $ref: '#/components/schemas/gelato_phone_report_error' + description: >- + Details on the verification error. Present when status is + `unverified`. + nullable: true + phone: + description: Phone to be verified. + maxLength: 5000 + nullable: true + type: string + status: + description: Status of this `phone` check. + enum: + - unverified + - verified + type: string + x-stripeBypassValidation: true + required: + - status + title: GelatoPhoneReport + type: object + x-expandableFields: + - error + gelato_phone_report_error: + description: '' + properties: + code: + description: >- + A short machine-readable string giving the reason for the + verification failure. + enum: + - phone_unverified_other + - phone_verification_declined + nullable: true + type: string + reason: + description: >- + A human-readable message giving the reason for the failure. These + messages can be shown to your users. + maxLength: 5000 + nullable: true + type: string + title: GelatoPhoneReportError + type: object + x-expandableFields: [] + gelato_provided_details: + description: '' + properties: + email: + description: Email of user being verified + maxLength: 5000 + type: string + phone: + description: Phone number of user being verified + maxLength: 5000 + type: string + title: GelatoProvidedDetails + type: object + x-expandableFields: [] gelato_report_document_options: description: '' properties: @@ -10372,6 +12734,15 @@ components: title: GelatoSessionDocumentOptions type: object x-expandableFields: [] + gelato_session_email_options: + description: '' + properties: + require_verification: + description: Request one time password verification of `provided_details.email`. + type: boolean + title: GelatoSessionEmailOptions + type: object + x-expandableFields: [] gelato_session_id_number_options: description: '' properties: {} @@ -10393,9 +12764,13 @@ components: - document_expired - document_type_not_supported - document_unverified_other + - email_unverified_other + - email_verification_declined - id_number_insufficient_document_data - id_number_mismatch - id_number_unverified_other + - phone_unverified_other + - phone_verification_declined - selfie_document_missing_photo - selfie_face_mismatch - selfie_manipulated @@ -10414,6 +12789,15 @@ components: title: GelatoSessionLastError type: object x-expandableFields: [] + gelato_session_phone_options: + description: '' + properties: + require_verification: + description: Request one time password verification of `provided_details.phone`. + type: boolean + title: GelatoSessionPhoneOptions + type: object + x-expandableFields: [] gelato_verification_report_options: description: '' properties: @@ -10431,13 +12815,19 @@ components: properties: document: $ref: '#/components/schemas/gelato_session_document_options' + email: + $ref: '#/components/schemas/gelato_session_email_options' id_number: $ref: '#/components/schemas/gelato_session_id_number_options' + phone: + $ref: '#/components/schemas/gelato_session_phone_options' title: GelatoVerificationSessionOptions type: object x-expandableFields: - document + - email - id_number + - phone gelato_verified_outputs: description: '' properties: @@ -10451,6 +12841,11 @@ components: - $ref: '#/components/schemas/gelato_data_verified_outputs_date' description: The user’s verified date of birth. nullable: true + email: + description: The user's verified email address + maxLength: 5000 + nullable: true + type: string first_name: description: The user's verified first name. maxLength: 5000 @@ -10474,6 +12869,11 @@ components: maxLength: 5000 nullable: true type: string + phone: + description: The user's verified phone number + maxLength: 5000 + nullable: true + type: string title: GelatoVerifiedOutputs type: object x-expandableFields: @@ -10508,6 +12908,14 @@ components: Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). properties: + client_reference_id: + description: >- + A string to reference this user. This can be a customer ID, a + session ID, or similar, and can be used to reconcile this + verification with your internal systems. + maxLength: 5000 + nullable: true + type: string created: description: >- Time at which the object was created. Measured in seconds since the @@ -10516,6 +12924,8 @@ components: type: integer document: $ref: '#/components/schemas/gelato_document_report' + email: + $ref: '#/components/schemas/gelato_email_report' id: description: Unique identifier for the object. maxLength: 5000 @@ -10536,6 +12946,8 @@ components: type: string options: $ref: '#/components/schemas/gelato_verification_report_options' + phone: + $ref: '#/components/schemas/gelato_phone_report' selfie: $ref: '#/components/schemas/gelato_selfie_report' type: @@ -10543,8 +12955,13 @@ components: enum: - document - id_number + - verification_flow type: string x-stripeBypassValidation: true + verification_flow: + description: The configuration token of a Verification Flow from the dashboard. + maxLength: 5000 + type: string verification_session: description: ID of the VerificationSession that created this report. maxLength: 5000 @@ -10555,12 +12972,15 @@ components: - id - livemode - object + - type title: GelatoVerificationReport type: object x-expandableFields: - document + - email - id_number - options + - phone - selfie x-resourceId: identity.verification_report identity.verification_session: @@ -10591,6 +13011,14 @@ components: Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) properties: + client_reference_id: + description: >- + A string to reference this user. This can be a customer ID, a + session ID, or similar, and can be used to reconcile this + verification with your internal systems. + maxLength: 5000 + nullable: true + type: string client_secret: description: >- The short-lived client secret used by Stripe.js to [show a @@ -10661,6 +13089,13 @@ components: - $ref: '#/components/schemas/gelato_verification_session_options' description: A set of options for the session’s verification checks. nullable: true + provided_details: + anyOf: + - $ref: '#/components/schemas/gelato_provided_details' + description: >- + Details provided about the user being verified. These details may be + shown to the user. + nullable: true redaction: anyOf: - $ref: '#/components/schemas/verification_session_redaction' @@ -10686,7 +13121,7 @@ components: enum: - document - id_number - nullable: true + - verification_flow type: string x-stripeBypassValidation: true url: @@ -10701,6 +13136,10 @@ components: maxLength: 5000 nullable: true type: string + verification_flow: + description: The configuration token of a Verification Flow from the dashboard. + maxLength: 5000 + type: string verified_outputs: anyOf: - $ref: '#/components/schemas/gelato_verified_outputs' @@ -10713,12 +13152,14 @@ components: - metadata - object - status + - type title: GelatoVerificationSession type: object x-expandableFields: - last_error - last_verification_report - options + - provided_details - redaction - verified_outputs x-resourceId: identity.verification_session @@ -10778,8 +13219,20 @@ components: maxLength: 5000 nullable: true type: string + mandate: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/mandate' + description: ID of the mandate used to make this payment. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/mandate' network: - description: The US bank account network used to debit funds. + description: >- + The network rails used. See the + [docs](https://stripe.com/docs/treasury/money-movement/timelines) to + learn more about money movement timelines for each network type. enum: - ach type: string @@ -10792,6 +13245,36 @@ components: - network title: inbound_transfers_payment_method_details_us_bank_account type: object + x-expandableFields: + - mandate + internal_card: + description: '' + properties: + brand: + description: Brand of the card used in the transaction + maxLength: 5000 + nullable: true + type: string + country: + description: Two-letter ISO code representing the country of the card + maxLength: 5000 + nullable: true + type: string + exp_month: + description: Two digit number representing the card's expiration month + nullable: true + type: integer + exp_year: + description: Two digit number representing the card's expiration year + nullable: true + type: integer + last4: + description: The last 4 digits of the card + maxLength: 5000 + nullable: true + type: string + title: internal_card + type: object x-expandableFields: [] invoice: description: >- @@ -11168,7 +13651,6 @@ components: oneOf: - $ref: '#/components/schemas/discount' - $ref: '#/components/schemas/deleted_discount' - nullable: true type: array due_date: description: >- @@ -11202,7 +13684,7 @@ components: type: string from_invoice: anyOf: - - $ref: '#/components/schemas/invoices_from_invoice' + - $ref: '#/components/schemas/invoices_resource_from_invoice' description: >- Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) @@ -11231,6 +13713,8 @@ components: maxLength: 5000 nullable: true type: string + issuer: + $ref: '#/components/schemas/connect_account_reference' last_finalization_error: anyOf: - $ref: '#/components/schemas/api_errors' @@ -11407,20 +13891,15 @@ components: type: string rendering: anyOf: - - $ref: '#/components/schemas/invoices_invoice_rendering' + - $ref: '#/components/schemas/invoices_resource_invoice_rendering' description: >- The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. nullable: true - rendering_options: - anyOf: - - $ref: '#/components/schemas/invoice_setting_rendering_options' - description: Options for invoice PDF rendering. - nullable: true shipping_cost: anyOf: - - $ref: '#/components/schemas/invoices_shipping_cost' + - $ref: '#/components/schemas/invoices_resource_shipping_cost' description: >- The details of the cost of shipping, including the ShippingRate applied on the invoice. @@ -11462,7 +13941,7 @@ components: type: string x-stripeBypassValidation: true status_transitions: - $ref: '#/components/schemas/invoices_status_transitions' + $ref: '#/components/schemas/invoices_resource_status_transitions' subscription: anyOf: - maxLength: 5000 @@ -11566,6 +14045,8 @@ components: - created - currency - default_tax_rates + - discounts + - issuer - lines - livemode - object @@ -11599,6 +14080,7 @@ components: - discount - discounts - from_invoice + - issuer - last_finalization_error - latest_revision - lines @@ -11607,7 +14089,6 @@ components: - payment_settings - quote - rendering - - rendering_options - shipping_cost - shipping_details - status_transitions @@ -11757,12 +14238,13 @@ components: 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) + Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. enum: - any - automatic + - challenge nullable: true type: string title: invoice_payment_method_options_card @@ -11831,6 +14313,12 @@ components: title: invoice_payment_method_options_konbini type: object x-expandableFields: [] + invoice_payment_method_options_sepa_debit: + description: '' + properties: {} + title: invoice_payment_method_options_sepa_debit + type: object + x-expandableFields: [] invoice_payment_method_options_us_bank_account: description: '' properties: @@ -11869,6 +14357,7 @@ components: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true nullable: true @@ -11958,9 +14447,14 @@ components: `collection_method=charge_automatically`. nullable: true type: integer + issuer: + $ref: '#/components/schemas/connect_account_reference' + required: + - issuer title: InvoiceSettingQuoteSetting type: object - x-expandableFields: [] + x-expandableFields: + - issuer invoice_setting_rendering_options: description: '' properties: @@ -11977,6 +14471,23 @@ components: invoice_setting_subscription_schedule_phase_setting: description: '' properties: + account_tax_ids: + description: >- + The account tax IDs associated with this phase of the subscription + schedule. Will be set on invoices generated by this phase of the + subscription schedule. + items: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/tax_id' + - $ref: '#/components/schemas/deleted_tax_id' + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/tax_id' + - $ref: '#/components/schemas/deleted_tax_id' + nullable: true + type: array days_until_due: description: >- Number of days within which a customer must pay invoices generated @@ -11984,12 +14495,38 @@ components: subscription schedules where `billing=charge_automatically`. nullable: true type: integer + issuer: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The connected account that issues the invoice. The invoice is + presented with the branding and support information of the specified + account. + nullable: true title: InvoiceSettingSubscriptionSchedulePhaseSetting type: object - x-expandableFields: [] + x-expandableFields: + - account_tax_ids + - issuer invoice_setting_subscription_schedule_setting: description: '' properties: + account_tax_ids: + description: >- + The account tax IDs associated with the subscription schedule. Will + be set on invoices generated by the subscription schedule. + items: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/tax_id' + - $ref: '#/components/schemas/deleted_tax_id' + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/tax_id' + - $ref: '#/components/schemas/deleted_tax_id' + nullable: true + type: array days_until_due: description: >- Number of days within which a customer must pay invoices generated @@ -11997,9 +14534,15 @@ components: subscription schedules where `billing=charge_automatically`. nullable: true type: integer + issuer: + $ref: '#/components/schemas/connect_account_reference' + required: + - issuer title: InvoiceSettingSubscriptionScheduleSetting type: object - x-expandableFields: [] + x-expandableFields: + - account_tax_ids + - issuer invoice_tax_amount: description: '' properties: @@ -12320,48 +14863,6 @@ components: - 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_invoice_rendering: - 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 - pdf: - anyOf: - - $ref: '#/components/schemas/invoice_rendering_pdf' - description: Invoice pdf rendering options - nullable: true - title: InvoicesInvoiceRendering - type: object - x-expandableFields: - - pdf invoices_payment_method_options: description: '' properties: @@ -12405,6 +14906,14 @@ components: Konbini payment method options to pass to the invoice’s PaymentIntent. nullable: true + sepa_debit: + anyOf: + - $ref: '#/components/schemas/invoice_payment_method_options_sepa_debit' + description: >- + If paying by `sepa_debit`, this sub-hash contains details about the + SEPA Direct Debit payment method options to pass to the invoice’s + PaymentIntent. + nullable: true us_bank_account: anyOf: - $ref: >- @@ -12422,6 +14931,7 @@ components: - card - customer_balance - konbini + - sepa_debit - us_bank_account invoices_payment_settings: description: '' @@ -12461,12 +14971,14 @@ components: - card - cashapp - customer_balance + - eps - fpx - giropay - grabpay - ideal - konbini - link + - p24 - paynow - paypal - promptpay @@ -12482,6 +14994,48 @@ components: type: object x-expandableFields: - payment_method_options + invoices_resource_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: InvoicesResourceFromInvoice + type: object + x-expandableFields: + - invoice + invoices_resource_invoice_rendering: + 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 + pdf: + anyOf: + - $ref: '#/components/schemas/invoice_rendering_pdf' + description: Invoice pdf rendering options + nullable: true + title: InvoicesResourceInvoiceRendering + type: object + x-expandableFields: + - pdf invoices_resource_invoice_tax_id: description: '' properties: @@ -12491,10 +15045,10 @@ components: `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `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`, `jp_trn`, `li_uid`, `my_itn`, - `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, + `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `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`, `jp_trn`, `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`, `ke_pin`, `tr_tin`, @@ -12545,6 +15099,7 @@ components: - my_itn - my_sst - no_vat + - no_voec - nz_gst - pe_ruc - ph_tin @@ -12611,7 +15166,7 @@ components: type: object x-expandableFields: - credited_items - invoices_shipping_cost: + invoices_resource_shipping_cost: description: '' properties: amount_subtotal: @@ -12644,12 +15199,12 @@ components: - amount_subtotal - amount_tax - amount_total - title: InvoicesShippingCost + title: InvoicesResourceShippingCost type: object x-expandableFields: - shipping_rate - taxes - invoices_status_transitions: + invoices_resource_status_transitions: description: '' properties: finalized_at: @@ -12672,7 +15227,7 @@ components: format: unix-time nullable: true type: integer - title: InvoicesStatusTransitions + title: InvoicesResourceStatusTransitions type: object x-expandableFields: [] issuing.authorization: @@ -12693,8 +15248,10 @@ components: amount: 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). + `currency` and in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). `amount` + should be the same as `merchant_amount`, unless `currency` and + `merchant_currency` are different. type: integer amount_details: anyOf: @@ -12741,7 +15298,9 @@ components: type: integer currency: description: >- - Three-letter [ISO currency + The currency of the cardholder. This currency can be different from + the currency presented at authorization and the `merchant_currency` + field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -12760,11 +15319,15 @@ components: The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + `merchant_amount` should be the same as `amount`, unless + `merchant_currency` and `currency` are different. type: integer merchant_currency: description: >- - The currency that was presented to the cardholder for the - authorization. Three-letter [ISO currency + The local currency that was presented to the cardholder for the + authorization. This currency can be different from the cardholder + currency and the `currency` field on this authorization. + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -12820,6 +15383,19 @@ components: - pending - reversed type: string + token: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/issuing.token' + description: >- + [Token](https://stripe.com/docs/api/issuing/tokens/object) object + used for this authorization. If a network token was not used for + this authorization, this field will be null. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/issuing.token' transactions: description: >- List of @@ -12876,6 +15452,7 @@ components: - network_data - pending_request - request_history + - token - transactions - treasury - verification_data @@ -12976,6 +15553,16 @@ components: enum: - issuing.card type: string + personalization_design: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/issuing.personalization_design' + description: The personalization design object belonging to this card. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/issuing.personalization_design' replaced_by: anyOf: - maxLength: 5000 @@ -13056,6 +15643,7 @@ components: type: object x-expandableFields: - cardholder + - personalization_design - replaced_by - replacement_for - shipping @@ -13301,6 +15889,169 @@ components: - transaction - treasury x-resourceId: issuing.dispute + issuing.personalization_design: + description: >- + A Personalization Design is a logical grouping of a Physical Bundle, + card logo, and carrier text that represents a product line. + properties: + card_logo: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/file' + description: >- + The file for the card logo to use with physical bundles that support + card logos. Must have a `purpose` value of `issuing_logo`. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/file' + carrier_text: + anyOf: + - $ref: '#/components/schemas/issuing_personalization_design_carrier_text' + description: >- + Hash containing carrier text, for use with physical bundles that + support carrier text. + nullable: true + 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 + lookup_key: + description: >- + A lookup key used to retrieve personalization designs dynamically + from a static string. This may be up to 200 characters. + 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 + name: + description: Friendly display name. + maxLength: 5000 + nullable: true + type: string + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - issuing.personalization_design + type: string + physical_bundle: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/issuing.physical_bundle' + description: The physical bundle object belonging to this personalization design. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/issuing.physical_bundle' + preferences: + $ref: '#/components/schemas/issuing_personalization_design_preferences' + rejection_reasons: + $ref: >- + #/components/schemas/issuing_personalization_design_rejection_reasons + status: + description: Whether this personalization design can be used to create cards. + enum: + - active + - inactive + - rejected + - review + type: string + required: + - created + - id + - livemode + - metadata + - object + - physical_bundle + - preferences + - rejection_reasons + - status + title: IssuingPersonalizationDesign + type: object + x-expandableFields: + - card_logo + - carrier_text + - physical_bundle + - preferences + - rejection_reasons + x-resourceId: issuing.personalization_design + issuing.physical_bundle: + description: >- + A Physical Bundle represents the bundle of physical items - card stock, + carrier letter, and envelope - that is shipped to a cardholder when you + create a physical card. + properties: + features: + $ref: '#/components/schemas/issuing_physical_bundle_features' + 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: Friendly display name. + maxLength: 5000 + type: string + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - issuing.physical_bundle + type: string + status: + description: Whether this physical bundle can be used to create cards. + enum: + - active + - inactive + - review + type: string + type: + description: >- + Whether this physical bundle is a standard Stripe offering or + custom-made for you. + enum: + - custom + - standard + type: string + required: + - id + - livemode + - name + - object + - status + - type + title: IssuingPhysicalBundle + type: object + x-expandableFields: + - features + x-resourceId: issuing.physical_bundle issuing.settlement: description: >- When a non-stripe BIN is used, any use of an [issued @@ -13406,6 +16157,100 @@ components: type: object x-expandableFields: [] x-resourceId: issuing.settlement + issuing.token: + description: >- + An issuing token object is created when an issued card is added to a + digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you + can [view and manage these + tokens](https://stripe.com/docs/issuing/controls/token-management) + through Stripe. + properties: + card: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/issuing.card' + description: Card associated with this token. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/issuing.card' + created: + description: >- + Time at which the object was created. Measured in seconds since the + Unix epoch. + format: unix-time + type: integer + device_fingerprint: + description: >- + The hashed ID derived from the device ID from the card network + associated with the token. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + last4: + description: The last four digits of the token. + 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 + network: + description: The token service provider / card network associated with the token. + enum: + - mastercard + - visa + type: string + network_data: + $ref: '#/components/schemas/issuing_network_token_network_data' + network_updated_at: + description: >- + Time at which the token was last updated by the card network. + Measured in seconds since the Unix epoch. + format: unix-time + type: integer + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - issuing.token + type: string + status: + description: The usage state of the token. + enum: + - active + - deleted + - requested + - suspended + type: string + wallet_provider: + description: 'The digital wallet for this token, if one was used.' + enum: + - apple_pay + - google_pay + - samsung_pay + type: string + required: + - card + - created + - id + - livemode + - network + - network_updated_at + - object + - status + title: IssuingNetworkToken + type: object + x-expandableFields: + - card + - network_data + x-resourceId: issuing.token issuing.transaction: description: >- Any use of an [issued card](https://stripe.com/docs/issuing) that @@ -13530,6 +16375,13 @@ components: you can attach to an object. This can be useful for storing additional information about the object in a structured format. type: object + network_data: + anyOf: + - $ref: '#/components/schemas/issuing_transaction_network_data' + description: >- + Details about the transaction, such as processing dates, set by the + card network. + nullable: true object: description: >- String representing the object's type. Objects of the same type @@ -13544,6 +16396,19 @@ components: Additional purchase information that is optionally provided by the merchant. nullable: true + token: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/issuing.token' + description: >- + [Token](https://stripe.com/docs/api/issuing/tokens/object) object + used for this transaction. If a network token was not used for this + transaction, this field will be null. + nullable: true + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/issuing.token' treasury: anyOf: - $ref: '#/components/schemas/issuing_transaction_treasury' @@ -13592,7 +16457,9 @@ components: - cardholder - dispute - merchant_data + - network_data - purchase_details + - token - treasury x-resourceId: issuing.transaction issuing_authorization_amount_details: @@ -13609,6 +16476,31 @@ components: title: IssuingAuthorizationAmountDetails type: object x-expandableFields: [] + issuing_authorization_authentication_exemption: + description: '' + properties: + claimed_by: + description: >- + The entity that requested the exemption, either the acquiring + merchant or the Issuing user. + enum: + - acquirer + - issuer + type: string + type: + description: The specific exemption claimed for this authorization. + enum: + - low_value_transaction + - transaction_risk_analysis + - unknown + type: string + x-stripeBypassValidation: true + required: + - claimed_by + - type + title: IssuingAuthorizationAuthenticationExemption + type: object + x-expandableFields: [] issuing_authorization_merchant_data: description: '' properties: @@ -13661,6 +16553,11 @@ components: maxLength: 5000 nullable: true type: string + url: + description: URL provided by the merchant on a 3DS request + maxLength: 5000 + nullable: true + type: string required: - category - category_code @@ -13679,6 +16576,21 @@ components: maxLength: 5000 nullable: true type: string + system_trace_audit_number: + description: >- + The System Trace Audit Number (STAN) is a 6-digit identifier + assigned by the acquirer. Prefer `network_data.transaction_id` if + present, unless you have special requirements. + maxLength: 5000 + nullable: true + type: string + transaction_id: + description: >- + Unique identifier for the authorization assigned by the card network + used to match subsequent messages, disputes, and transactions. + maxLength: 5000 + nullable: true + type: string title: IssuingAuthorizationNetworkData type: object x-expandableFields: [] @@ -13723,6 +16635,12 @@ components: merchant_currency: description: The local currency the merchant is requesting to authorize. type: string + network_risk_score: + description: >- + The card network's estimate of the likelihood that an authorization + is fraudulent. Takes on values between 1 and 99. + nullable: true + type: integer required: - amount - currency @@ -13755,6 +16673,17 @@ components: approved: description: Whether this request was approved. type: boolean + authorization_code: + description: >- + A code created by Stripe which is shared with the merchant to + validate the authorization. This field will be populated if the + authorization message was approved. The code typically starts with + the letter "S", followed by a six-digit number. For example, + "S498162". Please note that the code is not guaranteed to be unique + across authorizations. + maxLength: 5000 + nullable: true + type: string created: description: >- Time at which the object was created. Measured in seconds since the @@ -13784,6 +16713,12 @@ components: currency](https://stripe.com/docs/currencies). maxLength: 5000 type: string + network_risk_score: + description: >- + The card network's estimate of the likelihood that an authorization + is fraudulent. Takes on values between 1 and 99. + nullable: true + type: integer reason: description: >- When an authorization is approved or declined by you or by Stripe, @@ -13807,12 +16742,20 @@ components: x-stripeBypassValidation: true reason_message: description: >- - If approve/decline decision is directly responsed to the webhook - with json payload and if the response is invalid (e.g., parsing - errors), we surface the detailed message via this field. + If the `request_history.reason` is `webhook_error` because the + direct webhook response is invalid (for example, parsing errors or + missing parameters), we surface a more detailed error message via + this field. maxLength: 5000 nullable: true type: string + requested_at: + description: >- + Time when the card network received an authorization request from + the acquirer in UTC. Referred to by networks as transmission time. + format: unix-time + nullable: true + type: integer required: - amount - approved @@ -13825,6 +16768,23 @@ components: type: object x-expandableFields: - amount_details + issuing_authorization_three_d_secure: + description: '' + properties: + result: + description: The outcome of the 3D Secure authentication request. + enum: + - attempt_acknowledged + - authenticated + - failed + - required + type: string + x-stripeBypassValidation: true + required: + - result + title: IssuingAuthorizationThreeDSecure + type: object + x-expandableFields: [] issuing_authorization_treasury: description: '' properties: @@ -13881,6 +16841,12 @@ components: - mismatch - not_provided type: string + authentication_exemption: + anyOf: + - $ref: >- + #/components/schemas/issuing_authorization_authentication_exemption + description: The exemption applied to this authorization. + nullable: true cvc_check: description: >- Whether the cardholder provided a CVC and if it matched Stripe’s @@ -13899,6 +16865,18 @@ components: - mismatch - not_provided type: string + postal_code: + description: >- + The postal code submitted as part of the authorization used for + postal code verification. + maxLength: 5000 + nullable: true + type: string + three_d_secure: + anyOf: + - $ref: '#/components/schemas/issuing_authorization_three_d_secure' + description: 3D Secure details. + nullable: true required: - address_line1_check - address_postal_code_check @@ -13906,7 +16884,9 @@ components: - expiry_check title: IssuingAuthorizationVerificationData type: object - x-expandableFields: [] + x-expandableFields: + - authentication_exemption + - three_d_secure issuing_card_apple_pay: description: '' properties: @@ -14237,6 +17217,19 @@ components: type: string nullable: true type: array + allowed_merchant_countries: + description: >- + Array of strings containing representing countries from which + authorizations will be allowed. Authorizations from merchants in all + other countries will be declined. Country codes should be ISO 3166 + alpha-2 country codes (e.g. `US`). Cannot be set with + `blocked_merchant_countries`. Provide an empty value to unset this + control. + items: + maxLength: 5000 + type: string + nullable: true + type: array blocked_categories: description: >- Array of strings containing @@ -14545,6 +17538,18 @@ components: type: string nullable: true type: array + blocked_merchant_countries: + description: >- + Array of strings containing representing countries from which + authorizations will be declined. Country codes should be ISO 3166 + alpha-2 country codes (e.g. `US`). Cannot be set with + `allowed_merchant_countries`. Provide an empty value to unset this + control. + items: + maxLength: 5000 + type: string + nullable: true + type: array spending_limits: description: >- Limit spending with amount-based rules that apply across any cards @@ -15369,6 +18374,19 @@ components: type: string nullable: true type: array + allowed_merchant_countries: + description: >- + Array of strings containing representing countries from which + authorizations will be allowed. Authorizations from merchants in all + other countries will be declined. Country codes should be ISO 3166 + alpha-2 country codes (e.g. `US`). Cannot be set with + `blocked_merchant_countries`. Provide an empty value to unset this + control. + items: + maxLength: 5000 + type: string + nullable: true + type: array blocked_categories: description: >- Array of strings containing @@ -15677,6 +18695,18 @@ components: type: string nullable: true type: array + blocked_merchant_countries: + description: >- + Array of strings containing representing countries from which + authorizations will be declined. Country codes should be ISO 3166 + alpha-2 country codes (e.g. `US`). Cannot be set with + `allowed_merchant_countries`. Provide an empty value to unset this + control. + items: + maxLength: 5000 + type: string + nullable: true + type: array spending_limits: description: >- Limit spending with amount-based rules that apply across this @@ -15700,8 +18730,9 @@ components: anyOf: - $ref: '#/components/schemas/issuing_cardholder_user_terms_acceptance' description: >- - Information about cardholder acceptance of [Authorized User - Terms](https://stripe.com/docs/issuing/cards). + Information about cardholder acceptance of Celtic [Authorized User + Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). + Required for cards backed by a Celtic program. nullable: true title: IssuingCardholderCardIssuing type: object @@ -16187,14 +19218,14 @@ components: date: description: >- The Unix timestamp marking when the cardholder accepted the - Authorized User Terms. Required for Celtic Spend Card users. + Authorized User Terms. format: unix-time nullable: true type: integer ip: description: >- The IP address from which the cardholder accepted the Authorized - User Terms. Required for Celtic Spend Card users. + User Terms. maxLength: 5000 nullable: true type: string @@ -16615,6 +19646,359 @@ components: title: IssuingDisputeTreasury type: object x-expandableFields: [] + issuing_network_token_address: + description: '' + properties: + line1: + description: The street address of the cardholder tokenizing the card. + maxLength: 5000 + type: string + postal_code: + description: The postal code of the cardholder tokenizing the card. + maxLength: 5000 + type: string + required: + - line1 + - postal_code + title: IssuingNetworkTokenAddress + type: object + x-expandableFields: [] + issuing_network_token_device: + description: '' + properties: + device_fingerprint: + description: An obfuscated ID derived from the device ID. + maxLength: 5000 + type: string + ip_address: + description: The IP address of the device at provisioning time. + maxLength: 5000 + type: string + location: + description: >- + The geographic latitude/longitude coordinates of the device at + provisioning time. The format is [+-]decimal/[+-]decimal. + maxLength: 5000 + type: string + name: + description: The name of the device used for tokenization. + maxLength: 5000 + type: string + phone_number: + description: The phone number of the device used for tokenization. + maxLength: 5000 + type: string + type: + description: The type of device used for tokenization. + enum: + - other + - phone + - watch + type: string + title: IssuingNetworkTokenDevice + type: object + x-expandableFields: [] + issuing_network_token_mastercard: + description: '' + properties: + card_reference_id: + description: >- + A unique reference ID from MasterCard to represent the card account + number. + maxLength: 5000 + type: string + token_reference_id: + description: The network-unique identifier for the token. + maxLength: 5000 + type: string + token_requestor_id: + description: >- + The ID of the entity requesting tokenization, specific to + MasterCard. + maxLength: 5000 + type: string + token_requestor_name: + description: >- + The name of the entity requesting tokenization, if known. This is + directly provided from MasterCard. + maxLength: 5000 + type: string + required: + - token_reference_id + - token_requestor_id + title: IssuingNetworkTokenMastercard + type: object + x-expandableFields: [] + issuing_network_token_network_data: + description: '' + properties: + device: + $ref: '#/components/schemas/issuing_network_token_device' + mastercard: + $ref: '#/components/schemas/issuing_network_token_mastercard' + type: + description: >- + The network that the token is associated with. An additional hash is + included with a name matching this value, containing tokenization + data specific to the card network. + enum: + - mastercard + - visa + type: string + visa: + $ref: '#/components/schemas/issuing_network_token_visa' + wallet_provider: + $ref: '#/components/schemas/issuing_network_token_wallet_provider' + required: + - type + title: IssuingNetworkTokenNetworkData + type: object + x-expandableFields: + - device + - mastercard + - visa + - wallet_provider + issuing_network_token_visa: + description: '' + properties: + card_reference_id: + description: >- + A unique reference ID from Visa to represent the card account + number. + maxLength: 5000 + type: string + token_reference_id: + description: The network-unique identifier for the token. + maxLength: 5000 + type: string + token_requestor_id: + description: 'The ID of the entity requesting tokenization, specific to Visa.' + maxLength: 5000 + type: string + token_risk_score: + description: >- + Degree of risk associated with the token between `01` and `99`, with + higher number indicating higher risk. A `00` value indicates the + token was not scored by Visa. + maxLength: 5000 + type: string + required: + - card_reference_id + - token_reference_id + - token_requestor_id + title: IssuingNetworkTokenVisa + type: object + x-expandableFields: [] + issuing_network_token_wallet_provider: + description: '' + properties: + account_id: + description: >- + The wallet provider-given account ID of the digital wallet the token + belongs to. + maxLength: 5000 + type: string + account_trust_score: + description: >- + An evaluation on the trustworthiness of the wallet account between 1 + and 5. A higher score indicates more trustworthy. + type: integer + card_number_source: + description: The method used for tokenizing a card. + enum: + - app + - manual + - on_file + - other + type: string + cardholder_address: + $ref: '#/components/schemas/issuing_network_token_address' + cardholder_name: + description: The name of the cardholder tokenizing the card. + maxLength: 5000 + type: string + device_trust_score: + description: >- + An evaluation on the trustworthiness of the device. A higher score + indicates more trustworthy. + type: integer + hashed_account_email_address: + description: >- + The hashed email address of the cardholder's account with the wallet + provider. + maxLength: 5000 + type: string + reason_codes: + description: The reasons for suggested tokenization given by the card network. + items: + enum: + - account_card_too_new + - account_recently_changed + - account_too_new + - account_too_new_since_launch + - additional_device + - data_expired + - defer_id_v_decision + - device_recently_lost + - good_activity_history + - has_suspended_tokens + - high_risk + - inactive_account + - long_account_tenure + - low_account_score + - low_device_score + - low_phone_number_score + - network_service_error + - outside_home_territory + - provisioning_cardholder_mismatch + - provisioning_device_and_cardholder_mismatch + - provisioning_device_mismatch + - same_device_no_prior_authentication + - same_device_successful_prior_authentication + - software_update + - suspicious_activity + - too_many_different_cardholders + - too_many_recent_attempts + - too_many_recent_tokens + type: string + type: array + suggested_decision: + description: The recommendation on responding to the tokenization request. + enum: + - approve + - decline + - require_auth + type: string + suggested_decision_version: + description: >- + The version of the standard for mapping reason codes followed by the + wallet provider. + maxLength: 5000 + type: string + title: IssuingNetworkTokenWalletProvider + type: object + x-expandableFields: + - cardholder_address + issuing_personalization_design_carrier_text: + description: '' + properties: + footer_body: + description: The footer body text of the carrier letter. + maxLength: 5000 + nullable: true + type: string + footer_title: + description: The footer title text of the carrier letter. + maxLength: 5000 + nullable: true + type: string + header_body: + description: The header body text of the carrier letter. + maxLength: 5000 + nullable: true + type: string + header_title: + description: The header title text of the carrier letter. + maxLength: 5000 + nullable: true + type: string + title: IssuingPersonalizationDesignCarrierText + type: object + x-expandableFields: [] + issuing_personalization_design_preferences: + description: '' + properties: + is_default: + description: >- + Whether we use this personalization design to create cards when one + isn't specified. A connected account uses the Connect platform's + default design if no personalization design is set as the default + design. + type: boolean + is_platform_default: + description: >- + Whether this personalization design is used to create cards when one + is not specified and a default for this connected account does not + exist. + nullable: true + type: boolean + required: + - is_default + title: IssuingPersonalizationDesignPreferences + type: object + x-expandableFields: [] + issuing_personalization_design_rejection_reasons: + description: '' + properties: + card_logo: + description: The reason(s) the card logo was rejected. + items: + enum: + - geographic_location + - inappropriate + - network_name + - non_binary_image + - non_fiat_currency + - other + - other_entity + - promotional_material + type: string + nullable: true + type: array + carrier_text: + description: The reason(s) the carrier text was rejected. + items: + enum: + - geographic_location + - inappropriate + - network_name + - non_fiat_currency + - other + - other_entity + - promotional_material + type: string + nullable: true + type: array + title: IssuingPersonalizationDesignRejectionReasons + type: object + x-expandableFields: [] + issuing_physical_bundle_features: + description: '' + properties: + card_logo: + description: >- + The policy for how to use card logo images in a card design with + this physical bundle. + enum: + - optional + - required + - unsupported + type: string + carrier_text: + description: >- + The policy for how to use carrier letter text in a card design with + this physical bundle. + enum: + - optional + - required + - unsupported + type: string + second_line: + description: >- + The policy for how to use a second line on a card with this physical + bundle. + enum: + - optional + - required + - unsupported + type: string + required: + - card_logo + - carrier_text + - second_line + title: IssuingPhysicalBundleFeatures + type: object + x-expandableFields: [] issuing_transaction_amount_details: description: '' properties: @@ -16742,6 +20126,39 @@ components: title: IssuingTransactionLodgingData type: object x-expandableFields: [] + issuing_transaction_network_data: + description: '' + properties: + authorization_code: + description: >- + A code created by Stripe which is shared with the merchant to + validate the authorization. This field will be populated if the + authorization message was approved. The code typically starts with + the letter "S", followed by a six-digit number. For example, + "S498162". Please note that the code is not guaranteed to be unique + across authorizations. + maxLength: 5000 + nullable: true + type: string + processing_date: + description: >- + The date the transaction was processed by the card network. This can + be different from the date the seller recorded the transaction + depending on when the acquirer submits the transaction to the + network. + maxLength: 5000 + nullable: true + type: string + transaction_id: + description: >- + Unique identifier for the authorization assigned by the card network + used to match subsequent messages, disputes, and transactions. + maxLength: 5000 + nullable: true + type: string + title: IssuingTransactionNetworkData + type: object + x-expandableFields: [] issuing_transaction_purchase_details: description: '' properties: @@ -17003,6 +20420,7 @@ components: - public_company - public_corporation - public_partnership + - registered_charity - single_member_llc - sole_establishment - sole_proprietorship @@ -17338,12 +20756,16 @@ components: x-expansionResources: oneOf: - $ref: '#/components/schemas/discount' - nullable: true type: array id: description: Unique identifier for the object. maxLength: 5000 type: string + invoice: + description: The ID of the invoice that contains this line item. + maxLength: 5000 + nullable: true + type: string invoice_item: anyOf: - maxLength: 5000 @@ -17452,6 +20874,7 @@ components: - amount - currency - discountable + - discounts - id - livemode - metadata @@ -17553,6 +20976,7 @@ components: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true nullable: true @@ -17743,6 +21167,18 @@ components: description: The unique reference identifying the mandate on the Bacs network. maxLength: 5000 type: string + revocation_reason: + description: >- + When the mandate is revoked on the Bacs network this field displays + the reason for the revocation. + enum: + - account_closed + - bank_account_restricted + - bank_ownership_changed + - could_not_process + - debit_not_authorized + nullable: true + type: string url: description: The URL that will contain the mandate that the customer has signed. maxLength: 5000 @@ -17873,7 +21309,13 @@ components: x-expandableFields: [] mandate_us_bank_account: description: '' - properties: {} + properties: + collection_method: + description: Mandate collection method + enum: + - paper + type: string + x-stripeBypassValidation: true title: mandate_us_bank_account type: object x-expandableFields: [] @@ -17887,7 +21329,10 @@ components: type: string type: array preferred: - description: The preferred network for the card. + description: >- + The preferred network for co-branded cards. Can be + `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if + requested network is not valid for the card. maxLength: 5000 nullable: true type: string @@ -18046,8 +21491,20 @@ components: maxLength: 5000 nullable: true type: string + mandate: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/mandate' + description: ID of the mandate used to make this payment. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/mandate' network: - description: The US bank account network used to send funds. + description: >- + The network rails used. See the + [docs](https://stripe.com/docs/treasury/money-movement/timelines) to + learn more about money movement timelines for each network type. enum: - ach - us_domestic_wire @@ -18061,7 +21518,8 @@ components: - network title: outbound_payments_payment_method_details_us_bank_account type: object - x-expandableFields: [] + x-expandableFields: + - mandate outbound_transfers_payment_method_details: description: '' properties: @@ -18118,8 +21576,20 @@ components: maxLength: 5000 nullable: true type: string + mandate: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/mandate' + description: ID of the mandate used to make this payment. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/mandate' network: - description: The US bank account network used to send funds. + description: >- + The network rails used. See the + [docs](https://stripe.com/docs/treasury/money-movement/timelines) to + learn more about money movement timelines for each network type. enum: - ach - us_domestic_wire @@ -18133,7 +21603,8 @@ components: - network title: outbound_transfers_payment_method_details_us_bank_account type: object - x-expandableFields: [] + x-expandableFields: + - mandate package_dimensions: description: '' properties: @@ -18273,6 +21744,73 @@ components: title: PaymentFlowsPrivatePaymentMethodsAlipayDetails type: object x-expandableFields: [] + payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization: + description: '' + properties: + status: + description: >- + Indicates whether or not the capture window is extended beyond the + standard authorization. + enum: + - disabled + - enabled + type: string + required: + - status + title: >- + PaymentFlowsPrivatePaymentMethodsCardDetailsAPIResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorization + type: object + x-expandableFields: [] + payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization: + description: '' + properties: + status: + description: >- + Indicates whether or not the incremental authorization feature is + supported. + enum: + - available + - unavailable + type: string + required: + - status + title: >- + PaymentFlowsPrivatePaymentMethodsCardDetailsAPIResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorization + type: object + x-expandableFields: [] + payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture: + description: '' + properties: + maximum_amount_capturable: + description: The maximum amount that can be captured. + type: integer + status: + description: Indicates whether or not the authorized amount can be over-captured. + enum: + - available + - unavailable + type: string + required: + - maximum_amount_capturable + - status + title: >- + PaymentFlowsPrivatePaymentMethodsCardDetailsAPIResourceEnterpriseFeaturesOvercaptureOvercapture + type: object + x-expandableFields: [] + payment_flows_private_payment_methods_card_details_api_resource_multicapture: + description: '' + properties: + status: + description: Indicates whether or not multiple captures are supported. + enum: + - available + - unavailable + type: string + required: + - status + title: PaymentFlowsPrivatePaymentMethodsCardDetailsAPIResourceMulticapture + type: object + x-expandableFields: [] payment_flows_private_payment_methods_klarna_dob: description: '' properties: @@ -18335,7 +21873,7 @@ components: amount_details: $ref: '#/components/schemas/payment_flows_amount_details' amount_received: - description: Amount that was collected by this PaymentIntent. + description: Amount that this PaymentIntent collects. type: integer application: anyOf: @@ -18417,6 +21955,9 @@ components: nullable: true type: string confirmation_method: + description: >- + Describes whether we can confirm this PaymentIntent automatically, + or if it requires customer action to confirm the payment. enum: - automatic - manual @@ -18492,7 +22033,7 @@ components: - maxLength: 5000 type: string - $ref: '#/components/schemas/charge' - description: The latest charge created by this payment intent. + description: The latest charge created by this PaymentIntent. nullable: true x-expansionResources: oneOf: @@ -18509,9 +22050,9 @@ 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. For - more information, see the - [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + additional information about the object in a structured format. + Learn more about [storing information in + metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). type: object next_action: anyOf: @@ -18630,9 +22171,11 @@ components: 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. + For card charges, use + [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). + Otherwise, you can use this value as the complete description of a + charge on your customers' statements. It must contain at least one + letter and be 1–22 characters long. maxLength: 5000 nullable: true type: string @@ -18666,17 +22209,15 @@ components: 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. + The data that automatically creates a Transfer after the payment + finalizes. Learn more about the [use case for connected + accounts](https://stripe.com/docs/payments/connected-accounts). 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/connect/separate-charges-and-transfers) - for details. + Learn more about the [use case for connected + accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). maxLength: 5000 nullable: true type: string @@ -18751,6 +22292,9 @@ components: #/components/schemas/payment_intent_next_action_promptpay_display_qr_code redirect_to_url: $ref: '#/components/schemas/payment_intent_next_action_redirect_to_url' + swish_handle_redirect_or_display_qr_code: + $ref: >- + #/components/schemas/payment_intent_next_action_swish_handle_redirect_or_display_qr_code type: description: >- Type of the next action to perform, one of `redirect_to_url`, @@ -18793,6 +22337,7 @@ components: - pix_display_qr_code - promptpay_display_qr_code - redirect_to_url + - swish_handle_redirect_or_display_qr_code - verify_with_microdeposits - wechat_pay_display_qr_code - wechat_pay_redirect_to_android_app @@ -19237,6 +22782,48 @@ components: title: PaymentIntentNextActionRedirectToUrl type: object x-expandableFields: [] + payment_intent_next_action_swish_handle_redirect_or_display_qr_code: + description: '' + properties: + hosted_instructions_url: + description: >- + The URL to the hosted Swish instructions page, which allows + customers to view the QR code. + maxLength: 5000 + type: string + qr_code: + $ref: '#/components/schemas/payment_intent_next_action_swish_qr_code' + required: + - hosted_instructions_url + - qr_code + title: PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode + type: object + x-expandableFields: + - qr_code + payment_intent_next_action_swish_qr_code: + description: '' + properties: + data: + description: >- + The raw data string used to generate QR code, it should be used + together with QR code library. + 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_url_png + - image_url_svg + title: PaymentIntentNextActionSwishQRCode + type: object + x-expandableFields: [] payment_intent_next_action_verify_with_microdeposits: description: '' properties: @@ -19468,6 +23055,12 @@ components: - $ref: '#/components/schemas/payment_intent_payment_method_options_link' - $ref: >- #/components/schemas/payment_intent_type_specific_payment_method_options_client + mobilepay: + anyOf: + - $ref: >- + #/components/schemas/payment_intent_payment_method_options_mobilepay + - $ref: >- + #/components/schemas/payment_intent_type_specific_payment_method_options_client oxxo: anyOf: - $ref: '#/components/schemas/payment_method_options_oxxo' @@ -19498,6 +23091,11 @@ components: - $ref: '#/components/schemas/payment_method_options_promptpay' - $ref: >- #/components/schemas/payment_intent_type_specific_payment_method_options_client + revolut_pay: + anyOf: + - $ref: '#/components/schemas/payment_method_options_revolut_pay' + - $ref: >- + #/components/schemas/payment_intent_type_specific_payment_method_options_client sepa_debit: anyOf: - $ref: >- @@ -19509,6 +23107,11 @@ components: - $ref: '#/components/schemas/payment_method_options_sofort' - $ref: >- #/components/schemas/payment_intent_type_specific_payment_method_options_client + swish: + anyOf: + - $ref: '#/components/schemas/payment_intent_payment_method_options_swish' + - $ref: >- + #/components/schemas/payment_intent_type_specific_payment_method_options_client us_bank_account: anyOf: - $ref: >- @@ -19550,14 +23153,17 @@ components: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -19635,7 +23241,30 @@ components: x-expandableFields: [] payment_intent_payment_method_options_blik: description: '' - properties: {} + 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 + x-stripeBypassValidation: true title: payment_intent_payment_method_options_blik type: object x-expandableFields: [] @@ -19685,6 +23314,43 @@ components: - visa nullable: true type: string + request_extended_authorization: + description: >- + Request ability to [capture beyond the standard authorization + validity + window](https://stripe.com/docs/payments/extended-authorization) for + this PaymentIntent. + enum: + - if_available + - never + type: string + request_incremental_authorization: + description: >- + Request ability to [increment the + authorization](https://stripe.com/docs/payments/incremental-authorization) + for this PaymentIntent. + enum: + - if_available + - never + type: string + request_multicapture: + description: >- + Request ability to make [multiple + captures](https://stripe.com/docs/payments/multicapture) for this + PaymentIntent. + enum: + - if_available + - never + type: string + request_overcapture: + description: >- + Request ability to + [overcapture](https://stripe.com/docs/payments/overcapture) for this + PaymentIntent. + enum: + - if_available + - never + type: string request_three_d_secure: description: >- We strongly recommend that you rely on our SCA Engine to @@ -19692,18 +23358,24 @@ components: 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) + own fraud engine, provide this option. If not provided, this value + defaults to `automatic`. Read our guide on [manually requesting 3D + Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. enum: - any - automatic - - challenge_only + - challenge nullable: true type: string + x-stripeBypassValidation: true + require_cvc_recollection: + description: >- + When enabled, using a card that is attached to a customer will + require the CVC to be provided again (i.e. using the cvc_token + parameter). + type: boolean setup_future_usage: description: >- Indicates that you intend to make future payments with this @@ -19856,50 +23528,123 @@ components: title: payment_intent_payment_method_options_mandate_options_sepa_debit type: object x-expandableFields: [] - payment_intent_payment_method_options_sepa_debit: + payment_intent_payment_method_options_mobilepay: description: '' properties: - mandate_options: - $ref: >- - #/components/schemas/payment_intent_payment_method_options_mandate_options_sepa_debit - setup_future_usage: + capture_method: description: >- - Indicates that you intend to make future payments with this - PaymentIntent's payment method. - - - Providing this parameter will [attach the payment - method](https://stripe.com/docs/payments/save-during-payment) to the - PaymentIntent's Customer, if present, after the PaymentIntent is - confirmed and any required actions from the user are complete. If no - Customer was provided, the payment method can still be - [attached](https://stripe.com/docs/api/payment_methods/attach) to a - Customer after the transaction completes. - - - When processing card payments, Stripe also uses `setup_future_usage` - to 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_sepa_debit - type: object - x-expandableFields: - - mandate_options - payment_intent_payment_method_options_us_bank_account: - description: '' - properties: - financial_connections: - $ref: '#/components/schemas/linked_account_options_us_bank_account' - preferred_settlement_speed: - description: Preferred transaction settlement speed + Controls when the funds will be captured from the customer's + account. enum: - - fastest - - standard + - 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_intent_payment_method_options_mobilepay + 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 + 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_sepa_debit + type: object + x-expandableFields: + - mandate_options + payment_intent_payment_method_options_swish: + description: '' + properties: + reference: + description: >- + The order ID displayed in the Swish app after the payment is + authorized. + maxLength: 35 + 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_intent_payment_method_options_swish + type: object + x-expandableFields: [] + payment_intent_payment_method_options_us_bank_account: + description: '' + properties: + financial_connections: + $ref: '#/components/schemas/linked_account_options_us_bank_account' + mandate_options: + $ref: >- + #/components/schemas/payment_method_options_us_bank_account_mandate_options + preferred_settlement_speed: + description: Preferred transaction settlement speed + enum: + - fastest + - standard type: string setup_future_usage: description: >- @@ -19937,6 +23682,7 @@ components: type: object x-expandableFields: - financial_connections + - mandate_options payment_intent_processing: description: '' properties: @@ -19988,6 +23734,12 @@ components: type: string installments: $ref: '#/components/schemas/payment_flows_installment_options' + require_cvc_recollection: + description: >- + When enabled, using a card that is attached to a customer will + require the CVC to be provided again (i.e. using the cvc_token + parameter). + type: boolean setup_future_usage: description: >- Indicates that you intend to make future payments with this @@ -20080,7 +23832,9 @@ components: automatic_tax: $ref: '#/components/schemas/payment_links_resource_automatic_tax' billing_address_collection: - description: Configuration for collecting the customer's billing address. + description: >- + Configuration for collecting the customer's billing address. + Defaults to `auto`. enum: - auto - required @@ -20102,7 +23856,7 @@ components: custom_fields: description: >- Collect additional information from your customer using custom - fields. Up to 2 fields are supported. + fields. Up to 3 fields are supported. items: $ref: '#/components/schemas/payment_links_resource_custom_fields' type: array @@ -20118,6 +23872,13 @@ components: description: Unique identifier for the object. maxLength: 5000 type: string + inactive_message: + description: >- + The custom message to be displayed to a customer when a payment link + is no longer active. + maxLength: 5000 + nullable: true + type: string invoice_creation: anyOf: - $ref: '#/components/schemas/payment_links_resource_invoice_creation' @@ -20198,7 +23959,9 @@ components: during checkout. nullable: true payment_method_collection: - description: Configuration for collecting a payment method during checkout. + description: >- + Configuration for collecting a payment method during checkout. + Defaults to `always`. enum: - always - if_required @@ -20237,6 +24000,7 @@ components: - promptpay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay type: string @@ -20245,6 +24009,11 @@ components: type: array phone_number_collection: $ref: '#/components/schemas/payment_links_resource_phone_number_collection' + restrictions: + anyOf: + - $ref: '#/components/schemas/payment_links_resource_restrictions' + description: Settings that restrict the usage of a payment link. + nullable: true shipping_address_collection: anyOf: - $ref: >- @@ -20321,6 +24090,7 @@ components: - on_behalf_of - payment_intent_data - phone_number_collection + - restrictions - shipping_address_collection - shipping_options - subscription_data @@ -20357,10 +24127,40 @@ components: If `true`, tax will be calculated automatically using the customer's location. type: boolean + liability: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The account that's liable for tax. If set, the business address and + tax registrations required to perform the tax calculation are loaded + from this account. The tax transaction is returned in the report of + the connected account. + nullable: true required: - enabled title: PaymentLinksResourceAutomaticTax type: object + x-expandableFields: + - liability + payment_links_resource_completed_sessions: + description: '' + properties: + count: + description: >- + The current number of checkout sessions that have been completed on + the payment link which count towards the `completed_sessions` + restriction to be met. + type: integer + limit: + description: >- + The maximum number of checkout sessions that can be completed for + the `completed_sessions` restriction to be met. + type: integer + required: + - count + - limit + title: PaymentLinksResourceCompletedSessions + type: object x-expandableFields: [] payment_links_resource_completion_behavior_confirmation_page: description: '' @@ -20392,6 +24192,14 @@ components: payment_links_resource_consent_collection: description: '' properties: + payment_method_reuse_agreement: + anyOf: + - $ref: >- + #/components/schemas/payment_links_resource_payment_method_reuse_agreement + description: >- + Settings related to the payment method reuse text shown in the + Checkout UI. + nullable: true promotions: description: >- If set to `auto`, enables the collection of customer consent for @@ -20413,16 +24221,13 @@ components: type: string title: PaymentLinksResourceConsentCollection type: object - x-expandableFields: [] + x-expandableFields: + - payment_method_reuse_agreement payment_links_resource_custom_fields: description: '' properties: dropdown: - anyOf: - - $ref: >- - #/components/schemas/payment_links_resource_custom_fields_dropdown - description: Configuration for `type=dropdown` fields. - nullable: true + $ref: '#/components/schemas/payment_links_resource_custom_fields_dropdown' key: description: >- String of your choice that your integration can use to reconcile @@ -20433,21 +24238,14 @@ components: label: $ref: '#/components/schemas/payment_links_resource_custom_fields_label' numeric: - anyOf: - - $ref: >- - #/components/schemas/payment_links_resource_custom_fields_numeric - description: Configuration for `type=numeric` fields. - nullable: true + $ref: '#/components/schemas/payment_links_resource_custom_fields_numeric' optional: description: >- Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. type: boolean text: - anyOf: - - $ref: '#/components/schemas/payment_links_resource_custom_fields_text' - description: Configuration for `type=text` fields. - nullable: true + $ref: '#/components/schemas/payment_links_resource_custom_fields_text' type: description: The type of the field. enum: @@ -20558,6 +24356,13 @@ components: payment_links_resource_custom_text: description: '' properties: + after_submit: + anyOf: + - $ref: '#/components/schemas/payment_links_resource_custom_text_position' + description: >- + Custom text that should be displayed after the payment confirmation + button. + nullable: true shipping_address: anyOf: - $ref: '#/components/schemas/payment_links_resource_custom_text_position' @@ -20582,6 +24387,7 @@ components: title: PaymentLinksResourceCustomText type: object x-expandableFields: + - after_submit - shipping_address - submit - terms_of_service_acceptance @@ -20651,6 +24457,14 @@ components: maxLength: 5000 nullable: true type: string + issuer: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The connected account that issues the invoice. The invoice is + presented with the branding and support information of the specified + account. + nullable: true metadata: additionalProperties: maxLength: 500 @@ -20671,6 +24485,7 @@ components: x-expandableFields: - account_tax_ids - custom_fields + - issuer - rendering_options payment_links_resource_payment_intent_data: description: '' @@ -20685,6 +24500,23 @@ components: - manual 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 + metadata: + additionalProperties: + maxLength: 500 + type: string + description: >- + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that + will set metadata on [Payment + Intents](https://stripe.com/docs/api/payment_intents) generated from + this payment link. + type: object setup_future_usage: description: >- Indicates that you intend to make future payments with the payment @@ -20694,9 +24526,59 @@ components: - on_session nullable: true type: string + statement_descriptor: + description: >- + Extra information about the payment. This will appear on your + customer's statement when this payment succeeds in creating a + charge. + maxLength: 5000 + nullable: true + 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: 5000 + nullable: true + type: string + 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/connect/separate-charges-and-transfers) + for details. + maxLength: 5000 + nullable: true + type: string + required: + - metadata title: PaymentLinksResourcePaymentIntentData type: object x-expandableFields: [] + payment_links_resource_payment_method_reuse_agreement: + description: '' + properties: + position: + description: >- + Determines the position and visibility of the payment method reuse + agreement in the UI. When set to `auto`, Stripe's defaults will be + used. + + + When set to `hidden`, the payment method reuse agreement text will + always be hidden in the UI. + enum: + - auto + - hidden + type: string + required: + - position + title: PaymentLinksResourcePaymentMethodReuseAgreement + type: object + x-expandableFields: [] payment_links_resource_phone_number_collection: description: '' properties: @@ -20708,6 +24590,17 @@ components: title: PaymentLinksResourcePhoneNumberCollection type: object x-expandableFields: [] + payment_links_resource_restrictions: + description: '' + properties: + completed_sessions: + $ref: '#/components/schemas/payment_links_resource_completed_sessions' + required: + - completed_sessions + title: PaymentLinksResourceRestrictions + type: object + x-expandableFields: + - completed_sessions payment_links_resource_shipping_address_collection: description: '' properties: @@ -20992,19 +24885,55 @@ components: description: >- The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the - subscription. + subscription for rendering in Stripe surfaces and certain local + payment methods UIs. maxLength: 5000 nullable: true type: string + invoice_settings: + $ref: >- + #/components/schemas/payment_links_resource_subscription_data_invoice_settings + metadata: + additionalProperties: + maxLength: 500 + type: string + description: >- + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that + will set metadata on + [Subscriptions](https://stripe.com/docs/api/subscriptions) generated + from this payment link. + type: object 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 + trial_settings: + anyOf: + - $ref: >- + #/components/schemas/subscriptions_trials_resource_trial_settings + description: Settings related to subscription trials. + nullable: true + required: + - invoice_settings + - metadata title: PaymentLinksResourceSubscriptionData type: object - x-expandableFields: [] + x-expandableFields: + - invoice_settings + - trial_settings + payment_links_resource_subscription_data_invoice_settings: + description: '' + properties: + issuer: + $ref: '#/components/schemas/connect_account_reference' + required: + - issuer + title: PaymentLinksResourceSubscriptionDataInvoiceSettings + type: object + x-expandableFields: + - issuer payment_links_resource_tax_id_collection: description: '' properties: @@ -21141,6 +25070,8 @@ components: additional information about the object in a structured format. nullable: true type: object + mobilepay: + $ref: '#/components/schemas/payment_method_mobilepay' object: description: >- String representing the object's type. Objects of the same type @@ -21162,10 +25093,14 @@ components: $ref: '#/components/schemas/payment_method_promptpay' radar_options: $ref: '#/components/schemas/radar_radar_options' + revolut_pay: + $ref: '#/components/schemas/payment_method_revolut_pay' sepa_debit: $ref: '#/components/schemas/payment_method_sepa_debit' sofort: $ref: '#/components/schemas/payment_method_sofort' + swish: + $ref: '#/components/schemas/payment_method_swish' type: description: >- The type of the PaymentMethod. An additional hash is included on the @@ -21194,14 +25129,17 @@ components: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -21247,6 +25185,7 @@ components: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow @@ -21254,8 +25193,10 @@ components: - pix - promptpay - radar_options + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -21399,6 +25340,16 @@ components: maxLength: 5000 nullable: true type: string + display_brand: + description: >- + The brand to use when displaying the card, this accounts for + customer's brand choice on dual-branded cards. Can be + `american_express`, `cartes_bancaires`, `diners_club`, `discover`, + `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, + `visa`, or `other` and may contain more values in the future. + maxLength: 5000 + nullable: true + type: string exp_month: description: Two-digit number representing the card's expiration month. type: integer @@ -21840,9 +25791,8 @@ components: properties: overridable: description: >- - For child configurations, whether or not the account's preference - will be observed. If `false`, the parent configuration's preference - is used. + For child configs, whether or not the account's preference will be + observed. If `false`, the parent configuration's default is used. nullable: true type: boolean preference: @@ -21884,7 +25834,46 @@ components: x-expandableFields: - display_preference payment_method_configuration: - description: An object detailing payment method configurations. + description: >- + PaymentMethodConfigurations control which payment methods are displayed + to your customers when you don't explicitly specify payment method + types. You can have multiple configurations with different sets of + payment methods for different scenarios. + + + There are two types of PaymentMethodConfigurations. Which is used + depends on the [charge type](https://stripe.com/docs/connect/charges): + + + **Direct** configurations apply to payments created on your account, + including Connect destination charges, Connect separate charges and + transfers, and payments not involving Connect. + + + **Child** configurations apply to payments created on your connected + accounts using direct charges, and charges with the on_behalf_of + parameter. + + + Child configurations have a `parent` that sets default values and + controls which settings connected accounts may override. You can specify + a parent ID at payment time, and Stripe will automatically resolve the + connected account’s associated child configuration. Parent + configurations are [managed in the + dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) + and are not available in this API. + + + Related guides: + + - [Payment Method Configurations + API](https://stripe.com/docs/connect/payment-method-configurations) + + - [Multiple configurations on dynamic payment + methods](https://stripe.com/docs/payments/multiple-payment-method-configs) + + - [Multiple configurations for your Connect + accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations) properties: acss_debit: $ref: >- @@ -21905,7 +25894,9 @@ components: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties application: - description: The Connect application associated with this configuration. + description: >- + For child configs, the Connect application associated with the + configuration. maxLength: 5000 nullable: true type: string @@ -21933,6 +25924,9 @@ components: cashapp: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties + customer_balance: + $ref: >- + #/components/schemas/payment_method_config_resource_payment_method_properties eps: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties @@ -21952,16 +25946,13 @@ components: description: Unique identifier for the object. maxLength: 5000 type: string - id_bank_transfer: - $ref: >- - #/components/schemas/payment_method_config_resource_payment_method_properties ideal: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties is_default: description: >- - The default configuration is used whenever no payment method - configuration is specified. + The default configuration is used whenever a payment method + configuration is not specified. type: boolean jcb: $ref: >- @@ -21980,16 +25971,10 @@ components: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean - multibanco: - $ref: >- - #/components/schemas/payment_method_config_resource_payment_method_properties name: - description: Configuration name. + description: The configuration's name. maxLength: 5000 type: string - netbanking: - $ref: >- - #/components/schemas/payment_method_config_resource_payment_method_properties object: description: >- String representing the object's type. Objects of the same type @@ -22004,13 +25989,10 @@ components: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties parent: - description: The configuration's parent configuration. + description: 'For child configs, the configuration''s parent configuration.' maxLength: 5000 nullable: true type: string - pay_by_bank: - $ref: >- - #/components/schemas/payment_method_config_resource_payment_method_properties paynow: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties @@ -22020,13 +26002,13 @@ components: promptpay: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties - sepa_debit: + revolut_pay: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties - sofort: + sepa_debit: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties - upi: + sofort: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties us_bank_account: @@ -22035,6 +26017,9 @@ components: wechat_pay: $ref: >- #/components/schemas/payment_method_config_resource_payment_method_properties + zip: + $ref: >- + #/components/schemas/payment_method_config_resource_payment_method_properties required: - active - id @@ -22058,30 +26043,28 @@ components: - card - cartes_bancaires - cashapp + - customer_balance - eps - fpx - giropay - google_pay - grabpay - - id_bank_transfer - ideal - jcb - klarna - konbini - link - - multibanco - - netbanking - oxxo - p24 - - pay_by_bank - paynow - paypal - promptpay + - revolut_pay - sepa_debit - sofort - - upi - us_bank_account - wechat_pay + - zip x-resourceId: payment_method_configuration payment_method_customer_balance: description: '' @@ -22141,6 +26124,8 @@ components: $ref: '#/components/schemas/payment_method_details_konbini' link: $ref: '#/components/schemas/payment_method_details_link' + mobilepay: + $ref: '#/components/schemas/payment_method_details_mobilepay' multibanco: $ref: '#/components/schemas/payment_method_details_multibanco' oxxo: @@ -22155,12 +26140,16 @@ components: $ref: '#/components/schemas/payment_method_details_pix' promptpay: $ref: '#/components/schemas/payment_method_details_promptpay' + revolut_pay: + $ref: '#/components/schemas/payment_method_details_revolut_pay' 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' + swish: + $ref: '#/components/schemas/payment_method_details_swish' type: description: >- The type of transaction-specific details of the payment method used @@ -22212,6 +26201,7 @@ components: - klarna - konbini - link + - mobilepay - multibanco - oxxo - p24 @@ -22219,9 +26209,11 @@ components: - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort - stripe_account + - swish - us_bank_account - wechat - wechat_pay @@ -22508,6 +26500,10 @@ components: payment_method_details_card: description: '' properties: + amount_authorized: + description: The authorized amount. + nullable: true + type: integer brand: description: >- Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, @@ -22515,6 +26511,12 @@ components: maxLength: 5000 nullable: true type: string + capture_before: + description: >- + When using manual capture, a future timestamp at which the charge + will be automatically refunded if uncaptured. + format: unix-time + type: integer checks: anyOf: - $ref: '#/components/schemas/payment_method_details_card_checks' @@ -22536,6 +26538,9 @@ components: exp_year: description: Four-digit number representing the card's expiration year. type: integer + extended_authorization: + $ref: >- + #/components/schemas/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization fingerprint: description: >- Uniquely identifies this particular card number. You can use this @@ -22559,6 +26564,9 @@ components: maxLength: 5000 nullable: true type: string + incremental_authorization: + $ref: >- + #/components/schemas/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization installments: anyOf: - $ref: '#/components/schemas/payment_method_details_card_installments' @@ -22579,6 +26587,9 @@ components: maxLength: 5000 nullable: true type: string + multicapture: + $ref: >- + #/components/schemas/payment_flows_private_payment_methods_card_details_api_resource_multicapture network: description: >- Identifies which network this charge was processed on. Can be @@ -22594,6 +26605,9 @@ components: If this card has network token credentials, this contains the details of the network token credentials. nullable: true + overcapture: + $ref: >- + #/components/schemas/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture three_d_secure: anyOf: - $ref: '#/components/schemas/three_d_secure_details_charge' @@ -22613,8 +26627,12 @@ components: type: object x-expandableFields: - checks + - extended_authorization + - incremental_authorization - installments + - multicapture - network_token + - overcapture - three_d_secure - wallet payment_method_details_card_checks: @@ -22802,6 +26820,11 @@ components: maxLength: 5000 nullable: true type: string + offline: + anyOf: + - $ref: '#/components/schemas/payment_method_details_card_present_offline' + description: Details about payments collected offline. + nullable: true overcapture_supported: description: Defines whether the authorized amount can be over-captured or not type: boolean @@ -22830,7 +26853,19 @@ components: title: payment_method_details_card_present type: object x-expandableFields: + - offline - receipt + payment_method_details_card_present_offline: + description: '' + properties: + stored_at: + description: Time at which the payment was collected while offline + format: unix-time + nullable: true + type: integer + title: payment_method_details_card_present_offline + type: object + x-expandableFields: [] payment_method_details_card_present_receipt: description: '' properties: @@ -22864,7 +26899,11 @@ components: nullable: true type: string cardholder_verification_method: - description: How the cardholder verified ownership of the card. + description: >- + Describes the method used by the cardholder to verify ownership of + the card. One of the following: `approval`, `failure`, `none`, + `offline_pin`, `offline_pin_and_signature`, `online_pin`, or + `signature`. maxLength: 5000 nullable: true type: string @@ -23244,7 +27283,7 @@ components: bank: description: >- The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, - `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `rabobank`, + `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. enum: @@ -23256,6 +27295,7 @@ components: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -23277,6 +27317,7 @@ components: - INGBNL2A - KNABNL2H - MOYONL21 + - NNBANL2G - NTSBDEB1 - RABONL2U - RBRBNL21 @@ -23480,7 +27521,11 @@ components: nullable: true type: string cardholder_verification_method: - description: How the cardholder verified ownership of the card. + description: >- + Describes the method used by the cardholder to verify ownership of + the card. One of the following: `approval`, `failure`, `none`, + `offline_pin`, `offline_pin_and_signature`, `online_pin`, or + `signature`. maxLength: 5000 nullable: true type: string @@ -23584,6 +27629,17 @@ components: title: payment_method_details_link type: object x-expandableFields: [] + payment_method_details_mobilepay: + description: '' + properties: + card: + anyOf: + - $ref: '#/components/schemas/internal_card' + nullable: true + title: payment_method_details_mobilepay + type: object + x-expandableFields: + - card payment_method_details_multibanco: description: '' properties: @@ -23618,11 +27674,12 @@ components: 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`. + `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, + `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 @@ -23648,6 +27705,7 @@ components: - santander_przelew24 - tmobile_usbugi_bankowe - toyota_bank + - velobank - volkswagen_bank nullable: true type: string @@ -23749,6 +27807,12 @@ components: title: payment_method_details_promptpay type: object x-expandableFields: [] + payment_method_details_revolut_pay: + description: '' + properties: {} + title: payment_method_details_revolut_pay + type: object + x-expandableFields: [] payment_method_details_sepa_debit: description: '' properties: @@ -23782,7 +27846,11 @@ components: nullable: true type: string mandate: - description: ID of the mandate used to make this payment. + description: >- + Find the ID of the mandate used for this payment under the + [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) + property on the Charge. Use this mandate ID to [retrieve the + Mandate](https://stripe.com/docs/api/mandates/retrieve). maxLength: 5000 nullable: true type: string @@ -23880,6 +27948,30 @@ components: title: payment_method_details_stripe_account type: object x-expandableFields: [] + payment_method_details_swish: + description: '' + properties: + fingerprint: + description: >- + Uniquely identifies the payer's Swish account. You can use this + attribute to check whether two Swish transactions were paid for by + the same payer + maxLength: 5000 + nullable: true + type: string + payment_reference: + description: Payer bank reference number for the payment + maxLength: 5000 + nullable: true + type: string + verified_phone_last4: + description: The last four digits of the Swish account phone number + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_swish + type: object + x-expandableFields: [] payment_method_details_us_bank_account: description: '' properties: @@ -23914,6 +28006,20 @@ components: maxLength: 5000 nullable: true type: string + mandate: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/mandate' + description: ID of the mandate used to make this payment. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/mandate' + payment_reference: + description: Reference number to locate ACH payments with customer's bank. + maxLength: 5000 + nullable: true + type: string routing_number: description: Routing number of the bank account. maxLength: 5000 @@ -23921,7 +28027,8 @@ components: type: string title: payment_method_details_us_bank_account type: object - x-expandableFields: [] + x-expandableFields: + - mandate payment_method_details_wechat: description: '' properties: {} @@ -24175,7 +28282,7 @@ components: description: >- The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, - `n26`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, + `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. enum: - abn_amro @@ -24186,6 +28293,7 @@ components: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -24209,6 +28317,7 @@ components: - INGBNL2A - KNABNL2H - MOYONL21 + - NNBANL2G - NTSBDEB1 - RABONL2U - RBRBNL21 @@ -24346,6 +28455,12 @@ components: title: payment_method_link type: object x-expandableFields: [] + payment_method_mobilepay: + description: '' + properties: {} + title: payment_method_mobilepay + type: object + x-expandableFields: [] payment_method_options_affirm: description: '' properties: @@ -24399,12 +28514,11 @@ components: 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 + An internal identifier or reference that this payment corresponds + to. You must limit the identifier to 128 characters, and it can only + contain letters, numbers, underscores, backslashes, and dashes. - the payment. The identifier is limited to 128 characters and may - contain only letters, digits, underscores, backslashes and dashes. + This field differs from the statement descriptor and item name. maxLength: 5000 nullable: true type: string @@ -25003,6 +29117,7 @@ components: enum: - none type: string + x-stripeBypassValidation: true title: payment_method_options_klarna type: object x-expandableFields: [] @@ -25274,6 +29389,12 @@ components: title: payment_method_options_promptpay type: object x-expandableFields: [] + payment_method_options_revolut_pay: + description: '' + properties: {} + title: payment_method_options_revolut_pay + type: object + x-expandableFields: [] payment_method_options_sofort: description: '' properties: @@ -25317,6 +29438,18 @@ components: title: payment_method_options_sofort type: object x-expandableFields: [] + payment_method_options_us_bank_account_mandate_options: + description: '' + properties: + collection_method: + description: Mandate collection method + enum: + - paper + type: string + x-stripeBypassValidation: true + title: payment_method_options_us_bank_account_mandate_options + type: object + x-expandableFields: [] payment_method_options_wechat_pay: description: '' properties: @@ -25425,6 +29558,7 @@ components: - santander_przelew24 - tmobile_usbugi_bankowe - toyota_bank + - velobank - volkswagen_bank nullable: true type: string @@ -25472,6 +29606,12 @@ components: title: payment_method_promptpay type: object x-expandableFields: [] + payment_method_revolut_pay: + description: '' + properties: {} + title: payment_method_revolut_pay + type: object + x-expandableFields: [] payment_method_sepa_debit: description: '' properties: @@ -25526,6 +29666,12 @@ components: title: payment_method_sofort type: object x-expandableFields: [] + payment_method_swish: + description: '' + properties: {} + title: payment_method_swish + type: object + x-expandableFields: [] payment_method_us_bank_account: description: '' properties: @@ -25704,6 +29850,15 @@ components: enabled: description: Indicates whether automatic tax is enabled for the session type: boolean + liability: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The account that's liable for tax. If set, the business address and + tax registrations required to perform the tax calculation are loaded + from this account. The tax transaction is returned in the report of + the connected account. + nullable: true status: description: >- The status of the most recent automated tax calculation for this @@ -25718,7 +29873,8 @@ components: - enabled title: PaymentPagesCheckoutSessionAutomaticTax type: object - x-expandableFields: [] + x-expandableFields: + - liability payment_pages_checkout_session_consent: description: '' properties: @@ -25748,6 +29904,14 @@ components: payment_pages_checkout_session_consent_collection: description: '' properties: + payment_method_reuse_agreement: + anyOf: + - $ref: >- + #/components/schemas/payment_pages_checkout_session_payment_method_reuse_agreement + description: >- + If set to `hidden`, it will hide legal text related to the reuse of + a payment method. + nullable: true promotions: description: >- If set to `auto`, enables the collection of customer consent for @@ -25774,7 +29938,8 @@ components: type: string title: PaymentPagesCheckoutSessionConsentCollection type: object - x-expandableFields: [] + x-expandableFields: + - payment_method_reuse_agreement payment_pages_checkout_session_currency_conversion: description: '' properties: @@ -25810,11 +29975,8 @@ components: description: '' properties: dropdown: - anyOf: - - $ref: >- - #/components/schemas/payment_pages_checkout_session_custom_fields_dropdown - description: Configuration for `type=dropdown` fields. - nullable: true + $ref: >- + #/components/schemas/payment_pages_checkout_session_custom_fields_dropdown key: description: >- String of your choice that your integration can use to reconcile @@ -25826,22 +29988,16 @@ components: $ref: >- #/components/schemas/payment_pages_checkout_session_custom_fields_label numeric: - anyOf: - - $ref: >- - #/components/schemas/payment_pages_checkout_session_custom_fields_numeric - description: Configuration for `type=numeric` fields. - nullable: true + $ref: >- + #/components/schemas/payment_pages_checkout_session_custom_fields_numeric optional: description: >- Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. type: boolean text: - anyOf: - - $ref: >- - #/components/schemas/payment_pages_checkout_session_custom_fields_text - description: Configuration for `type=text` fields. - nullable: true + $ref: >- + #/components/schemas/payment_pages_checkout_session_custom_fields_text type: description: The type of the field. enum: @@ -25969,6 +30125,14 @@ components: payment_pages_checkout_session_custom_text: description: '' properties: + after_submit: + anyOf: + - $ref: >- + #/components/schemas/payment_pages_checkout_session_custom_text_position + description: >- + Custom text that should be displayed after the payment confirmation + button. + nullable: true shipping_address: anyOf: - $ref: >- @@ -25996,6 +30160,7 @@ components: title: PaymentPagesCheckoutSessionCustomText type: object x-expandableFields: + - after_submit - shipping_address - submit - terms_of_service_acceptance @@ -26117,6 +30282,14 @@ components: maxLength: 5000 nullable: true type: string + issuer: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The connected account that issues the invoice. The invoice is + presented with the branding and support information of the specified + account. + nullable: true metadata: additionalProperties: maxLength: 500 @@ -26137,7 +30310,29 @@ components: x-expandableFields: - account_tax_ids - custom_fields + - issuer - rendering_options + payment_pages_checkout_session_payment_method_reuse_agreement: + description: '' + properties: + position: + description: >- + Determines the position and visibility of the payment method reuse + agreement in the UI. When set to `auto`, Stripe's defaults will be + used. + + + When set to `hidden`, the payment method reuse agreement text will + always be hidden in the UI. + enum: + - auto + - hidden + type: string + required: + - position + title: PaymentPagesCheckoutSessionPaymentMethodReuseAgreement + type: object + x-expandableFields: [] payment_pages_checkout_session_phone_number_collection: description: '' properties: @@ -26474,10 +30669,10 @@ components: `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `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`, `jp_trn`, `li_uid`, `my_itn`, - `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, + `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `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`, `jp_trn`, `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`, `ke_pin`, `tr_tin`, @@ -26528,6 +30723,7 @@ components: - my_itn - my_sst - no_vat + - no_voec - nz_gst - pe_ruc - ph_tin @@ -26933,6 +31129,8 @@ components: description: The account the person is associated with. maxLength: 5000 type: string + additional_tos_acceptances: + $ref: '#/components/schemas/person_additional_tos_acceptances' address: $ref: '#/components/schemas/address' address_kana: @@ -27080,6 +31278,7 @@ components: title: Person type: object x-expandableFields: + - additional_tos_acceptances - address - address_kana - address_kanji @@ -27090,6 +31289,44 @@ components: - requirements - verification x-resourceId: person + person_additional_tos_acceptance: + description: '' + properties: + date: + description: >- + The Unix timestamp marking when the legal guardian accepted the + service agreement. + format: unix-time + nullable: true + type: integer + ip: + description: >- + The IP address from which the legal guardian accepted the service + agreement. + maxLength: 5000 + nullable: true + type: string + user_agent: + description: >- + The user agent of the browser from which the legal guardian accepted + the service agreement. + maxLength: 5000 + nullable: true + type: string + title: PersonAdditionalTOSAcceptance + type: object + x-expandableFields: [] + person_additional_tos_acceptances: + description: '' + properties: + account: + $ref: '#/components/schemas/person_additional_tos_acceptance' + required: + - account + title: PersonAdditionalTOSAcceptances + type: object + x-expandableFields: + - account person_future_requirements: description: '' properties: @@ -27179,6 +31416,12 @@ components: manage, or direct the organization. nullable: true type: boolean + legal_guardian: + description: >- + Whether the person is the legal guardian of the account's + representative. + nullable: true + type: boolean owner: description: Whether the person is an owner of the account’s legal entity. nullable: true @@ -27391,6 +31634,11 @@ components: additional information about the object in a structured format. nullable: true type: object + meter: + description: The meter tracking the usage of a metered price + maxLength: 5000 + nullable: true + type: string nickname: description: 'A brief description of the plan, hidden from customers.' maxLength: 5000 @@ -27602,8 +31850,6 @@ components: $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: @@ -27611,7 +31857,6 @@ components: - invoice_history - payment_method_update - subscription_cancel - - subscription_pause - subscription_update title: PortalFeatures type: object @@ -27620,7 +31865,6 @@ components: - invoice_history - payment_method_update - subscription_cancel - - subscription_pause - subscription_update portal_flows_after_completion_hosted_confirmation: description: '' @@ -27841,7 +32085,7 @@ components: description: >- The price the customer should subscribe to through this flow. The price must also be included in the configuration's - [`features.subscription_update.products`](docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). maxLength: 5000 nullable: true type: string @@ -27961,17 +32205,6 @@ components: 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: @@ -27991,7 +32224,7 @@ components: description: Whether the feature is enabled. type: boolean products: - description: The list of products that support subscription updates. + description: The list of up to 10 products that support subscription updates. items: $ref: '#/components/schemas/portal_subscription_update_product' nullable: true @@ -28000,7 +32233,8 @@ components: description: >- Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and - `always_invoice`. + `always_invoice`. Defaults to a value of `none` if you don't set it + during creation. enum: - always_invoice - create_prorations @@ -28329,11 +32563,11 @@ components: type: string features: description: >- - A list of up to 15 features for this product. These are displayed in - [pricing + A list of up to 15 marketing features for this product. These are + displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). items: - $ref: '#/components/schemas/product_feature' + $ref: '#/components/schemas/product_marketing_feature' type: array id: description: Unique identifier for the object. @@ -28437,16 +32671,14 @@ components: - package_dimensions - tax_code x-resourceId: product - product_feature: + product_marketing_feature: description: '' properties: name: - description: The feature's name. Up to 80 characters long. + description: The marketing feature name. Up to 80 characters long. maxLength: 5000 type: string - required: - - name - title: ProductFeature + title: ProductMarketingFeature type: object x-expandableFields: [] promotion_code: @@ -28750,10 +32982,7 @@ components: - $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 + $ref: '#/components/schemas/invoice_setting_quote_setting' line_items: description: A list of items the customer is being quoted for. properties: @@ -28895,6 +33124,7 @@ components: - discounts - expires_at - id + - invoice_settings - livemode - metadata - object @@ -28930,6 +33160,15 @@ components: enabled: description: Automatically calculate taxes type: boolean + liability: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The account that's liable for tax. If set, the business address and + tax registrations required to perform the tax calculation are loaded + from this account. The tax transaction is returned in the report of + the connected account. + nullable: true status: description: >- The status of the most recent automated tax calculation for this @@ -28944,7 +33183,8 @@ components: - enabled title: QuotesResourceAutomaticTax type: object - x-expandableFields: [] + x-expandableFields: + - liability quotes_resource_computed: description: '' properties: @@ -29059,7 +33299,8 @@ components: description: >- The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the - subscription. + subscription for rendering in Stripe surfaces and certain local + payment methods UIs. maxLength: 5000 nullable: true type: string @@ -29072,6 +33313,22 @@ components: format: unix-time nullable: true type: integer + metadata: + additionalProperties: + maxLength: 500 + type: string + description: >- + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that + will set metadata on the subscription or subscription schedule when + the quote is accepted. If a recurring price is included in + `line_items`, this field will be passed to the resulting + subscription's `metadata` field. If + `subscription_data.effective_date` is used, this field will be + passed to the resulting subscription schedule's `phases.metadata` + field. Unlike object-level metadata, this field is declarative. + Updates will clear prior values. + nullable: true + type: object trial_period_days: description: >- Integer representing the number of trial period days before the @@ -29576,12 +33833,7 @@ components: 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`. + `usage_type=metered`. Defaults to `sum`. enum: - last_during_period - last_ever @@ -29605,6 +33857,11 @@ components: between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. type: integer + meter: + description: The meter tracking the usage of a metered price + maxLength: 5000 + nullable: true + type: string usage_type: description: >- Configures how the quantity per period should be determined. Can be @@ -29625,13 +33882,12 @@ components: x-expandableFields: [] refund: description: >- - `Refund` objects allow you to refund a charge that has previously been - created + Refund objects allow you to refund a previously created charge that + isn't - but not yet refunded. Funds will be refunded to the credit or debit card - that + refunded yet. Funds are refunded to the credit or debit card that's - was originally charged. + initially charged. Related guide: [Refunds](https://stripe.com/docs/refunds) @@ -29656,7 +33912,7 @@ components: - maxLength: 5000 type: string - $ref: '#/components/schemas/charge' - description: ID of the charge that was refunded. + description: ID of the charge that's refunded. nullable: true x-expansionResources: oneOf: @@ -29676,17 +33932,19 @@ components: type: string description: description: >- - An arbitrary string attached to the object. Often useful for - displaying to users. (Available on non-card refunds only) + An arbitrary string attached to the object. You can use this for + displaying to users (available on non-card refunds only). maxLength: 5000 type: string + destination_details: + $ref: '#/components/schemas/refund_destination_details' failure_balance_transaction: anyOf: - maxLength: 5000 type: string - $ref: '#/components/schemas/balance_transaction' description: >- - If the refund failed, this balance transaction describes the + After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. x-expansionResources: @@ -29694,10 +33952,10 @@ components: - $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`, `charge_for_pending_refund_disputed`, - `insufficient_funds`, `declined`, `merchant_request` or `unknown`. + Provides the reason for the refund failure. Possible values are: + `lost_or_stolen_card`, `expired_or_canceled_card`, + `charge_for_pending_refund_disputed`, `insufficient_funds`, + `declined`, `merchant_request`, or `unknown`. maxLength: 5000 type: string id: @@ -29706,8 +33964,9 @@ components: type: string instructions_email: description: >- - For payment methods without native refund support (e.g., Konbini, - PromptPay), email for the customer to receive refund instructions. + For payment methods without native refund support (for example, + Konbini, PromptPay), provide an email address for the customer to + receive refund instructions. maxLength: 5000 type: string metadata: @@ -29734,14 +33993,14 @@ components: - maxLength: 5000 type: string - $ref: '#/components/schemas/payment_intent' - description: ID of the PaymentIntent that was refunded. + description: ID of the PaymentIntent that's refunded. nullable: true x-expansionResources: oneOf: - $ref: '#/components/schemas/payment_intent' reason: description: >- - Reason for the refund, either user-provided (`duplicate`, + Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). enum: @@ -29765,21 +34024,17 @@ components: 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. + The transfer reversal that's associated with the refund. Only + present if the charge came from another Stripe account. 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`, `requires_action`, `succeeded`, `failed`, or - `canceled`. Refer to our - [refunds](https://stripe.com/docs/refunds#failed-refunds) - documentation for more details. + Status of the refund. This can be `pending`, `requires_action`, + `succeeded`, `failed`, or `canceled`. Learn more about [failed + refunds](https://stripe.com/docs/refunds#failed-refunds). maxLength: 5000 nullable: true type: string @@ -29789,9 +34044,9 @@ components: 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. + This refers to the transfer reversal object if the accompanying + transfer reverses. This is only applicable if the charge was created + using the destination parameter. nullable: true x-expansionResources: oneOf: @@ -29807,12 +34062,160 @@ components: x-expandableFields: - balance_transaction - charge + - destination_details - failure_balance_transaction - next_action - payment_intent - source_transfer_reversal - transfer_reversal x-resourceId: refund + refund_destination_details: + description: '' + properties: + affirm: + $ref: '#/components/schemas/destination_details_unimplemented' + afterpay_clearpay: + $ref: '#/components/schemas/destination_details_unimplemented' + alipay: + $ref: '#/components/schemas/destination_details_unimplemented' + au_bank_transfer: + $ref: '#/components/schemas/destination_details_unimplemented' + blik: + $ref: '#/components/schemas/refund_destination_details_generic' + br_bank_transfer: + $ref: '#/components/schemas/refund_destination_details_generic' + card: + $ref: '#/components/schemas/refund_destination_details_card' + cashapp: + $ref: '#/components/schemas/destination_details_unimplemented' + customer_cash_balance: + $ref: '#/components/schemas/destination_details_unimplemented' + eps: + $ref: '#/components/schemas/destination_details_unimplemented' + eu_bank_transfer: + $ref: '#/components/schemas/refund_destination_details_generic' + gb_bank_transfer: + $ref: '#/components/schemas/refund_destination_details_generic' + giropay: + $ref: '#/components/schemas/destination_details_unimplemented' + grabpay: + $ref: '#/components/schemas/destination_details_unimplemented' + jp_bank_transfer: + $ref: '#/components/schemas/refund_destination_details_generic' + klarna: + $ref: '#/components/schemas/destination_details_unimplemented' + mx_bank_transfer: + $ref: '#/components/schemas/refund_destination_details_generic' + p24: + $ref: '#/components/schemas/refund_destination_details_generic' + paynow: + $ref: '#/components/schemas/destination_details_unimplemented' + paypal: + $ref: '#/components/schemas/destination_details_unimplemented' + pix: + $ref: '#/components/schemas/destination_details_unimplemented' + revolut: + $ref: '#/components/schemas/destination_details_unimplemented' + sofort: + $ref: '#/components/schemas/destination_details_unimplemented' + swish: + $ref: '#/components/schemas/refund_destination_details_generic' + th_bank_transfer: + $ref: '#/components/schemas/refund_destination_details_generic' + type: + description: >- + The type of transaction-specific details of the payment method used + in the refund (e.g., `card`). An additional hash is included on + `destination_details` with a name matching this value. It contains + information specific to the refund transaction. + maxLength: 5000 + type: string + us_bank_transfer: + $ref: '#/components/schemas/refund_destination_details_generic' + wechat_pay: + $ref: '#/components/schemas/destination_details_unimplemented' + zip: + $ref: '#/components/schemas/destination_details_unimplemented' + required: + - type + title: refund_destination_details + type: object + x-expandableFields: + - affirm + - afterpay_clearpay + - alipay + - au_bank_transfer + - blik + - br_bank_transfer + - card + - cashapp + - customer_cash_balance + - eps + - eu_bank_transfer + - gb_bank_transfer + - giropay + - grabpay + - jp_bank_transfer + - klarna + - mx_bank_transfer + - p24 + - paynow + - paypal + - pix + - revolut + - sofort + - swish + - th_bank_transfer + - us_bank_transfer + - wechat_pay + - zip + refund_destination_details_card: + description: '' + properties: + reference: + description: Value of the reference number assigned to the refund. + maxLength: 5000 + type: string + reference_status: + description: >- + Status of the reference number on the refund. This can be `pending`, + `available` or `unavailable`. + maxLength: 5000 + type: string + reference_type: + description: Type of the reference number assigned to the refund. + maxLength: 5000 + type: string + type: + description: 'The type of refund. This can be `refund`, `reversal`, or `pending`.' + enum: + - pending + - refund + - reversal + type: string + required: + - type + title: refund_destination_details_card + type: object + x-expandableFields: [] + refund_destination_details_generic: + description: '' + properties: + reference: + description: The reference assigned to the refund. + maxLength: 5000 + nullable: true + type: string + reference_status: + description: >- + Status of the reference on the refund. This can be `pending`, + `available` or `unavailable`. + maxLength: 5000 + nullable: true + type: string + title: refund_destination_details_generic + type: object + x-expandableFields: [] refund_next_action: description: '' properties: @@ -30312,11 +34715,21 @@ components: Whether Stripe automatically computes tax on invoices created during this phase. type: boolean + liability: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The account that's liable for tax. If set, the business address and + tax registrations required to perform the tax calculation are loaded + from this account. The tax transaction is returned in the report of + the connected account. + nullable: true required: - enabled title: SchedulesPhaseAutomaticTax type: object - x-expandableFields: [] + x-expandableFields: + - liability secret_service_resource_scope: description: '' properties: @@ -30702,7 +35115,8 @@ components: type: string checks: anyOf: - - $ref: '#/components/schemas/payment_method_details_card_checks' + - $ref: >- + #/components/schemas/setup_attempt_payment_method_details_card_checks description: >- Check results by Card networks on Card address and CVC at the time of authorization @@ -30778,6 +35192,33 @@ components: - checks - three_d_secure - wallet + setup_attempt_payment_method_details_card_checks: + 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 + type: string + title: setup_attempt_payment_method_details_card_checks + type: object + x-expandableFields: [] setup_attempt_payment_method_details_card_present: description: '' properties: @@ -30793,10 +35234,16 @@ components: x-expansionResources: oneOf: - $ref: '#/components/schemas/payment_method' + offline: + anyOf: + - $ref: '#/components/schemas/payment_method_details_card_present_offline' + description: Details about payments collected offline. + nullable: true title: setup_attempt_payment_method_details_card_present type: object x-expandableFields: - generated_card + - offline setup_attempt_payment_method_details_card_wallet: description: '' properties: @@ -30834,7 +35281,7 @@ components: bank: description: >- The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, - `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `rabobank`, + `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. enum: @@ -30846,6 +35293,7 @@ components: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -30867,6 +35315,7 @@ components: - INGBNL2A - KNABNL2H - MOYONL21 + - NNBANL2G - NTSBDEB1 - RABONL2U - RBRBNL21 @@ -31030,7 +35479,7 @@ components: 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 + For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. Later, you can use @@ -31038,13 +35487,13 @@ components: the payment flow. - Create a SetupIntent as soon as you're ready to collect your customer's + Create a SetupIntent when you're ready to collect your customer's payment credentials. - Do not maintain long-lived, unconfirmed SetupIntents as they may no - longer be valid. + Don't maintain long-lived, unconfirmed SetupIntents because they might + not be valid. - The SetupIntent then transitions through multiple + The SetupIntent transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides @@ -31055,35 +35504,32 @@ components: for future payments. For example, cardholders in [certain - regions](/guides/strong-customer-authentication) may need to be run + regions](/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) - at the time of payment method collection + during payment method collection - in order to streamline later [off-session + to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). - If the SetupIntent is used with a + If you use the SetupIntent 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. + it automatically attaches the resulting payment method to that Customer + after successful setup. 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. - + PaymentIntents to save payment methods 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. + By using SetupIntents, you can reduce friction for your customers, even + as regulations change over time. Related guide: [Setup Intents @@ -31279,7 +35725,7 @@ components: payment_method_options: anyOf: - $ref: '#/components/schemas/setup_intent_payment_method_options' - description: Payment-method-specific configuration for this SetupIntent. + description: Payment method-specific configuration for this SetupIntent. nullable: true payment_method_types: description: >- @@ -31439,6 +35885,12 @@ components: #/components/schemas/setup_intent_type_specific_payment_method_options_client card: $ref: '#/components/schemas/setup_intent_payment_method_options_card' + card_present: + anyOf: + - $ref: >- + #/components/schemas/setup_intent_payment_method_options_card_present + - $ref: >- + #/components/schemas/setup_intent_type_specific_payment_method_options_client link: anyOf: - $ref: '#/components/schemas/setup_intent_payment_method_options_link' @@ -31466,6 +35918,7 @@ components: x-expandableFields: - acss_debit - card + - card_present - link - paypal - sepa_debit @@ -31532,18 +35985,18 @@ components: 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) + own fraud engine, provide this option. If not provided, this value + defaults to `automatic`. Read our guide on [manually requesting 3D + Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. enum: - any - automatic - - challenge_only + - challenge nullable: true type: string + x-stripeBypassValidation: true title: setup_intent_payment_method_options_card type: object x-expandableFields: @@ -31636,6 +36089,12 @@ components: title: setup_intent_payment_method_options_card_mandate_options type: object x-expandableFields: [] + setup_intent_payment_method_options_card_present: + description: '' + properties: {} + title: setup_intent_payment_method_options_card_present + type: object + x-expandableFields: [] setup_intent_payment_method_options_link: description: '' properties: {} @@ -31719,6 +36178,9 @@ components: properties: financial_connections: $ref: '#/components/schemas/linked_account_options_us_bank_account' + mandate_options: + $ref: >- + #/components/schemas/payment_method_options_us_bank_account_mandate_options verification_method: description: Bank account verification method. enum: @@ -31731,6 +36193,7 @@ components: type: object x-expandableFields: - financial_connections + - mandate_options setup_intent_type_specific_payment_method_options_client: description: '' properties: @@ -33305,11 +37768,19 @@ components: $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. + The reference point that aligns future [billing + cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. + It sets the day of week for `week` intervals, the day of month for + `month` and `year` intervals, and the month of year for `year` + intervals. The timestamp is in UTC format. format: unix-time type: integer + billing_cycle_anchor_config: + anyOf: + - $ref: >- + #/components/schemas/subscriptions_resource_billing_cycle_anchor_config + description: The fixed values used to calculate the `billing_cycle_anchor`. + nullable: true billing_thresholds: anyOf: - $ref: '#/components/schemas/subscription_billing_thresholds' @@ -33454,7 +37925,8 @@ components: 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. + subscription for rendering in Stripe surfaces and certain local + payment methods UIs. maxLength: 500 nullable: true type: string @@ -33464,8 +37936,24 @@ components: 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. + overrides a discount applied on a customer-wide basis. This field + has been deprecated and will be removed in a future API version. Use + `discounts` instead. nullable: true + discounts: + description: >- + The discounts applied to the subscription. Subscription item + discounts are applied before subscription discounts. Use + `expand[]=discounts` to expand each discount. + items: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/discount' + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/discount' + type: array ended_at: description: 'If the subscription has ended, the date the subscription ended.' format: unix-time @@ -33565,7 +38053,9 @@ components: - $ref: '#/components/schemas/subscriptions_resource_pause_collection' description: >- If specified, payment collection for this subscription will be - paused. + paused. Note that the subscription status will be unchanged and will + not be updated to `paused`. Learn more about [pausing + collection](/billing/subscriptions/pause-payment). nullable: true payment_settings: anyOf: @@ -33625,23 +38115,33 @@ components: status: description: >- Possible values are `incomplete`, `incomplete_expired`, `trialing`, - `active`, `past_due`, `canceled`, or `unpaid`. + `active`, `past_due`, `canceled`, `unpaid`, or `paused`. For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A - subscription in this state can only have metadata and default_source - updated. Once the first invoice is paid, the subscription moves into - an `active` state. If the first invoice is not paid within 23 hours, - the subscription transitions to `incomplete_expired`. This is a - terminal state, the open invoice will be voided and no further - invoices will be generated. + subscription in this status can only have metadata and + default_source updated. Once the first invoice is paid, the + subscription moves into an `active` status. If the first invoice is + not paid within 23 hours, the subscription transitions to + `incomplete_expired`. This is a terminal status, the open invoice + will be voided and no further invoices will be generated. A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + A subscription can only enter a `paused` status [when a trial ends + without a payment + method](/billing/subscriptions/trials#create-free-trials-without-payment). + A `paused` subscription doesn't generate invoices and can be resumed + after your customer adds their payment method. The `paused` status + is different from [pausing + collection](/billing/subscriptions/pause-payment), which still + generates invoices and leaves the subscription's status unchanged. + + If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has @@ -33711,6 +38211,7 @@ components: - current_period_end - current_period_start - customer + - discounts - id - items - livemode @@ -33723,6 +38224,7 @@ components: x-expandableFields: - application - automatic_tax + - billing_cycle_anchor_config - billing_thresholds - cancellation_details - customer @@ -33730,6 +38232,7 @@ components: - default_source - default_tax_rates - discount + - discounts - items - latest_invoice - on_behalf_of @@ -33749,11 +38252,21 @@ components: enabled: description: Whether Stripe automatically computes tax on this subscription. type: boolean + liability: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The account that's liable for tax. If set, the business address and + tax registrations required to perform the tax calculation are loaded + from this account. The tax transaction is returned in the report of + the connected account. + nullable: true required: - enabled title: SubscriptionAutomaticTax type: object - x-expandableFields: [] + x-expandableFields: + - liability subscription_billing_thresholds: description: '' properties: @@ -33784,10 +38297,11 @@ components: maxLength: 500 type: string description: >- - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that - will reflect the metadata of the subscription at the time of invoice - creation. *Note: This attribute is populated only for invoices - created on or after June 29, 2023.* + Set of [key-value pairs](https://stripe.com/docs/api/metadata) + defined as subscription metadata when an invoice is created. Becomes + an immutable snapshot of the subscription metadata at the time of + invoice finalization. + *Note: This attribute is populated only for invoices created on or after June 29, 2023.* nullable: true type: object title: SubscriptionDetailsData @@ -33812,6 +38326,20 @@ components: Time at which the object was created. Measured in seconds since the Unix epoch. type: integer + discounts: + description: >- + The discounts applied to the subscription item. Subscription item + discounts are applied before subscription discounts. Use + `expand[]=discounts` to expand each discount. + items: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/discount' + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/discount' + type: array id: description: Unique identifier for the object. maxLength: 5000 @@ -33854,6 +38382,7 @@ components: type: array required: - created + - discounts - id - metadata - object @@ -33863,6 +38392,7 @@ components: type: object x-expandableFields: - billing_thresholds + - discounts - price - tax_rates x-resourceId: subscription_item @@ -33909,12 +38439,13 @@ components: 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) + Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. enum: - any - automatic + - challenge nullable: true type: string title: subscription_payment_method_options_card @@ -34014,7 +38545,7 @@ components: Behavior of the subscription schedule and underlying subscription 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 + schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. enum: @@ -34127,6 +38658,11 @@ components: An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase. properties: + discounts: + description: The stackable discounts that will be applied to the item. + items: + $ref: '#/components/schemas/discounts_resource_stackable_discount' + type: array price: anyOf: - maxLength: 5000 @@ -34151,10 +38687,12 @@ components: nullable: true type: array required: + - discounts - price title: SubscriptionScheduleAddInvoiceItem type: object x-expandableFields: + - discounts - price - tax_rates subscription_schedule_configuration_item: @@ -34167,6 +38705,14 @@ components: Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period nullable: true + discounts: + description: >- + The discounts applied to the subscription item. Subscription item + discounts are applied before subscription discounts. Use + `expand[]=discounts` to expand each discount. + items: + $ref: '#/components/schemas/discounts_resource_stackable_discount' + type: array metadata: additionalProperties: maxLength: 500 @@ -34200,11 +38746,13 @@ components: nullable: true type: array required: + - discounts - price title: SubscriptionScheduleConfigurationItem type: object x-expandableFields: - billing_thresholds + - discounts - price - tax_rates subscription_schedule_current_phase: @@ -34326,10 +38874,19 @@ components: description: >- Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the - subscription. + subscription for rendering in Stripe surfaces and certain local + payment methods UIs. maxLength: 5000 nullable: true type: string + discounts: + description: >- + The stackable discounts that will be applied to the subscription on + this phase. Subscription item discounts are applied before + subscription discounts. + items: + $ref: '#/components/schemas/discounts_resource_stackable_discount' + type: array end_date: description: The end of this phase of the subscription schedule. format: unix-time @@ -34401,6 +38958,7 @@ components: required: - add_invoice_items - currency + - discounts - end_date - items - proration_behavior @@ -34414,6 +38972,7 @@ components: - coupon - default_payment_method - default_tax_rates + - discounts - invoice_settings - items - on_behalf_of @@ -34481,16 +39040,13 @@ components: description: >- Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the - subscription. + subscription for rendering in Stripe surfaces and certain local + payment methods UIs. 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 + $ref: '#/components/schemas/invoice_setting_subscription_schedule_setting' on_behalf_of: anyOf: - maxLength: 5000 @@ -34514,6 +39070,7 @@ components: nullable: true required: - billing_cycle_anchor + - invoice_settings title: SubscriptionSchedulesResourceDefaultSettings type: object x-expandableFields: @@ -34531,11 +39088,21 @@ components: Whether Stripe automatically computes tax on invoices created during this phase. type: boolean + liability: + anyOf: + - $ref: '#/components/schemas/connect_account_reference' + description: >- + The account that's liable for tax. If set, the business address and + tax registrations required to perform the tax calculation are loaded + from this account. The tax transaction is returned in the report of + the connected account. + nullable: true required: - enabled title: SubscriptionSchedulesResourceDefaultSettingsAutomaticTax type: object - x-expandableFields: [] + x-expandableFields: + - liability subscription_transfer_data: description: '' properties: @@ -34564,6 +39131,33 @@ components: type: object x-expandableFields: - destination + subscriptions_resource_billing_cycle_anchor_config: + description: '' + properties: + day_of_month: + description: The day of the month of the billing_cycle_anchor. + type: integer + hour: + description: The hour of the day of the billing_cycle_anchor. + nullable: true + type: integer + minute: + description: The minute of the hour of the billing_cycle_anchor. + nullable: true + type: integer + month: + description: The month to start full cycle billing periods. + nullable: true + type: integer + second: + description: The second of the minute of the billing_cycle_anchor. + nullable: true + type: integer + required: + - day_of_month + title: SubscriptionsResourceBillingCycleAnchorConfig + type: object + x-expandableFields: [] subscriptions_resource_pause_collection: description: >- The Pause Collection settings determine how we will pause collection for @@ -34632,6 +39226,13 @@ components: This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. nullable: true + sepa_debit: + anyOf: + - $ref: '#/components/schemas/invoice_payment_method_options_sepa_debit' + description: >- + This sub-hash contains details about the SEPA Direct Debit payment + method options to pass to invoices created by the subscription. + nullable: true us_bank_account: anyOf: - $ref: >- @@ -34648,6 +39249,7 @@ components: - card - customer_balance - konbini + - sepa_debit - us_bank_account subscriptions_resource_payment_settings: description: '' @@ -34680,12 +39282,14 @@ components: - card - cashapp - customer_balance + - eps - fpx - giropay - grabpay - ideal - konbini - link + - p24 - paynow - paypal - promptpay @@ -34925,12 +39529,15 @@ components: properties: amount: description: >- - The line item amount in integer cents. If `tax_behavior=inclusive`, - then this amount includes taxes. Otherwise, taxes were calculated on - top of this amount. + The line item amount in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). If + `tax_behavior=inclusive`, then this amount includes taxes. + Otherwise, taxes were calculated on top of this amount. type: integer amount_tax: - description: 'The amount of tax calculated for this line item, in integer cents.' + description: >- + The amount of tax calculated for this line item, in the [smallest + currency unit](https://stripe.com/docs/currencies#zero-decimal). type: integer id: description: Unique identifier for the object. @@ -34999,6 +39606,90 @@ components: x-expandableFields: - tax_breakdown x-resourceId: tax.calculation_line_item + tax.registration: + description: >- + A Tax `Registration` lets us know that your business is registered to + collect tax on payments within a region, enabling you to [automatically + collect tax](https://stripe.com/docs/tax). + + + Stripe doesn't register on your behalf with the relevant authorities + when you create a Tax `Registration` object. For more information on how + to register to collect tax, see [our + guide](https://stripe.com/docs/tax/registering). + + + Related guide: [Using the Registrations + API](https://stripe.com/docs/tax/registrations-api) + properties: + active_from: + description: >- + Time at which the registration becomes active. Measured in seconds + since the Unix epoch. + format: unix-time + type: integer + 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 + country_options: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options + created: + description: >- + Time at which the object was created. Measured in seconds since the + Unix epoch. + format: unix-time + type: integer + expires_at: + description: >- + If set, the registration stops being active at this time. If not + set, the registration will be active indefinitely. Measured in + seconds since the Unix epoch. + 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 + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - tax.registration + type: string + status: + description: >- + The status of the registration. This field is present for + convenience and can be deduced from `active_from` and `expires_at`. + enum: + - active + - expired + - scheduled + type: string + required: + - active_from + - country + - country_options + - created + - id + - livemode + - object + - status + title: TaxProductRegistrationsResourceTaxRegistration + type: object + x-expandableFields: + - country_options + x-resourceId: tax.registration tax.settings: description: >- You can use Tax `Settings` to manage configurations used by Stripe Tax @@ -35198,12 +39889,15 @@ components: properties: amount: description: >- - The line item amount in integer cents. If `tax_behavior=inclusive`, - then this amount includes taxes. Otherwise, taxes were calculated on - top of this amount. + The line item amount in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). If + `tax_behavior=inclusive`, then this amount includes taxes. + Otherwise, taxes were calculated on top of this amount. type: integer amount_tax: - description: 'The amount of tax calculated for this line item, in integer cents.' + description: >- + The amount of tax calculated for this line item, in the [smallest + currency unit](https://stripe.com/docs/currencies#zero-decimal). type: integer id: description: Unique identifier for the object. @@ -35363,6 +40057,54 @@ components: title: TaxDeductedAtSource type: object x-expandableFields: [] + tax_i_ds_owner: + description: '' + properties: + account: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/account' + description: The account being referenced when `type` is `account`. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/account' + application: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/application' + description: >- + The Connect Application being referenced when `type` is + `application`. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/application' + customer: + anyOf: + - maxLength: 5000 + type: string + - $ref: '#/components/schemas/customer' + description: The customer being referenced when `type` is `customer`. + x-expansionResources: + oneOf: + - $ref: '#/components/schemas/customer' + type: + description: Type of owner referenced. + enum: + - account + - application + - customer + - self + type: string + required: + - type + title: TaxIDsOwner + type: object + x-expandableFields: + - account + - application + - customer tax_id: description: >- You can add one or multiple tax IDs to a @@ -35413,6 +40155,11 @@ components: enum: - tax_id type: string + owner: + anyOf: + - $ref: '#/components/schemas/tax_i_ds_owner' + description: The account or customer the tax ID belongs to. + nullable: true type: description: >- Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, @@ -35422,12 +40169,12 @@ components: `ec_ruc`, `eg_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`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, - `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, - `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, - `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, - `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, - `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type - `unknown` + `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, + `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, + `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, + `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, + `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have + type `unknown` enum: - ad_nrt - ae_trn @@ -35474,6 +40221,7 @@ components: - my_itn - my_sst - no_vat + - no_voec - nz_gst - pe_ruc - ph_tin @@ -35517,6 +40265,7 @@ components: type: object x-expandableFields: - customer + - owner - verification x-resourceId: tax_id tax_id_verification: @@ -35547,6 +40296,363 @@ components: title: tax_id_verification type: object x-expandableFields: [] + tax_product_registrations_resource_country_options: + description: '' + properties: + ae: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + at: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + au: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + be: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + bg: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + ca: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_canada + ch: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + cl: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + co: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + cy: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + cz: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + de: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + dk: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + ee: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + es: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + fi: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + fr: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + gb: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + gr: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + hr: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + hu: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + id: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + ie: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + is: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + it: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + jp: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + kr: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + lt: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + lu: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + lv: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + mt: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + mx: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + my: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + nl: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + 'no': + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + nz: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + pl: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + pt: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + ro: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + sa: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + se: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + sg: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + si: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + sk: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_europe + th: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + tr: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + us: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_united_states + vn: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_simplified + za: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_default + title: TaxProductRegistrationsResourceCountryOptions + type: object + x-expandableFields: + - ae + - at + - au + - be + - bg + - ca + - ch + - cl + - co + - cy + - cz + - de + - dk + - ee + - es + - fi + - fr + - gb + - gr + - hr + - hu + - id + - ie + - is + - it + - jp + - kr + - lt + - lu + - lv + - mt + - mx + - my + - nl + - 'no' + - nz + - pl + - pt + - ro + - sa + - se + - sg + - si + - sk + - th + - tr + - us + - vn + - za + tax_product_registrations_resource_country_options_ca_province_standard: + description: '' + properties: + province: + description: >- + Two-letter CA province code ([ISO + 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + maxLength: 5000 + type: string + required: + - province + title: TaxProductRegistrationsResourceCountryOptionsCaProvinceStandard + type: object + x-expandableFields: [] + tax_product_registrations_resource_country_options_canada: + description: '' + properties: + province_standard: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_ca_province_standard + type: + description: Type of registration in Canada. + enum: + - province_standard + - simplified + - standard + type: string + required: + - type + title: TaxProductRegistrationsResourceCountryOptionsCanada + type: object + x-expandableFields: + - province_standard + tax_product_registrations_resource_country_options_default: + description: '' + properties: + type: + description: Type of registration in `country`. + enum: + - standard + type: string + required: + - type + title: TaxProductRegistrationsResourceCountryOptionsDefault + type: object + x-expandableFields: [] + tax_product_registrations_resource_country_options_eu_standard: + description: '' + properties: + place_of_supply_scheme: + description: Place of supply scheme used in an EU standard registration. + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: TaxProductRegistrationsResourceCountryOptionsEuStandard + type: object + x-expandableFields: [] + tax_product_registrations_resource_country_options_europe: + description: '' + properties: + standard: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_eu_standard + type: + description: Type of registration in an EU country. + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: TaxProductRegistrationsResourceCountryOptionsEurope + type: object + x-expandableFields: + - standard + tax_product_registrations_resource_country_options_simplified: + description: '' + properties: + type: + description: Type of registration in `country`. + enum: + - simplified + type: string + required: + - type + title: TaxProductRegistrationsResourceCountryOptionsSimplified + type: object + x-expandableFields: [] + tax_product_registrations_resource_country_options_united_states: + description: '' + properties: + local_amusement_tax: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_us_local_amusement_tax + local_lease_tax: + $ref: >- + #/components/schemas/tax_product_registrations_resource_country_options_us_local_lease_tax + state: + description: >- + Two-letter US state code ([ISO + 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + maxLength: 5000 + type: string + type: + description: Type of registration in the US. + enum: + - local_amusement_tax + - local_lease_tax + - state_communications_tax + - state_sales_tax + type: string + x-stripeBypassValidation: true + required: + - state + - type + title: TaxProductRegistrationsResourceCountryOptionsUnitedStates + type: object + x-expandableFields: + - local_amusement_tax + - local_lease_tax + tax_product_registrations_resource_country_options_us_local_amusement_tax: + description: '' + properties: + jurisdiction: + description: >- + A [FIPS + code](https://www.census.gov/library/reference/code-lists/ansi.html) + representing the local jurisdiction. + maxLength: 5000 + type: string + required: + - jurisdiction + title: TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTax + type: object + x-expandableFields: [] + tax_product_registrations_resource_country_options_us_local_lease_tax: + description: '' + properties: + jurisdiction: + description: >- + A [FIPS + code](https://www.census.gov/library/reference/code-lists/ansi.html) + representing the local jurisdiction. + maxLength: 5000 + type: string + required: + - jurisdiction + title: TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTax + type: object + x-expandableFields: [] tax_product_resource_customer_details: description: '' properties: @@ -35599,10 +40705,10 @@ components: `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `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`, `jp_trn`, `li_uid`, `my_itn`, - `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, + `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `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`, `jp_trn`, `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`, `ke_pin`, `tr_tin`, @@ -35653,6 +40759,7 @@ components: - my_itn - my_sst - no_vat + - no_voec - nz_gst - pe_ruc - ph_tin @@ -35727,7 +40834,9 @@ components: description: '' properties: amount: - description: 'The amount of tax, in integer cents.' + description: >- + The amount of tax, in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). type: integer jurisdiction: $ref: '#/components/schemas/tax_product_resource_jurisdiction' @@ -35771,7 +40880,9 @@ components: - zero_rated type: string taxable_amount: - description: 'The amount on which tax is calculated, in integer cents.' + description: >- + The amount on which tax is calculated, in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). type: integer required: - amount @@ -35816,6 +40927,7 @@ components: - sales_tax - vat type: string + x-stripeBypassValidation: true required: - display_name - percentage_decimal @@ -35869,7 +40981,9 @@ components: description: '' properties: amount: - description: 'The amount of tax, in integer cents.' + description: >- + The amount of tax, in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). type: integer inclusive: description: >- @@ -35901,7 +41015,9 @@ components: - zero_rated type: string taxable_amount: - description: 'The amount on which tax is calculated, in integer cents.' + description: >- + The amount on which tax is calculated, in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). type: integer required: - amount @@ -35918,12 +41034,15 @@ components: properties: amount: description: >- - The shipping amount in integer cents. If `tax_behavior=inclusive`, - then this amount includes taxes. Otherwise, taxes were calculated on - top of this amount. + The shipping amount in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). If + `tax_behavior=inclusive`, then this amount includes taxes. + Otherwise, taxes were calculated on top of this amount. type: integer amount_tax: - description: 'The amount of tax calculated for shipping, in integer cents.' + description: >- + The amount of tax calculated for shipping, in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). type: integer shipping_rate: description: >- @@ -35997,6 +41116,7 @@ components: - vat nullable: true type: string + x-stripeBypassValidation: true required: - percentage_decimal title: TaxProductResourceTaxRateDetails @@ -36105,12 +41225,15 @@ components: properties: amount: description: >- - The shipping amount in integer cents. If `tax_behavior=inclusive`, - then this amount includes taxes. Otherwise, taxes were calculated on - top of this amount. + The shipping amount in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). If + `tax_behavior=inclusive`, then this amount includes taxes. + Otherwise, taxes were calculated on top of this amount. type: integer amount_tax: - description: 'The amount of tax calculated for shipping, in integer cents.' + description: >- + The amount of tax calculated for shipping, in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). type: integer shipping_rate: description: >- @@ -36211,6 +41334,19 @@ components: maxLength: 5000 nullable: true type: string + jurisdiction_level: + description: >- + The level of the jurisdiction that imposes this tax rate. Will be + `null` for manually defined tax rates. + enum: + - city + - country + - county + - district + - multiple + - state + nullable: true + type: string livemode: description: >- Has the value `true` if the object exists in live mode or the value @@ -36261,10 +41397,10 @@ components: - qst - rst - sales_tax - - service_tax - vat nullable: true type: string + x-stripeBypassValidation: true required: - active - created @@ -36299,6 +41435,13 @@ components: 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: >- + String indicating the name of the Configuration object, set by the + user + maxLength: 5000 + nullable: true + type: string object: description: >- String representing the object's type. Objects of the same type @@ -36306,6 +41449,9 @@ components: enum: - terminal.configuration type: string + offline: + $ref: >- + #/components/schemas/terminal_configuration_configuration_resource_offline_config tipping: $ref: >- #/components/schemas/terminal_configuration_configuration_resource_tipping @@ -36320,6 +41466,7 @@ components: type: object x-expandableFields: - bbpos_wisepos_e + - offline - tipping - verifone_p400 x-resourceId: terminal.configuration @@ -36437,12 +41584,13 @@ components: device_type: description: >- Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, - `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or - `simulated_wisepos_e`. + `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, + `simulated_wisepos_e`, or `mobile_phone_reader`. enum: - bbpos_chipper2x - bbpos_wisepad3 - bbpos_wisepos_e + - mobile_phone_reader - simulated_wisepos_e - stripe_m2 - verifone_P400 @@ -36497,7 +41645,9 @@ components: type: string status: description: The networking status of the reader. - maxLength: 5000 + enum: + - offline + - online nullable: true type: string required: @@ -36555,6 +41705,18 @@ components: type: object x-expandableFields: - splashscreen + terminal_configuration_configuration_resource_offline_config: + description: '' + properties: + enabled: + description: >- + Determines whether to allow transactions to be collected while + reader is offline. Defaults to false. + nullable: true + type: boolean + title: TerminalConfigurationConfigurationResourceOfflineConfig + type: object + x-expandableFields: [] terminal_configuration_configuration_resource_tipping: description: '' properties: @@ -36677,6 +41839,9 @@ components: terminal_reader_reader_resource_process_config: description: Represents a per-transaction override of a reader configuration properties: + enable_customer_cancellation: + description: Enable customer initiated cancellation when processing this payment. + type: boolean skip_tipping: description: Override showing a tipping selection screen on this transaction. type: boolean @@ -36709,7 +41874,12 @@ components: - process_config terminal_reader_reader_resource_process_setup_config: description: Represents a per-setup override of a reader configuration - properties: {} + properties: + enable_customer_cancellation: + description: >- + Enable customer initiated cancellation when processing this + SetupIntent. + type: boolean title: TerminalReaderReaderResourceProcessSetupConfig type: object x-expandableFields: [] @@ -36852,6 +42022,9 @@ components: charge refunded. An application fee can be refunded only by the application that created the charge. type: boolean + refund_payment_config: + $ref: >- + #/components/schemas/terminal_reader_reader_resource_refund_payment_config reverse_transfer: description: >- Boolean indicating whether the transfer should be reversed when @@ -36866,6 +42039,16 @@ components: - charge - payment_intent - refund + - refund_payment_config + terminal_reader_reader_resource_refund_payment_config: + description: Represents a per-transaction override of a reader configuration + properties: + enable_customer_cancellation: + description: Enable customer initiated cancellation when refunding this payment. + type: boolean + title: TerminalReaderReaderResourceRefundPaymentConfig + type: object + x-expandableFields: [] terminal_reader_reader_resource_set_reader_display_action: description: Represents a reader action to set the reader display properties: @@ -36979,6 +42162,19 @@ components: - frictionless nullable: true type: string + electronic_commerce_indicator: + description: |- + The Electronic Commerce Indicator (ECI). A protocol-level field + indicating what degree of authentication was performed. + enum: + - '01' + - '02' + - '05' + - '06' + - '07' + nullable: true + type: string + x-stripeBypassValidation: true result: description: Indicates the outcome of 3D Secure authentication. enum: @@ -37004,6 +42200,13 @@ components: - rejected nullable: true type: string + transaction_id: + description: |- + The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + (dsTransId) for this payment. + maxLength: 5000 + nullable: true + type: string version: description: The version of 3D Secure that was used. enum: @@ -37030,6 +42233,35 @@ components: - frictionless nullable: true type: string + electronic_commerce_indicator: + description: |- + The Electronic Commerce Indicator (ECI). A protocol-level field + indicating what degree of authentication was performed. + enum: + - '01' + - '02' + - '05' + - '06' + - '07' + nullable: true + type: string + x-stripeBypassValidation: true + exemption_indicator: + description: >- + The exemption requested via 3DS and accepted by the issuer at + authentication time. + enum: + - low_risk + - none + nullable: true + type: string + exemption_indicator_applied: + description: >- + Whether Stripe requested the value of `exemption_indicator` in the + transaction. This will depend on + + the outcome of Stripe's internal risk assessment. + type: boolean result: description: Indicates the outcome of 3D Secure authentication. enum: @@ -37055,6 +42287,13 @@ components: - rejected nullable: true type: string + transaction_id: + description: |- + The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + (dsTransId) for this payment. + maxLength: 5000 + nullable: true + type: string version: description: The version of 3D Secure that was used. enum: @@ -37089,43 +42328,42 @@ components: your customers in a secure manner. A token representing this information is - returned to your server to use. You should use our + returned to your server to use. 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, + on the client-side. This guarantees 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 + If you can't 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 + the API with either your publishable or secret API key. If - your integration uses this method, you are responsible for any PCI + your integration uses this method, you're responsible for any PCI compliance - that may be required, and you must keep your secret API key safe. Unlike - with + that it might require, and you must keep your secret API key safe. + Unlike with - client-side tokenization, your customer's information is not sent + client-side tokenization, your customer's information isn't sent directly to - Stripe, so we cannot determine how it is handled or stored. + Stripe, so we can't determine how it's handled or stored. - Tokens cannot be stored or used more than once. To store card or bank + You can't store or use tokens more than once. To store card or bank account - information for later use, you can create + information for later use, create [Customer](https://stripe.com/docs/api#customers) objects or [Custom - accounts](https://stripe.com/docs/api#external_accounts). Note that + accounts](https://stripe.com/docs/api#external_accounts). [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, @@ -37137,7 +42375,7 @@ components: card: $ref: '#/components/schemas/card' client_ip: - description: IP address of the client that generated the token. + description: IP address of the client that generates the token. maxLength: 5000 nullable: true type: string @@ -37169,8 +42407,8 @@ components: type: string used: description: >- - Whether this token has already been used (tokens can be used only - once). + Determines if you have already used this token (you can only use + tokens once). type: boolean required: - created @@ -37185,6 +42423,20 @@ components: - bank_account - card x-resourceId: token + token_card_networks: + description: '' + properties: + preferred: + description: >- + The preferred network for co-branded cards. Can be + `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if + requested network is not valid for the card. + maxLength: 5000 + nullable: true + type: string + title: token_card_networks + type: object + x-expandableFields: [] topup: description: >- To top up your Stripe balance, you create a top-up object. You can @@ -37287,10 +42539,8 @@ components: 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. + The source field is deprecated. It might not always be present in + the API response. nullable: true statement_descriptor: description: >- @@ -37543,12 +42793,9 @@ components: - 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 - + description: |- + The account (if any) that the payment is attributed to for tax + reporting, and where funds from the payment are transferred to after payment success. x-expansionResources: oneOf: @@ -39588,7 +44835,7 @@ components: type: string present: description: >- - `true`` if the OutboundPayment creation request is being made on + `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. type: boolean required: @@ -39886,6 +45133,13 @@ components: maxLength: 5000 nullable: true type: string + payout: + description: >- + Set if the ReceivedDebit was created due to a + [Payout](https://stripe.com/docs/api#payouts) object. + maxLength: 5000 + nullable: true + type: string title: TreasuryReceivedDebitsResourceLinkedFlows type: object x-expandableFields: [] @@ -40354,7 +45608,7 @@ info: details. termsOfService: 'https://stripe.com/us/terms/' title: Stripe API - version: '2023-08-16' + version: '2024-04-10' x-stripeSpecFilename: spec3 openapi: 3.0.0 paths: @@ -40407,6 +45661,9 @@ paths: content: application/x-www-form-urlencoded: encoding: + collection_options: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -40419,13 +45676,31 @@ paths: type: string collect: description: >- - Which information the platform needs to collect from the - user. One of `currently_due` or `eventually_due`. Default is - `currently_due`. + The collect parameter is deprecated. Use + `collection_options` instead. enum: - currently_due - eventually_due type: string + collection_options: + description: >- + Specifies the requirements that Stripe collects from + connected accounts in the Connect Onboarding flow. + properties: + fields: + enum: + - currently_due + - eventually_due + type: string + future_requirements: + enum: + - include + - omit + type: string + required: + - fields + title: collection_options_params + type: object expand: description: Specifies which fields in the response should be expanded. items: @@ -40511,10 +45786,84 @@ paths: properties: enabled: type: boolean + features: + properties: {} + title: account_features_param + type: object + required: + - enabled + title: account_config_param + type: object + documents: + properties: + enabled: + type: boolean + features: + properties: {} + title: base_features_param + type: object required: - enabled title: base_config_param type: object + payment_details: + properties: + enabled: + type: boolean + features: + properties: + capture_payments: + type: boolean + destination_on_behalf_of_charge_management: + type: boolean + dispute_management: + type: boolean + refund_management: + type: boolean + title: payments_features_param + type: object + required: + - enabled + title: payments_config_param + type: object + payments: + properties: + enabled: + type: boolean + features: + properties: + capture_payments: + type: boolean + destination_on_behalf_of_charge_management: + type: boolean + dispute_management: + type: boolean + refund_management: + type: boolean + title: payments_features_param + type: object + required: + - enabled + title: payments_config_param + type: object + payouts: + properties: + enabled: + type: boolean + features: + properties: + edit_payout_schedule: + type: boolean + instant_payouts: + type: boolean + standard_payouts: + type: boolean + title: payouts_features_param + type: object + required: + - enabled + title: payouts_config_param + type: object title: account_session_create_components_param type: object expand: @@ -40549,7 +45898,10 @@ paths: empty.

operationId: GetAccounts parameters: - - explode: true + - description: >- + Only return connected accounts that were created during the given + date interval. + explode: true in: query name: created required: false @@ -40791,6 +46143,23 @@ paths: business_profile: description: Business information about the account. properties: + annual_revenue: + properties: + amount: + type: integer + currency: + type: string + fiscal_year_end: + maxLength: 5000 + type: string + required: + - amount + - currency + - fiscal_year_end + title: annual_revenue_specs + type: object + estimated_worker_count: + type: integer mcc: maxLength: 4 type: string @@ -40849,7 +46218,11 @@ paths: title: business_profile_specs type: object business_type: - description: The business type. + description: >- + The business type. Once you create an [Account + Link](https://docs.stripe.com/api/account_links) or [Account + Session](https://docs.stripe.com/api/account_sessions), this + property can only be updated for Custom accounts. enum: - company - government_entity @@ -40884,6 +46257,12 @@ paths: type: boolean title: capability_param type: object + amazon_pay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object au_becs_debit_payments: properties: requested: @@ -41010,6 +46389,12 @@ paths: type: boolean title: capability_param type: object + mobilepay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object oxxo_payments: properties: requested: @@ -41034,6 +46419,12 @@ paths: type: boolean title: capability_param type: object + revolut_pay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object sepa_debit_payments: properties: requested: @@ -41046,6 +46437,12 @@ paths: type: boolean title: capability_param type: object + swish_payments: + properties: + requested: + type: boolean + title: capability_param + type: object tax_reporting_us_1099_k: properties: requested: @@ -41087,7 +46484,11 @@ paths: company: description: >- Information about the company or business. This field is - available for any `business_type`. + available for any `business_type`. Once you create an + [Account Link](https://docs.stripe.com/api/account_links) or + [Account + Session](https://docs.stripe.com/api/account_sessions), this + property can only be updated for Custom accounts. properties: address: properties: @@ -41218,6 +46619,7 @@ paths: - public_company - public_corporation - public_partnership + - registered_charity - single_member_llc - sole_establishment - sole_proprietorship @@ -41272,7 +46674,7 @@ paths: 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). + country](https://docs.stripe.com/payouts). type: string documents: description: >- @@ -41360,21 +46762,24 @@ paths: description: >- A card or bank account to attach to the account for receiving - [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) + [payouts](https://docs.stripe.com/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 + [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank - account](https://stripe.com/docs/api#account_create_bank_account) + account](https://docs.stripe.com/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) + account](https://docs.stripe.com/api#account_create_bank_account) or [card - creation](https://stripe.com/docs/api#account_create_card) - APIs. + creation](https://docs.stripe.com/api#account_create_card) + APIs. After you create an [Account + Link](https://docs.stripe.com/api/account_links) or [Account + Session](https://docs.stripe.com/api/account_sessions), this + property can only be updated for Custom accounts. maxLength: 5000 type: string x-stripeBypassValidation: true @@ -41382,7 +46787,10 @@ paths: description: >- Information about the person represented by the account. This field is null unless `business_type` is set to - `individual`. + `individual`. Once you create an [Account + Link](https://docs.stripe.com/api/account_links) or [Account + Session](https://docs.stripe.com/api/account_sessions), this + property can only be updated for Custom accounts. properties: address: properties: @@ -41551,6 +46959,25 @@ paths: 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 + title: + maxLength: 5000 + type: string + title: individual_relationship_specs + type: object ssn_last_4: maxLength: 5000 type: string @@ -41601,6 +47028,12 @@ paths: Options for customizing how the account functions within Stripe. properties: + bacs_debit_payments: + properties: + display_name: + type: string + title: bacs_debit_payments_specs + type: object branding: properties: icon: @@ -41746,7 +47179,8 @@ paths: tos_acceptance: description: >- Details on the account's acceptance of the [Stripe Services - Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance) + This property can only be updated for Custom accounts. properties: date: format: unix-time @@ -41889,13 +47323,10 @@ paths: For other accounts, you can update all information until that account has started to go through Connect Onboarding. Once you create an - Account Link + Account Link or Account Session, - for a Standard or Express account, some parameters can no longer be - changed. These are marked as Custom Only or - Custom and Express - - below.

+ some properties can only be changed or updated for Custom accounts.

To update your own account, use the - + The business type. Once you create an [Account + Link](https://docs.stripe.com/api/account_links) or [Account + Session](https://docs.stripe.com/api/account_sessions), this + property can only be updated for Custom accounts. enum: - company - government_entity @@ -42050,6 +47502,12 @@ paths: type: boolean title: capability_param type: object + amazon_pay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object au_becs_debit_payments: properties: requested: @@ -42176,6 +47634,12 @@ paths: type: boolean title: capability_param type: object + mobilepay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object oxxo_payments: properties: requested: @@ -42200,6 +47664,12 @@ paths: type: boolean title: capability_param type: object + revolut_pay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object sepa_debit_payments: properties: requested: @@ -42212,6 +47682,12 @@ paths: type: boolean title: capability_param type: object + swish_payments: + properties: + requested: + type: boolean + title: capability_param + type: object tax_reporting_us_1099_k: properties: requested: @@ -42253,7 +47729,11 @@ paths: company: description: >- Information about the company or business. This field is - available for any `business_type`. + available for any `business_type`. Once you create an + [Account Link](https://docs.stripe.com/api/account_links) or + [Account + Session](https://docs.stripe.com/api/account_sessions), this + property can only be updated for Custom accounts. properties: address: properties: @@ -42384,6 +47864,7 @@ paths: - public_company - public_corporation - public_partnership + - registered_charity - single_member_llc - sole_establishment - sole_proprietorship @@ -42423,7 +47904,7 @@ paths: 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). + country](https://docs.stripe.com/payouts). type: string documents: description: >- @@ -42511,21 +47992,24 @@ paths: description: >- A card or bank account to attach to the account for receiving - [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) + [payouts](https://docs.stripe.com/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 + [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank - account](https://stripe.com/docs/api#account_create_bank_account) + account](https://docs.stripe.com/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) + account](https://docs.stripe.com/api#account_create_bank_account) or [card - creation](https://stripe.com/docs/api#account_create_card) - APIs. + creation](https://docs.stripe.com/api#account_create_card) + APIs. After you create an [Account + Link](https://docs.stripe.com/api/account_links) or [Account + Session](https://docs.stripe.com/api/account_sessions), this + property can only be updated for Custom accounts. maxLength: 5000 type: string x-stripeBypassValidation: true @@ -42533,7 +48017,10 @@ paths: description: >- Information about the person represented by the account. This field is null unless `business_type` is set to - `individual`. + `individual`. Once you create an [Account + Link](https://docs.stripe.com/api/account_links) or [Account + Session](https://docs.stripe.com/api/account_sessions), this + property can only be updated for Custom accounts. properties: address: properties: @@ -42702,6 +48189,25 @@ paths: 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 + title: + maxLength: 5000 + type: string + title: individual_relationship_specs + type: object ssn_last_4: maxLength: 5000 type: string @@ -42752,6 +48258,12 @@ paths: Options for customizing how the account functions within Stripe. properties: + bacs_debit_payments: + properties: + display_name: + type: string + title: bacs_debit_payments_specs + type: object branding: properties: icon: @@ -42817,6 +48329,19 @@ paths: type: string title: card_payments_settings_specs type: object + invoices: + properties: + default_account_tax_ids: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: invoices_settings_specs + type: object payments: properties: statement_descriptor: @@ -42897,7 +48422,8 @@ paths: tos_acceptance: description: >- Details on the account's acceptance of the [Stripe Services - Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). + Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance) + This property can only be updated for Custom accounts. properties: date: format: unix-time @@ -43551,6 +49077,18 @@ paths: schema: type: integer style: form + - description: Filter external accounts according to a particular object type. + in: query + name: object + required: false + schema: + enum: + - bank_account + - card + maxLength: 5000 + 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 @@ -44121,6 +49659,8 @@ paths: type: boolean executive: type: boolean + legal_guardian: + type: boolean owner: type: boolean representative: @@ -44208,6 +49748,9 @@ paths: content: application/x-www-form-urlencoded: encoding: + additional_tos_acceptances: + explode: true + style: deepObject address: explode: true style: deepObject @@ -44244,6 +49787,29 @@ paths: schema: additionalProperties: false properties: + additional_tos_acceptances: + description: >- + Details on the legal guardian's acceptance of the required + Stripe agreements. + properties: + account: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + title: settings_terms_of_service_specs + type: object + title: person_additional_tos_acceptances_specs + type: object address: description: The person's address. properties: @@ -44428,7 +49994,7 @@ paths: 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/create_token?type=pii). + Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). maxLength: 5000 type: string id_number_secondary: @@ -44438,7 +50004,7 @@ paths: 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/create_token?type=pii). + Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). maxLength: 5000 type: string last_name: @@ -44484,7 +50050,7 @@ paths: person_token: description: >- A [person - token](https://stripe.com/docs/connect/account-tokens), used + token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. maxLength: 5000 type: string @@ -44531,6 +50097,8 @@ paths: type: boolean executive: type: boolean + legal_guardian: + type: boolean owner: type: boolean percent_ownership: @@ -44711,6 +50279,9 @@ paths: content: application/x-www-form-urlencoded: encoding: + additional_tos_acceptances: + explode: true + style: deepObject address: explode: true style: deepObject @@ -44747,6 +50318,29 @@ paths: schema: additionalProperties: false properties: + additional_tos_acceptances: + description: >- + Details on the legal guardian's acceptance of the required + Stripe agreements. + properties: + account: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + title: settings_terms_of_service_specs + type: object + title: person_additional_tos_acceptances_specs + type: object address: description: The person's address. properties: @@ -44931,7 +50525,7 @@ paths: 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/create_token?type=pii). + Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). maxLength: 5000 type: string id_number_secondary: @@ -44941,7 +50535,7 @@ paths: 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/create_token?type=pii). + Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). maxLength: 5000 type: string last_name: @@ -44987,7 +50581,7 @@ paths: person_token: description: >- A [person - token](https://stripe.com/docs/connect/account-tokens), used + token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. maxLength: 5000 type: string @@ -45034,6 +50628,8 @@ paths: type: boolean executive: type: boolean + legal_guardian: + type: boolean owner: type: boolean percent_ownership: @@ -45155,6 +50751,8 @@ paths: type: boolean executive: type: boolean + legal_guardian: + type: boolean owner: type: boolean representative: @@ -45242,6 +50840,9 @@ paths: content: application/x-www-form-urlencoded: encoding: + additional_tos_acceptances: + explode: true + style: deepObject address: explode: true style: deepObject @@ -45278,6 +50879,29 @@ paths: schema: additionalProperties: false properties: + additional_tos_acceptances: + description: >- + Details on the legal guardian's acceptance of the required + Stripe agreements. + properties: + account: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + title: settings_terms_of_service_specs + type: object + title: person_additional_tos_acceptances_specs + type: object address: description: The person's address. properties: @@ -45462,7 +51086,7 @@ paths: 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/create_token?type=pii). + Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). maxLength: 5000 type: string id_number_secondary: @@ -45472,7 +51096,7 @@ paths: 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/create_token?type=pii). + Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). maxLength: 5000 type: string last_name: @@ -45518,7 +51142,7 @@ paths: person_token: description: >- A [person - token](https://stripe.com/docs/connect/account-tokens), used + token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. maxLength: 5000 type: string @@ -45565,6 +51189,8 @@ paths: type: boolean executive: type: boolean + legal_guardian: + type: boolean owner: type: boolean percent_ownership: @@ -45745,6 +51371,9 @@ paths: content: application/x-www-form-urlencoded: encoding: + additional_tos_acceptances: + explode: true + style: deepObject address: explode: true style: deepObject @@ -45781,6 +51410,29 @@ paths: schema: additionalProperties: false properties: + additional_tos_acceptances: + description: >- + Details on the legal guardian's acceptance of the required + Stripe agreements. + properties: + account: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + title: settings_terms_of_service_specs + type: object + title: person_additional_tos_acceptances_specs + type: object address: description: The person's address. properties: @@ -45965,7 +51617,7 @@ paths: 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/create_token?type=pii). + Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). maxLength: 5000 type: string id_number_secondary: @@ -45975,7 +51627,7 @@ paths: 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/create_token?type=pii). + Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). maxLength: 5000 type: string last_name: @@ -46021,7 +51673,7 @@ paths: person_token: description: >- A [person - token](https://stripe.com/docs/connect/account-tokens), used + token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. maxLength: 5000 type: string @@ -46068,6 +51720,8 @@ paths: type: boolean executive: type: boolean + legal_guardian: + type: boolean owner: type: boolean percent_ownership: @@ -46431,7 +52085,10 @@ paths: maxLength: 5000 type: string style: form - - explode: true + - description: >- + Only return applications fees that were created during the given + date interval. + explode: true in: query name: created required: false @@ -47360,7 +53017,10 @@ paths: used the path /v1/balance/history.

operationId: GetBalanceHistory parameters: - - explode: true + - description: >- + Only return transactions that were created during the given date + interval. + explode: true in: query name: created required: false @@ -47458,17 +53118,18 @@ paths: Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, + `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, - `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, - `obligation_outbound`, `obligation_reversal_inbound`, - `obligation_reversal_outbound`, `obligation_payout`, - `obligation_payout_failure`, `payment`, `payment_failure_refund`, - `payment_refund`, `payment_reversal`, `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`. + `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, + `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, + `payment_network_reserve_hold`, `payment_network_reserve_release`, + `payment_refund`, `payment_reversal`, `payment_unreconciled`, + `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`. in: query name: type required: false @@ -47592,7 +53253,10 @@ paths: used the path /v1/balance/history.

operationId: GetBalanceTransactions parameters: - - explode: true + - description: >- + Only return transactions that were created during the given date + interval. + explode: true in: query name: created required: false @@ -47690,17 +53354,18 @@ paths: Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, + `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, - `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, - `obligation_outbound`, `obligation_reversal_inbound`, - `obligation_reversal_outbound`, `obligation_payout`, - `obligation_payout_failure`, `payment`, `payment_failure_refund`, - `payment_refund`, `payment_reversal`, `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`. + `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, + `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, + `payment_network_reserve_hold`, `payment_network_reserve_release`, + `payment_refund`, `payment_reversal`, `payment_unreconciled`, + `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`. in: query name: type required: false @@ -47811,22 +53476,703 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/billing_portal/configurations: + /v1/billing/meter_event_adjustments: + post: + description:

Creates a billing meter event adjustment

+ operationId: PostBillingMeterEventAdjustments + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + cancel: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + cancel: + description: Specifies which event to cancel. + properties: + identifier: + maxLength: 100 + type: string + required: + - identifier + title: event_adjustment_cancel_settings_param + type: object + event_name: + description: >- + The name of the meter event. Corresponds with the + `event_name` field on a meter. + maxLength: 100 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: + description: >- + Specifies whether to cancel a single event or a range of + events for a time period. + enum: + - cancel + type: string + required: + - cancel + - event_name + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billing.meter_event_adjustment' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/billing/meter_events: + post: + description:

Creates a billing meter event

+ operationId: PostBillingMeterEvents + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + payload: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + event_name: + description: >- + The name of the meter event. Corresponds with the + `event_name` field on a meter. + maxLength: 100 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + identifier: + description: >- + A unique identifier for the event. If not provided, one will + be generated. We recommend using a globally unique + identifier for this. We'll enforce uniqueness within a + rolling 24 hour period. + maxLength: 100 + type: string + payload: + additionalProperties: + type: string + description: >- + The payload of the event. This must contain a field with the + event's numerical value and a field to map the event to a + customer. + type: object + timestamp: + description: >- + The time of the event. Measured in seconds since the Unix + epoch. + format: unix-time + type: integer + required: + - event_name + - payload + - timestamp + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billing.meter_event' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/billing/meters: get: - description: >- -

Returns a list of configurations that describe the functionality of - the customer portal.

- operationId: GetBillingPortalConfigurations + description:

Retrieve a list of billing meters.

+ operationId: GetBillingMeters parameters: - - description: >- - Only return configurations that are active or inactive (e.g., pass - `true` to only list active configurations). - 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: >- + 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 results to only include meters with the given status. + in: query + name: status + required: false + schema: + enum: + - active + - inactive + 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/billing.meter' + 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/billing/meters + type: string + required: + - data + - has_more + - object + - url + title: BillingMeterResourceBillingMeterList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + post: + description:

Creates a billing meter

+ operationId: PostBillingMeters + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + customer_mapping: + explode: true + style: deepObject + default_aggregation: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + value_settings: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + customer_mapping: + description: Fields that specify how to map a meter event to a customer. + properties: + event_payload_key: + maxLength: 100 + type: string + type: + enum: + - by_id + type: string + required: + - event_payload_key + - type + title: customer_mapping_param + type: object + default_aggregation: + description: The default settings to aggregate a meter's events with. + properties: + formula: + enum: + - count + - sum + type: string + required: + - formula + title: aggregation_settings_param + type: object + display_name: + description: The meter's name. + maxLength: 250 + type: string + event_name: + description: >- + The name of the usage event to record usage for. Corresponds + with the `event_name` field on usage events. + maxLength: 100 + type: string + event_time_window: + description: 'The time window to pre-aggregate usage events for, if any.' + enum: + - day + - hour + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + value_settings: + description: Fields that specify how to calculate a usage event's value. + properties: + event_payload_key: + maxLength: 100 + type: string + required: + - event_payload_key + title: meter_value_settings_param + type: object + required: + - default_aggregation + - display_name + - event_name + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billing.meter' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/billing/meters/{id}': + get: + description:

Retrieves a billing meter given an ID

+ operationId: GetBillingMetersId + 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: Unique identifier for the object. + 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/billing.meter' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + post: + description:

Updates a billing meter

+ operationId: PostBillingMetersId + parameters: + - description: Unique identifier for the object. + 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: + display_name: + description: The meter's name. + maxLength: 250 + 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/billing.meter' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/billing/meters/{id}/deactivate': + post: + description:

Deactivates a billing meter

+ operationId: PostBillingMetersIdDeactivate + parameters: + - description: Unique identifier for the object. + 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/billing.meter' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/billing/meters/{id}/event_summaries': + get: + description:

Retrieve a list of billing meter event summaries.

+ operationId: GetBillingMetersIdEventSummaries + parameters: + - description: The customer for which to fetch event summaries. + in: query + name: customer + required: true + schema: + maxLength: 5000 + type: string + style: form + - description: >- + The timestamp from when to stop aggregating usage events + (exclusive). + in: query + name: end_time + required: true + schema: + format: unix-time + type: integer + 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: Unique identifier for the object. + 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 + name: limit + required: false + schema: + type: integer + style: form + - description: >- + The timestamp from when to start aggregating usage events + (inclusive). + in: query + name: start_time + required: true + schema: + format: unix-time + 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: >- + Specifies what granularity to use when generating event summaries. + If not specified, a single event summary would be returned for the + specified time range. + in: query + name: value_grouping_window + required: false + schema: + enum: + - hour + 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/billing.meter_event_summary' + 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/billing/meters/[^/]+/event_summaries' + type: string + required: + - data + - has_more + - object + - url + title: BillingMeterResourceBillingMeterEventSummaryList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/billing/meters/{id}/reactivate': + post: + description:

Reactivates a billing meter

+ operationId: PostBillingMetersIdReactivate + parameters: + - description: Unique identifier for the object. + 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/billing.meter' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/billing_portal/configurations: + get: + description: >- +

Returns a list of configurations that describe the functionality of + the customer portal.

+ operationId: GetBillingPortalConfigurations + parameters: + - description: >- + Only return configurations that are active or inactive (e.g., pass + `true` to only list active configurations). + 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 @@ -48085,12 +54431,6 @@ paths: - enabled title: subscription_cancel_creation_param type: object - subscription_pause: - properties: - enabled: - type: boolean - title: subscription_pause_param - type: object subscription_update: properties: default_allowed_updates: @@ -48397,12 +54737,6 @@ paths: type: string title: subscription_cancel_updating_param type: object - subscription_pause: - properties: - enabled: - type: boolean - title: subscription_pause_param - type: object subscription_update: properties: default_allowed_updates: @@ -48747,7 +55081,10 @@ paths: first.

operationId: GetCharges parameters: - - explode: true + - description: >- + Only return charges that were created during the given date + interval. + explode: true in: query name: created required: false @@ -48891,14 +55228,13 @@ paths: description: Error response. post: description: >- -

Use the Payment Intents API - to initiate a new payment instead +

This method is no longer recommended—use the Payment Intents API - of using this method. Confirmation of the PaymentIntent creates the - Charge + to initiate a new payment instead. Confirmation of the PaymentIntent + creates the Charge - object used to request payment, so this method is limited to legacy - integrations.

+ object used to request payment.

operationId: PostCharges requestBody: content: @@ -49094,7 +55430,7 @@ paths: session: maxLength: 5000 type: string - title: radar_options + title: radar_options_with_hidden_options type: object receipt_email: description: >- @@ -49918,32 +56254,32 @@ paths: '/v1/charges/{charge}/refund': post: description: >- -

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

+

When you create a new refund, you must specify either a Charge or a + PaymentIntent object.

-

Creating a new refund will refund a charge that has previously been - created but not yet refunded. +

This action refunds a previously created charge that’s not refunded + yet. - Funds will be refunded to the credit or debit card that was originally + Funds are refunded to the credit or debit card that’s originally charged.

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

+ You can repeat this until the entire charge is refunded.

-

Once entirely refunded, a charge can’t be refunded again. +

After you entirely refund a charge, you can’t refund it again. - This method will raise an error when called on an already-refunded + This method raises an error when it’s called on an already-refunded charge, - or when trying to refund more money than is left on a charge.

+ or when you attempt to refund more money than is left on a charge.

operationId: PostChargesChargeRefund parameters: - - in: path + - description: The identifier of the charge to refund. + in: path name: charge required: true schema: @@ -49964,6 +56300,11 @@ paths: additionalProperties: false properties: amount: + description: >- + A positive integer in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal) + representing how much of this charge to refund. Can refund + only up to the remaining, unrefunded amount of the charge. type: integer expand: description: Specifies which fields in the response should be expanded. @@ -49994,9 +56335,18 @@ paths: value to them. All keys can be unset by posting an empty value to `metadata`. payment_intent: + description: The identifier of the PaymentIntent to refund. maxLength: 5000 type: string reason: + description: >- + String indicating the reason for the refund. If set, + possible values are `duplicate`, `fraudulent`, and + `requested_by_customer`. If you believe the charge to be + fraudulent, specifying `fraudulent` as the reason will add + the associated card and email to your [block + lists](https://stripe.com/docs/radar/lists), and will also + help us improve our fraud detection algorithms. enum: - duplicate - fraudulent @@ -50004,8 +56354,22 @@ paths: maxLength: 5000 type: string refund_application_fee: + description: >- + Boolean indicating whether the application fee should be + refunded when refunding this charge. If a full charge refund + is given, the full application fee will be refunded. + Otherwise, the application fee will be refunded in an amount + proportional to the amount of the charge refunded. An + application fee can be refunded only by the application that + created the charge. type: boolean reverse_transfer: + description: >- + Boolean indicating whether the transfer should be reversed + when refunding this charge. The transfer will be reversed + proportionally to the amount being refunded (either the + entire or partial amount).

A transfer can be reversed + only by the application that created the charge. type: boolean type: object required: false @@ -50136,10 +56500,34 @@ paths: $ref: '#/components/schemas/error' description: Error response. post: - description:

Create a refund.

+ description: >- +

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

+ + +

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

+ + +

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

+ + +

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

operationId: PostChargesChargeRefunds parameters: - - in: path + - description: The identifier of the charge to refund. + in: path name: charge required: true schema: @@ -50160,7 +56548,6 @@ paths: additionalProperties: false properties: amount: - description: A positive integer representing how much to refund. type: integer currency: description: >- @@ -50207,9 +56594,18 @@ paths: - customer_balance type: string payment_intent: + description: The identifier of the PaymentIntent to refund. maxLength: 5000 type: string reason: + description: >- + String indicating the reason for the refund. If set, + possible values are `duplicate`, `fraudulent`, and + `requested_by_customer`. If you believe the charge to be + fraudulent, specifying `fraudulent` as the reason will add + the associated card and email to your [block + lists](https://stripe.com/docs/radar/lists), and will also + help us improve our fraud detection algorithms. enum: - duplicate - fraudulent @@ -50217,8 +56613,22 @@ paths: maxLength: 5000 type: string refund_application_fee: + description: >- + Boolean indicating whether the application fee should be + refunded when refunding this charge. If a full charge refund + is given, the full application fee will be refunded. + Otherwise, the application fee will be refunded in an amount + proportional to the amount of the charge refunded. An + application fee can be refunded only by the application that + created the charge. type: boolean reverse_transfer: + description: >- + Boolean indicating whether the transfer should be reversed + when refunding this charge. The transfer will be reversed + proportionally to the amount being refunded (either the + entire or partial amount).

A transfer can be reversed + only by the application that created the charge. type: boolean type: object required: false @@ -50348,6 +56758,28 @@ paths: description:

Returns a list of Checkout Sessions.

operationId: GetCheckoutSessions parameters: + - description: >- + Only return Checkout Sessions 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 the Checkout Sessions for the Customer specified. in: query name: customer @@ -50434,6 +56866,17 @@ paths: maxLength: 5000 type: string style: form + - description: Only return the Checkout Sessions matching the given status. + in: query + name: status + required: false + schema: + enum: + - complete + - expired + - open + type: string + style: form - description: Only return the Checkout Session for the subscription specified. in: query name: subscription @@ -50589,6 +57032,19 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_params @@ -50596,7 +57052,7 @@ paths: billing_address_collection: description: >- Specify whether Checkout should collect the customer's - billing address. + billing address. Defaults to `auto`. enum: - auto - required @@ -50624,6 +57080,17 @@ paths: Configure fields for the Checkout Session to gather active consent from customers. properties: + payment_method_reuse_agreement: + properties: + position: + enum: + - auto + - hidden + type: string + required: + - position + title: payment_method_reuse_agreement_params + type: object promotions: enum: - auto @@ -50641,12 +57108,13 @@ paths: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported - currency](https://stripe.com/docs/currencies). + currency](https://stripe.com/docs/currencies). Required in + `setup` mode when `payment_method_types` is not set. type: string custom_fields: description: >- Collect additional information from your customer using - custom fields. Up to 2 fields are supported. + custom fields. Up to 3 fields are supported. items: properties: dropdown: @@ -50723,6 +57191,19 @@ paths: Display additional text for your customers using custom text. properties: + after_submit: + anyOf: + - properties: + message: + maxLength: 1200 + type: string + required: + - message + title: custom_text_position_param + type: object + - enum: + - '' + type: string shipping_address: anyOf: - properties: @@ -50767,7 +57248,7 @@ paths: customer: description: >- ID of an existing Customer, if one exists. In `payment` - mode, the customer’s most recent card + mode, the customer’s most recently saved card payment method will be used to prefill the email, name, card details, and billing address @@ -50776,10 +57257,10 @@ paths: [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) - will be used if it’s a card, and otherwise the most recent - card will be used. A valid billing address, billing name and - billing email are required on the payment method for - Checkout to prefill the customer's card details. + will be used if it’s a card, otherwise the most recently + saved card will be used. A valid billing address, billing + name and billing email are required on the payment method + for Checkout to prefill the customer's card details. If the Customer already has a valid @@ -50922,10 +57403,10 @@ paths: - items: properties: name: - maxLength: 30 + maxLength: 40 type: string value: - maxLength: 30 + maxLength: 140 type: string required: - name @@ -50942,6 +57423,19 @@ paths: footer: maxLength: 5000 type: string + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object metadata: additionalProperties: type: string @@ -51245,7 +57739,8 @@ paths: or a discount. - Can only be set in `subscription` mode. + Can only be set in `subscription` mode. Defaults to + `always`. If you'd like information on how to collect a payment method @@ -51388,6 +57883,13 @@ paths: type: boolean title: installments_param type: object + request_three_d_secure: + enum: + - any + - automatic + - challenge + type: string + x-stripeBypassValidation: true setup_future_usage: enum: - off_session @@ -51607,6 +58109,15 @@ paths: type: integer title: payment_method_options_param type: object + revolut_pay: + properties: + setup_future_usage: + enum: + - none + - off_session + type: string + title: payment_method_options_param + type: object sepa_debit: properties: setup_future_usage: @@ -51625,6 +58136,13 @@ paths: type: string title: payment_method_options_param type: object + swish: + properties: + reference: + maxLength: 5000 + type: string + title: payment_method_options_param + type: object us_bank_account: properties: financial_connections: @@ -51644,6 +58162,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -51691,11 +58210,13 @@ paths: Checkout Session can accept. - In `payment` and `subscription` mode, you can omit this - attribute to manage your payment methods from the [Stripe + 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. + See [Dynamic Payment + Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) + for more details. Read more about the supported payment methods and their @@ -51740,8 +58261,10 @@ paths: - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -51766,6 +58289,29 @@ paths: - enabled title: phone_number_collection_params type: object + redirect_on_completion: + description: >- + This parameter applies to `ui_mode: embedded`. Learn more + about the [redirect + behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) + of embedded sessions. Defaults to `always`. + enum: + - always + - if_required + - never + type: string + 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. This parameter is required if + ui_mode is `embedded` + + and redirect-based payment methods are enabled on the + session. + maxLength: 5000 + type: string setup_intent_data: description: >- A subset of parameters to be passed to SetupIntent creation @@ -52143,10 +58689,8 @@ paths: relevant text on the page, such as the submit button. `submit_type` can only be - specified on Checkout Sessions in `payment` mode, but not - Checkout Sessions - - in `subscription` or `setup` mode. + specified on Checkout Sessions in `payment` mode. If blank + or `auto`, `pay` is used. enum: - auto - book @@ -52171,6 +58715,23 @@ paths: description: maxLength: 500 type: string + invoice_settings: + properties: + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + title: invoice_settings_params + type: object metadata: additionalProperties: type: string @@ -52224,10 +58785,13 @@ paths: is complete. - If you’d like to use information from the successful - Checkout Session on your page, + This parameter is not allowed if ui_mode is `embedded`. If + you’d like to use + + information from the successful Checkout Session on your + page, read the - read the guide on [customizing your success + guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). maxLength: 5000 type: string @@ -52240,10 +58804,15 @@ paths: - enabled title: tax_id_collection_params type: object - required: - - success_url + ui_mode: + description: The UI mode of the Session. Defaults to `hosted`. + enum: + - embedded + - hosted + type: string + x-stripeBypassValidation: true type: object - required: true + required: false responses: '200': content: @@ -52466,10 +59035,14 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/country_specs: + /v1/climate/orders: get: - description:

Lists all Country Spec objects available in the API.

- operationId: GetCountrySpecs + description: >- +

Lists all Climate order objects. The orders are returned sorted by + creation date, with the + + most recently created orders appearing first.

+ operationId: GetClimateOrders parameters: - description: >- A cursor for use in pagination. `ending_before` is an object ID that @@ -52535,7 +59108,7 @@ paths: properties: data: items: - $ref: '#/components/schemas/country_spec' + $ref: '#/components/schemas/climate.order' type: array has_more: description: >- @@ -52552,14 +59125,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: ^/v1/country_specs + pattern: ^/v1/climate/orders type: string required: - data - has_more - object - url - title: CountrySpecList + title: ClimateRemovalsOrdersList type: object x-expandableFields: - data @@ -52570,18 +59143,108 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/country_specs/{country}': + post: + description: >- +

Creates a Climate order object for a given Climate product. The order + will be processed immediately + + after creation and payment will be deducted your Stripe balance.

+ operationId: PostClimateOrders + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + beneficiary: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: >- + Requested amount of carbon removal units. Either this or + `metric_tons` must be specified. + type: integer + beneficiary: + description: >- + Publicly sharable reference for the end beneficiary of + carbon removal. Assumed to be the Stripe account if not set. + properties: + public_name: + maxLength: 5000 + type: string + required: + - public_name + title: beneficiary_params + type: object + currency: + description: >- + Request currency for the order as a three-letter [ISO + currency + code](https://www.iso.org/iso-4217-currency-codes.html), in + lowercase. Must be a supported [settlement currency for your + account](https://stripe.com/docs/currencies). If omitted, + the account's default currency will be used. + 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 + metric_tons: + description: >- + Requested number of tons for the order. Either this or + `amount` must be specified. + format: decimal + type: string + product: + description: Unique identifier of the Climate product. + maxLength: 5000 + type: string + required: + - product + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/climate.order' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/climate/orders/{order}': get: - description:

Returns a Country Spec for a given Country code.

- operationId: GetCountrySpecsCountry + description: >- +

Retrieves the details of a Climate order object with the given + ID.

+ operationId: GetClimateOrdersOrder parameters: - - in: path - name: country - required: true - schema: - maxLength: 5000 - type: string - style: simple - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -52593,6 +59256,14 @@ paths: type: string type: array style: deepObject + - description: Unique identifier of the order. + in: path + name: order + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -52607,7 +59278,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/country_spec' + $ref: '#/components/schemas/climate.order' description: Successful response. default: content: @@ -52615,34 +59286,664 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/coupons: - get: - description:

Returns a list of your coupons.

- operationId: GetCoupons + post: + description: >- +

Updates the specified order by setting the values of the parameters + passed.

+ operationId: PostClimateOrdersOrder 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 + - description: Unique identifier of the order. + in: path + name: order + 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 + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + beneficiary: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + beneficiary: + anyOf: + - properties: + public_name: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + required: + - public_name + title: beneficiary_params + type: object + - enum: + - '' + type: string + description: >- + Publicly sharable reference for the end beneficiary of + carbon removal. Assumed to be the Stripe account if not set. + 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/climate.order' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/climate/orders/{order}/cancel': + post: + description: >- +

Cancels a Climate order. You can cancel an order within 30 days of + creation. Stripe refunds the + + reservation amount_subtotal, but not the + amount_fees for user-triggered cancellations. Frontier + + might cancel reservations if suppliers fail to deliver. If Frontier + cancels the reservation, Stripe + + provides 90 days advance notice and refunds the + amount_total.

+ operationId: PostClimateOrdersOrderCancel + parameters: + - description: Unique identifier of the order. + in: path + name: order + 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/climate.order' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/climate/products: + get: + description:

Lists all available Climate product objects.

+ operationId: GetClimateProducts + 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/climate.product' + 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/climate/products + type: string + required: + - data + - has_more + - object + - url + title: ClimateRemovalsProductsList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/climate/products/{product}': + get: + description:

Retrieves the details of a Climate product with the given ID.

+ operationId: GetClimateProductsProduct + 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: product + 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/climate.product' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/climate/suppliers: + get: + description:

Lists all available Climate supplier objects.

+ operationId: GetClimateSuppliers + 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/climate.supplier' + 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/climate/suppliers + type: string + required: + - data + - has_more + - object + - url + title: ClimateRemovalsSuppliersList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/climate/suppliers/{supplier}': + get: + description:

Retrieves a Climate supplier object.

+ operationId: GetClimateSuppliersSupplier + 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: supplier + 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/climate.supplier' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/confirmation_tokens/{confirmation_token}': + get: + description:

Retrieves an existing ConfirmationToken object

+ operationId: GetConfirmationTokensConfirmationToken + parameters: + - in: path + name: confirmation_token + 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/confirmation_token' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/country_specs: + get: + description:

Lists all Country Spec objects available in the API.

+ operationId: GetCountrySpecs + 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/country_spec' + 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/country_specs + type: string + required: + - data + - has_more + - object + - url + title: CountrySpecList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/country_specs/{country}': + get: + description:

Returns a Country Spec for a given Country code.

+ operationId: GetCountrySpecsCountry + parameters: + - in: path + name: country + 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/country_spec' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/coupons: + get: + description:

Returns a list of your coupons.

+ operationId: GetCoupons + 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 @@ -53086,26 +60387,48 @@ paths: operationId: GetCreditNotes parameters: - description: >- - Only return credit notes 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. + Only return credit notes that were created during the given date + interval. + explode: true in: query - name: ending_before + name: created required: false schema: - maxLength: 5000 + 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 credit notes 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. @@ -53303,6 +60626,27 @@ paths: type: string quantity: type: integer + tax_amounts: + anyOf: + - items: + properties: + amount: + type: integer + tax_rate: + maxLength: 5000 + type: string + taxable_amount: + type: integer + required: + - amount + - tax_rate + - taxable_amount + title: tax_amount_with_tax_rate_param + type: object + type: array + - enum: + - '' + type: string tax_rates: anyOf: - items: @@ -53466,6 +60810,27 @@ paths: type: string quantity: type: integer + tax_amounts: + anyOf: + - items: + properties: + amount: + type: integer + tax_rate: + maxLength: 5000 + type: string + taxable_amount: + type: integer + required: + - amount + - tax_rate + - taxable_amount + title: tax_amount_with_tax_rate_param + type: object + type: array + - enum: + - '' + type: string tax_rates: anyOf: - items: @@ -53689,6 +61054,27 @@ paths: type: string quantity: type: integer + tax_amounts: + anyOf: + - items: + properties: + amount: + type: integer + tax_rate: + maxLength: 5000 + type: string + taxable_amount: + type: integer + required: + - amount + - tax_rate + - taxable_amount + title: tax_amount_with_tax_rate_param + type: object + type: array + - enum: + - '' + type: string tax_rates: anyOf: - items: @@ -54125,6 +61511,79 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. + /v1/customer_sessions: + post: + description: >- +

Creates a customer session object that includes a single-use client + secret that you can use on your front-end to grant client-side API + access for certain customer resources.

+ operationId: PostCustomerSessions + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + components: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + components: + description: >- + Configuration for each component. Exactly 1 component must + be enabled. + properties: + buy_button: + properties: + enabled: + type: boolean + required: + - enabled + title: buy_button_param + type: object + pricing_table: + properties: + enabled: + type: boolean + required: + - enabled + title: pricing_table_param + type: object + title: components + type: object + customer: + description: >- + The ID of an existing customer for which to create the + customer session. + maxLength: 5000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + required: + - components + - customer + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/customer_session' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. /v1/customers: get: description: >- @@ -54132,7 +61591,10 @@ paths: by creation date, with the most recent customers appearing first.

operationId: GetCustomers parameters: - - explode: true + - description: >- + Only return customers that were created during the given date + interval. + explode: true in: query name: created required: false @@ -54397,10 +61859,10 @@ paths: - items: properties: name: - maxLength: 30 + maxLength: 40 type: string value: - maxLength: 30 + maxLength: 140 type: string required: - name @@ -54473,7 +61935,7 @@ paths: type: array promotion_code: description: >- - The API ID of a promotion code to apply to the customer. The + The 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. @@ -54534,6 +61996,11 @@ paths: - enum: - '' type: string + validate_location: + enum: + - deferred + - immediately + type: string title: tax_param type: object tax_exempt: @@ -54597,6 +62064,7 @@ paths: - my_itn - my_sst - no_vat + - no_voec - nz_gst - pe_ruc - ph_tin @@ -55130,10 +62598,10 @@ paths: - items: properties: name: - maxLength: 30 + maxLength: 40 type: string value: - maxLength: 30 + maxLength: 140 type: string required: - name @@ -55203,7 +62671,7 @@ paths: type: array promotion_code: description: >- - The API ID of a promotion code to apply to the customer. The + The 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. @@ -55264,6 +62732,11 @@ paths: - enum: - '' type: string + validate_location: + enum: + - deferred + - immediately + type: string title: tax_param type: object tax_exempt: @@ -57354,14 +64827,17 @@ paths: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -58231,6 +65707,9 @@ paths: add_invoice_items: explode: true style: deepObject + application_fee_percent: + explode: true + style: deepObject automatic_tax: explode: true style: deepObject @@ -58240,9 +65719,15 @@ paths: default_tax_rates: explode: true style: deepObject + discounts: + explode: true + style: deepObject expand: explode: true style: deepObject + invoice_settings: + explode: true + style: deepObject items: explode: true style: deepObject @@ -58274,6 +65759,21 @@ paths: You may pass up to 20 items. items: properties: + discounts: + 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 price: maxLength: 5000 type: string @@ -58315,6 +65815,11 @@ paths: type: object type: array application_fee_percent: + anyOf: + - type: number + - enum: + - '' + type: string description: >- A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the @@ -58324,7 +65829,6 @@ paths: 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 @@ -58333,6 +65837,19 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_config @@ -58348,12 +65865,13 @@ paths: type: integer billing_cycle_anchor: description: >- - A future timestamp to anchor the subscription's [billing + A future timestamp in UTC format 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. + The anchor is the reference point that aligns future billing + cycle dates. It sets the day of week for `week` intervals, + the day of month for `month` and `year` intervals, and the + month of year for `year` intervals. format: unix-time type: integer x-stripeBypassValidation: true @@ -58404,7 +65922,9 @@ paths: 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. + for that particular subscription. This field has been + deprecated and will be removed in a future API version. Use + `discounts` instead. maxLength: 5000 type: string currency: @@ -58456,12 +65976,62 @@ paths: 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. + 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 to redeem into discounts for the subscription. + If not specified or empty, inherits the discount from the + subscription's customer. expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + invoice_settings: + description: All invoices will be billed using the specified settings. + properties: + account_tax_ids: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + title: invoice_settings_param + type: object items: description: >- A list of up to 20 subscription items, each with an attached @@ -58480,6 +66050,25 @@ paths: - enum: - '' 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 metadata: additionalProperties: type: string @@ -58567,13 +66156,13 @@ paths: `collection_method=charge_automatically`. - 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 + Use `allow_incomplete` to create Subscriptions with + `status=incomplete` if the first invoice can't be paid. + Creating Subscriptions with this status allows you to manage + scenarios where additional customer 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. @@ -58581,34 +66170,35 @@ paths: 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 + `status=active` when successfully confirming the + PaymentIntent on the first invoice. This allows simpler + management of scenarios where additional customer 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`, + the PaymentIntent 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 + HTTP 402 status code if a subscription's first invoice can't + be paid. For example, if a payment method requires 3DS + authentication due to SCA regulation and further customer + action is needed, this parameter doesn't 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. + be passed when creating a Subscription. Subscriptions with `collection_method=send_invoice` are - automatically activated regardless of the first invoice + automatically activated regardless of the first Invoice status. enum: - allow_incomplete @@ -58699,6 +66289,7 @@ paths: enum: - any - automatic + - challenge type: string title: subscription_payment_method_options_param type: object @@ -58738,6 +66329,14 @@ paths: - enum: - '' type: string + sepa_debit: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string us_bank_account: anyOf: - properties: @@ -58758,6 +66357,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -58791,12 +66391,14 @@ paths: - card - cashapp - customer_balance + - eps - fpx - giropay - grabpay - ideal - konbini - link + - p24 - paynow - paypal - promptpay @@ -58843,16 +66445,17 @@ paths: 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. + The 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. This + field has been deprecated and will be removed in a future + API version. Use `discounts` instead. maxLength: 5000 type: string proration_behavior: description: >- Determines how to handle - [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. enum: @@ -59114,6 +66717,9 @@ paths: add_invoice_items: explode: true style: deepObject + application_fee_percent: + explode: true + style: deepObject automatic_tax: explode: true style: deepObject @@ -59132,9 +66738,15 @@ paths: default_tax_rates: explode: true style: deepObject + discounts: + explode: true + style: deepObject expand: explode: true style: deepObject + invoice_settings: + explode: true + style: deepObject items: explode: true style: deepObject @@ -59169,6 +66781,21 @@ paths: You may pass up to 20 items. items: properties: + discounts: + 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 price: maxLength: 5000 type: string @@ -59210,6 +66837,11 @@ paths: type: object type: array application_fee_percent: + anyOf: + - type: number + - enum: + - '' + type: string description: >- A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the @@ -59219,7 +66851,6 @@ paths: 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 @@ -59228,6 +66859,19 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_config @@ -59319,7 +66963,9 @@ paths: 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. + for that particular subscription. This field has been + deprecated and will be removed in a future API version. Use + `discounts` instead. maxLength: 5000 type: string days_until_due: @@ -59369,12 +67015,62 @@ paths: 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. + 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 to redeem into discounts for the subscription. + If not specified or empty, inherits the discount from the + subscription's customer. expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + invoice_settings: + description: All invoices will be billed using the specified settings. + properties: + account_tax_ids: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + title: invoice_settings_param + type: object items: description: >- A list of up to 20 subscription items, each with an attached @@ -59397,6 +67093,25 @@ paths: type: boolean deleted: type: boolean + 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 id: maxLength: 5000 type: string @@ -59506,7 +67221,10 @@ paths: type: string description: >- If specified, payment collection for this subscription will - be paused. + be paused. Note that the subscription status will be + unchanged and will not be updated to `paused`. Learn more + about [pausing + collection](/billing/subscriptions/pause-payment). payment_behavior: description: >- Use `allow_incomplete` to transition the subscription to @@ -59635,6 +67353,7 @@ paths: enum: - any - automatic + - challenge type: string title: subscription_payment_method_options_param type: object @@ -59674,6 +67393,14 @@ paths: - enum: - '' type: string + sepa_debit: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string us_bank_account: anyOf: - properties: @@ -59694,6 +67421,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -59727,12 +67455,14 @@ paths: - card - cashapp - customer_balance + - eps - fpx - giropay - grabpay - ideal - konbini - link + - p24 - paynow - paypal - promptpay @@ -59787,7 +67517,7 @@ paths: proration_behavior: description: >- Determines how to handle - [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + [prorations](https://stripe.com/docs/billing/subscriptions/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. The default value is @@ -60130,11 +67860,11 @@ paths: `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`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, - `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, - `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, - `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, - `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, - or `za_vat` + `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, + `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, + `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, + `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, + `vn_tin`, or `za_vat` enum: - ad_nrt - ae_trn @@ -60181,6 +67911,7 @@ paths: - my_itn - my_sst - no_vat + - no_voec - nz_gst - pe_ruc - ph_tin @@ -60834,7 +68565,8 @@ paths: Stripe-Version header).

operationId: GetEvents parameters: - - explode: true + - description: Only return events that were created during the given date interval. + explode: true in: query name: created required: false @@ -61194,7 +68926,8 @@ paths: description:

Returns a list of file links.

operationId: GetFileLinks parameters: - - explode: true + - description: Only return links that were created during the given date interval. + explode: true in: query name: created required: false @@ -61317,7 +69050,7 @@ paths: - has_more - object - url - title: FileFileLinkList + title: FileResourceFileLinkList type: object x-expandableFields: - data @@ -61529,7 +69262,8 @@ paths: recently created files at the top.

operationId: GetFiles parameters: - - explode: true + - description: Only return files that were created during the given date interval. + explode: true in: query name: created required: false @@ -61663,7 +69397,7 @@ paths: - has_more - object - url - title: FileFileList + title: FileResourceFileList type: object x-expandableFields: - data @@ -62207,6 +69941,127 @@ paths: enum: - balance - ownership + - transactions + 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/accounts/{account}/subscribe': + post: + description: >- +

Subscribes to periodic refreshes of data associated with a Financial + Connections Account.

+ operationId: PostFinancialConnectionsAccountsAccountSubscribe + 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 + 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 + features: + description: >- + The list of account features to which you would like to + subscribe. + items: + enum: + - transactions + 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/accounts/{account}/unsubscribe': + post: + description: >- +

Unsubscribes from periodic refreshes of data associated with a + Financial Connections Account.

+ operationId: PostFinancialConnectionsAccountsAccountUnsubscribe + 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 + 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 + features: + description: >- + The list of account features from which you would like to + unsubscribe. + items: + enum: + - transactions type: string x-stripeBypassValidation: true type: array @@ -62318,6 +70173,7 @@ paths: enum: - balances - ownership + - transactions type: string x-stripeBypassValidation: true type: array @@ -62393,30 +70249,21 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/identity/verification_reports: + /v1/financial_connections/transactions: get: - description:

List all verification reports.

- operationId: GetIdentityVerificationReports + description: >- +

Returns a list of Financial Connections Transaction + objects.

+ operationId: GetFinancialConnectionsTransactions parameters: - - explode: true + - description: The ID of the Stripe account whose transactions will be retrieved. in: query - name: created - required: false + name: account + 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 + 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 @@ -62463,27 +70310,46 @@ paths: maxLength: 5000 type: string style: form - - description: Only return VerificationReports of this type + - description: >- + A filter on the list based on the object `transacted_at` field. The + value can be a string with an integer Unix timestamp, or it can be a + dictionary with the following options: + explode: true in: query - name: type + name: transacted_at required: false schema: - enum: - - document - - id_number - type: string - x-stripeBypassValidation: true - style: form + 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 VerificationReports created by this VerificationSession - ID. It is allowed to provide a VerificationIntent ID. + A filter on the list based on the object `transaction_refresh` + field. The value can be a dictionary with the following options: + explode: true in: query - name: verification_session + name: transaction_refresh required: false schema: - maxLength: 5000 - type: string - style: form + properties: + after: + maxLength: 5000 + type: string + required: + - after + title: transaction_refresh_params + type: object + style: deepObject requestBody: content: application/x-www-form-urlencoded: @@ -62501,8 +70367,9 @@ paths: description: '' properties: data: + description: Details about each object. items: - $ref: '#/components/schemas/identity.verification_report' + $ref: '#/components/schemas/financial_connections.transaction' type: array has_more: description: >- @@ -62519,14 +70386,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: ^/v1/identity/verification_reports + pattern: ^/v1/financial_connections/transactions type: string required: - data - has_more - object - url - title: GelatoVerificationReportList + title: BankConnectionsResourceTransactionList type: object x-expandableFields: - data @@ -62537,10 +70404,12 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/identity/verification_reports/{report}': + '/v1/financial_connections/transactions/{transaction}': get: - description:

Retrieves an existing VerificationReport

- operationId: GetIdentityVerificationReportsReport + description: >- +

Retrieves the details of a Financial Connections + Transaction

+ operationId: GetFinancialConnectionsTransactionsTransaction parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -62554,7 +70423,7 @@ paths: type: array style: deepObject - in: path - name: report + name: transaction required: true schema: maxLength: 5000 @@ -62574,7 +70443,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/identity.verification_report' + $ref: '#/components/schemas/financial_connections.transaction' description: Successful response. default: content: @@ -62582,36 +70451,515 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/identity/verification_sessions: + /v1/forwarding/requests: get: - description:

Returns a list of VerificationSessions

- operationId: GetIdentityVerificationSessions + description:

Lists all ForwardingRequest objects.

+ operationId: GetForwardingRequests parameters: - - explode: true + - description: >- + Similar to other List endpoints, filters results based on created + timestamp. You can pass gt, gte, lt, and lte timestamp values. + 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 + properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: created_param + 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. + A pagination cursor to fetch the previous page of the list. The + value must be a ForwardingRequest ID. + 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 pagination cursor to fetch the next page of the list. The value + must be a ForwardingRequest ID. + 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: List of ForwardingRequest data. + properties: + data: + items: + $ref: '#/components/schemas/forwarding.request' + 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: ForwardingRequestList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + post: + description:

Creates a ForwardingRequest object.

+ operationId: PostForwardingRequests + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + replacements: + explode: true + style: deepObject + request: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + config: + description: >- + The Forwarding Config used when making the forwarded + request. The config specifes the HTTP method, merchant + credentials, connection settings, and supported destination + URLs. + maxLength: 5000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + payment_method: + description: >- + The PaymentMethod to insert into the forwarded request. + Forwarding previously consumed PaymentMethods is allowed. + maxLength: 5000 + type: string + replacements: + description: The field kinds to be replaced in the forwarded request. + items: + enum: + - card_cvc + - card_expiry + - card_number + - cardholder_name + type: string + type: array + request: + description: >- + The request body and headers to be sent to the destination + endpoint. + properties: + body: + maxLength: 5000 + type: string + headers: + items: + properties: + name: + maxLength: 5000 + type: string + value: + maxLength: 5000 + type: string + required: + - name + - value + title: header_param + type: object + type: array + title: request_param + type: object + url: + description: >- + The destination URL for the forwarded request. Must be + supported by the config. + maxLength: 5000 + type: string + required: + - config + - payment_method + - replacements + - url + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/forwarding.request' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/forwarding/requests/{id}': + get: + description:

Retrieves a ForwardingRequest object.

+ operationId: GetForwardingRequestsId + 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/forwarding.request' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/identity/verification_reports: + get: + description:

List all verification reports.

+ operationId: GetIdentityVerificationReports + parameters: + - description: >- + A string to reference this user. This can be a customer ID, a + session ID, or similar, and can be used to reconcile this + verification with your internal systems. + in: query + name: client_reference_id + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: >- + Only return VerificationReports 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 VerificationReports of this type + in: query + name: type + required: false + schema: + enum: + - document + - id_number + type: string + x-stripeBypassValidation: true + style: form + - description: >- + Only return VerificationReports created by this VerificationSession + ID. It is allowed to provide a VerificationIntent ID. + in: query + name: verification_session + 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/identity.verification_report' + 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/identity/verification_reports + type: string + required: + - data + - has_more + - object + - url + title: GelatoVerificationReportList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/identity/verification_reports/{report}': + get: + description:

Retrieves an existing VerificationReport

+ operationId: GetIdentityVerificationReportsReport + 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 + 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/identity.verification_report' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/identity/verification_sessions: + get: + description:

Returns a list of VerificationSessions

+ operationId: GetIdentityVerificationSessions + parameters: + - description: >- + A string to reference this user. This can be a customer ID, a + session ID, or similar, and can be used to reconcile this + verification with your internal systems. + in: query + name: client_reference_id + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: >- + Only return VerificationSessions 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 @@ -62751,9 +71099,19 @@ paths: options: explode: true style: deepObject + provided_details: + explode: true + style: deepObject schema: additionalProperties: false properties: + client_reference_id: + description: >- + A string to reference this user. This can be a customer ID, + a session ID, or similar, and can be used to reconcile this + verification with your internal systems. + maxLength: 5000 + type: string expand: description: Specifies which fields in the response should be expanded. items: @@ -62797,8 +71155,39 @@ paths: - enum: - '' type: string + email: + anyOf: + - properties: + require_verification: + type: boolean + title: email_options + type: object + - enum: + - '' + type: string + phone: + anyOf: + - properties: + require_verification: + type: boolean + title: phone_options + type: object + - enum: + - '' + type: string title: session_options_param type: object + provided_details: + description: >- + Details provided about the user being verified. These + details may be shown to the user. + properties: + email: + type: string + phone: + type: string + title: provided_details_param + type: object return_url: description: >- The URL that the user will be redirected to upon completing @@ -62814,10 +71203,12 @@ paths: - id_number type: string x-stripeBypassValidation: true - required: - - type + verification_flow: + description: The ID of a Verification Flow from the Dashboard. + maxLength: 5000 + type: string type: object - required: true + required: false responses: '200': content: @@ -62916,6 +71307,9 @@ paths: options: explode: true style: deepObject + provided_details: + explode: true + style: deepObject schema: additionalProperties: false properties: @@ -62962,8 +71356,39 @@ paths: - enum: - '' type: string + email: + anyOf: + - properties: + require_verification: + type: boolean + title: email_options + type: object + - enum: + - '' + type: string + phone: + anyOf: + - properties: + require_verification: + type: boolean + title: phone_options + type: object + - enum: + - '' + type: string title: session_options_param type: object + provided_details: + description: >- + Details provided about the user being verified. These + details may be shown to the user. + properties: + email: + type: string + phone: + type: string + title: provided_details_param + type: object type: description: >- The type of [verification @@ -63135,7 +71560,10 @@ paths: appearing first.

operationId: GetInvoiceitems parameters: - - explode: true + - description: >- + Only return invoice items that were created during the given date + interval. + explode: true in: query name: created required: false @@ -63361,6 +71789,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -63368,8 +71799,8 @@ paths: - '' type: string description: >- - The coupons to redeem into discounts for the invoice item or - invoice line item. + The coupons and promotion codes to redeem into discounts for + the invoice item or invoice line item. expand: description: Specifies which fields in the response should be expanded. items: @@ -63686,6 +72117,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -63693,10 +72127,10 @@ paths: - '' type: string 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. + The coupons, promotion codes & 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. expand: description: Specifies which fields in the response should be expanded. items: @@ -63861,7 +72295,10 @@ paths: - send_invoice type: string style: form - - explode: true + - description: >- + Only return invoices that were created during the given date + interval. + explode: true in: query name: created required: false @@ -64022,7 +72459,7 @@ paths: - has_more - object - url - title: InvoicesList + title: InvoicesResourceList type: object x-expandableFields: - data @@ -64066,6 +72503,9 @@ paths: from_invoice: explode: true style: deepObject + issuer: + explode: true + style: deepObject metadata: explode: true style: deepObject @@ -64075,9 +72515,6 @@ paths: rendering: explode: true style: deepObject - rendering_options: - explode: true - style: deepObject shipping_cost: explode: true style: deepObject @@ -64123,6 +72560,19 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_param @@ -64149,10 +72599,10 @@ paths: - items: properties: name: - maxLength: 30 + maxLength: 40 type: string value: - maxLength: 30 + maxLength: 140 type: string required: - name @@ -64218,6 +72668,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -64225,10 +72678,10 @@ paths: - '' type: 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. + The coupons and promotion codes 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. due_date: description: >- The date on which payment for this invoice is due. Valid @@ -64273,6 +72726,23 @@ paths: - invoice title: from_invoice type: object + issuer: + description: >- + The connected account that issues the invoice. The invoice + is presented with the branding and support information of + the specified account. + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object metadata: anyOf: - additionalProperties: @@ -64289,6 +72759,19 @@ paths: format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + number: + description: >- + Set the number for this invoice. If no number is present + then a number will be assigned automatically when the + invoice is finalized. In many markets, regulations require + invoices to be unique, sequential and / or gapless. You are + responsible for ensuring this is true across all your + different invoicing systems in the event that you edit the + invoice number using our API. If you use only Stripe for + your invoices and do not change invoice numbers, Stripe + handles this aspect of compliance for you automatically. + maxLength: 26 + type: string on_behalf_of: description: >- The account (if any) for which the funds of the invoice @@ -64386,6 +72869,7 @@ paths: enum: - any - automatic + - challenge type: string title: invoice_payment_method_options_param type: object @@ -64425,6 +72909,14 @@ paths: - enum: - '' type: string + sepa_debit: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string us_bank_account: anyOf: - properties: @@ -64445,6 +72937,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -64478,12 +72971,14 @@ paths: - card - cashapp - customer_balance + - eps - fpx - giropay - grabpay - ideal - konbini - link + - p24 - paynow - paypal - promptpay @@ -64501,18 +72996,13 @@ paths: 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. + How to handle pending invoice items on invoice creation. + Defaults to `exclude` if the parameter is omitted. enum: - exclude - include - - include_and_require type: string + x-stripeBypassValidation: true rendering: description: >- The rendering-related settings that control how the invoice @@ -64537,21 +73027,6 @@ paths: type: object title: rendering_param 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. shipping_cost: description: Settings for the cost of shipping for this invoice. properties: @@ -64875,14 +73350,12 @@ paths:

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

+ should pass the subscription_proration_date parameter when + doing the actual subscription update. The recommended way to get only + the prorations being previewed is to consider only proration line items + where period[start] is equal to the + subscription_proration_date value passed in the + request.

operationId: GetInvoicesUpcoming parameters: - description: Settings for automatic tax lookup for this invoice preview. @@ -64894,19 +73367,28 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_param type: object style: deepObject - description: >- - 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. + The ID of the coupon to apply to this phase of the subscription + schedule. This field has been deprecated and will be removed in a + future API version. Use `discounts` instead. in: query name: coupon required: false @@ -65077,6 +73559,7 @@ paths: - my_itn - my_sst - no_vat + - no_voec - nz_gst - pe_ruc - ph_tin @@ -65114,12 +73597,10 @@ paths: style: deepObject - description: >- 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. + specified, inherits the discount from the subscription or customer. + This works for both coupons directly applied to an invoice and + coupons applied to a subscription. Pass an empty string to avoid + inheriting any discounts. explode: true in: query name: discounts @@ -65134,6 +73615,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -65181,6 +73665,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -65269,6 +73756,45 @@ paths: type: object type: array style: deepObject + - description: >- + The connected account that issues the invoice. The invoice is + presented with the branding and support information of the specified + account. + explode: true + in: query + name: issuer + required: false + schema: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + style: deepObject + - 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. + explode: true + in: query + name: on_behalf_of + required: false + schema: + anyOf: + - type: string + - enum: + - '' + type: string + style: deepObject - description: >- The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. @@ -65316,9 +73842,11 @@ paths: type: integer style: deepObject - description: >- - 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`. + 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. explode: true in: query name: subscription_cancel_at @@ -65391,6 +73919,25 @@ paths: type: boolean deleted: type: boolean + 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 id: maxLength: 5000 type: string @@ -65461,7 +74008,7 @@ paths: style: deepObject - description: >- Determines how to handle - [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + [prorations](https://stripe.com/docs/billing/subscriptions/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. The default value is `create_prorations`. @@ -65504,7 +74051,7 @@ paths: maxLength: 5000 type: string style: form - - description: Date a subscription is intended to start (can be future or past) + - description: Date a subscription is intended to start (can be future or past). in: query name: subscription_start_date required: false @@ -65583,19 +74130,28 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_param type: object style: deepObject - description: >- - 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. + The ID of the coupon to apply to this phase of the subscription + schedule. This field has been deprecated and will be removed in a + future API version. Use `discounts` instead. in: query name: coupon required: false @@ -65766,6 +74322,7 @@ paths: - my_itn - my_sst - no_vat + - no_voec - nz_gst - pe_ruc - ph_tin @@ -65803,12 +74360,10 @@ paths: style: deepObject - description: >- 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. + specified, inherits the discount from the subscription or customer. + This works for both coupons directly applied to an invoice and + coupons applied to a subscription. Pass an empty string to avoid + inheriting any discounts. explode: true in: query name: discounts @@ -65823,6 +74378,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -65883,6 +74441,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -65971,6 +74532,28 @@ paths: type: object type: array style: deepObject + - description: >- + The connected account that issues the invoice. The invoice is + presented with the branding and support information of the specified + account. + explode: true + in: query + name: issuer + required: false + schema: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + 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. @@ -65980,6 +74563,23 @@ paths: schema: type: integer style: form + - 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. + explode: true + in: query + name: on_behalf_of + required: false + schema: + anyOf: + - type: string + - enum: + - '' + type: string + style: deepObject - description: >- The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. @@ -66040,9 +74640,11 @@ paths: type: integer style: deepObject - description: >- - 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`. + 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. explode: true in: query name: subscription_cancel_at @@ -66115,6 +74717,25 @@ paths: type: boolean deleted: type: boolean + 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 id: maxLength: 5000 type: string @@ -66185,7 +74806,7 @@ paths: style: deepObject - description: >- Determines how to handle - [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + [prorations](https://stripe.com/docs/billing/subscriptions/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. The default value is `create_prorations`. @@ -66228,7 +74849,7 @@ paths: maxLength: 5000 type: string style: form - - description: Date a subscription is intended to start (can be future or past) + - description: Date a subscription is intended to start (can be future or past). in: query name: subscription_start_date required: false @@ -66456,9 +75077,15 @@ paths: expand: explode: true style: deepObject + issuer: + explode: true + style: deepObject metadata: explode: true style: deepObject + number: + explode: true + style: deepObject on_behalf_of: explode: true style: deepObject @@ -66468,9 +75095,6 @@ paths: rendering: explode: true style: deepObject - rendering_options: - explode: true - style: deepObject shipping_cost: explode: true style: deepObject @@ -66515,6 +75139,19 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_param @@ -66532,10 +75169,10 @@ paths: - items: properties: name: - maxLength: 30 + maxLength: 40 type: string value: - maxLength: 30 + maxLength: 140 type: string required: - name @@ -66610,6 +75247,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -66648,6 +75288,23 @@ paths: description: Footer to be displayed on the invoice. maxLength: 5000 type: string + issuer: + description: >- + The connected account that issues the invoice. The invoice + is presented with the branding and support information of + the specified account. + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object metadata: anyOf: - additionalProperties: @@ -66664,6 +75321,23 @@ paths: format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + number: + anyOf: + - maxLength: 26 + type: string + - enum: + - '' + type: string + description: >- + Set the number for this invoice. If no number is present + then a number will be assigned automatically when the + invoice is finalized. In many markets, regulations require + invoices to be unique, sequential and / or gapless. You are + responsible for ensuring this is true across all your + different invoicing systems in the event that you edit the + invoice number using our API. If you use only Stripe for + your invoices and do not change invoice numbers, Stripe + handles this aspect of compliance for you automatically. on_behalf_of: anyOf: - type: string @@ -66765,6 +75439,7 @@ paths: enum: - any - automatic + - challenge type: string title: invoice_payment_method_options_param type: object @@ -66804,6 +75479,14 @@ paths: - enum: - '' type: string + sepa_debit: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string us_bank_account: anyOf: - properties: @@ -66824,6 +75507,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -66857,12 +75541,14 @@ paths: - card - cashapp - customer_balance + - eps - fpx - giropay - grabpay - ideal - konbini - link + - p24 - paynow - paypal - promptpay @@ -66902,21 +75588,6 @@ paths: type: object title: rendering_param 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. shipping_cost: anyOf: - properties: @@ -67277,6 +75948,312 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. + '/v1/invoices/{invoice}/lines/{line_item_id}': + post: + description: >- +

Updates an invoice’s line item. Some fields, such as + tax_amounts, only live on the invoice line item, + + so they can only be updated through this endpoint. Other fields, such as + amount, live on both the invoice + + item and the invoice line item, so updates on this endpoint will + propagate to the invoice item as well. + + Updating an invoice’s line item is only possible before the invoice is + finalized.

+ operationId: PostInvoicesInvoiceLinesLineItemId + parameters: + - description: Invoice ID of line item + in: path + name: invoice + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: Invoice line item ID + in: path + name: line_item_id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + discounts: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + period: + explode: true + style: deepObject + price_data: + explode: true + style: deepObject + tax_amounts: + explode: true + style: deepObject + tax_rates: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + 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 + item. The description is displayed in the invoice for easy + tracking. + maxLength: 5000 + type: string + discountable: + description: >- + Controls whether discounts apply to this line item. Defaults + to false for prorations or negative line items, and true for + all other line items. Cannot be set to true for prorations. + type: boolean + 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 & existing discounts which + apply to the line item. Item discounts are applied before + invoice discounts. Pass an empty string to remove + previously-defined discounts. + 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`. + period: + description: >- + The period associated with this invoice item. When set to + different values, the period will be rendered on the + invoice. If you have [Stripe Revenue + Recognition](https://stripe.com/docs/revenue-recognition) + enabled, the period will be used to recognize and defer + revenue. See the [Revenue Recognition + documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) + for details. + properties: + end: + format: unix-time + type: integer + start: + format: unix-time + type: integer + required: + - end + - start + title: period + type: object + 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 + product_data: + properties: + description: + maxLength: 40000 + type: string + images: + items: + type: string + type: array + metadata: + additionalProperties: + type: string + type: object + name: + maxLength: 5000 + type: string + tax_code: + maxLength: 5000 + type: string + required: + - name + title: product_data + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + title: one_time_price_data_with_product_data + type: object + quantity: + description: >- + Non-negative integer. The quantity of units for the line + item. + type: integer + tax_amounts: + anyOf: + - items: + properties: + amount: + type: integer + tax_rate_data: + properties: + country: + maxLength: 5000 + type: string + description: + maxLength: 5000 + type: string + display_name: + maxLength: 50 + type: string + inclusive: + type: boolean + jurisdiction: + maxLength: 50 + type: string + percentage: + type: number + state: + maxLength: 2 + type: string + tax_type: + enum: + - amusement_tax + - communications_tax + - gst + - hst + - igst + - jct + - lease_tax + - pst + - qst + - rst + - sales_tax + - vat + type: string + x-stripeBypassValidation: true + required: + - display_name + - inclusive + - percentage + title: tax_rate_data_param + type: object + taxable_amount: + type: integer + required: + - amount + - tax_rate_data + - taxable_amount + title: tax_amount_param + type: object + type: array + - enum: + - '' + type: string + description: >- + A list of up to 10 tax amounts for this line item. This can + be useful if you calculate taxes on your own or use a + third-party to calculate them. You cannot set tax amounts if + any line item has + [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) + or if the invoice has + [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) + or uses [automatic + tax](https://stripe.com/docs/tax/invoicing). Pass an empty + string to remove previously defined tax amounts. + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + description: >- + The tax rates which apply to the line item. When set, the + `default_tax_rates` on the invoice do not apply to this line + item. Pass an empty string to remove previously-defined tax + rates. + type: object + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/line_item' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. '/v1/invoices/{invoice}/mark_uncollectible': post: description: >- @@ -67490,6 +76467,14 @@ paths: invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

+ + +

Consult with local regulations to determine whether and how an + invoice might be amended, canceled, or voided in the jurisdiction you’re + doing business in. You might need to issue + another invoice or credit note + instead. Stripe recommends that you consult with your legal counsel for + advice specific to your business.

operationId: PostInvoicesInvoiceVoid parameters: - in: path @@ -67799,6 +76784,7 @@ paths: description: Error response. '/v1/issuing/authorizations/{authorization}/approve': post: + deprecated: true description: >-

[Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the -

[Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the - A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a @@ -70712,6 +79726,12 @@ paths: metadata: explode: true style: deepObject + pin: + explode: true + style: deepObject + second_line: + explode: true + style: deepObject shipping: explode: true style: deepObject @@ -70751,6 +79771,18 @@ paths: value to them. All keys can be unset by posting an empty value to `metadata`. type: object + personalization_design: + description: The personalization design object belonging to this card. + maxLength: 5000 + type: string + pin: + description: The desired PIN for this card. + properties: + encrypted_number: + maxLength: 5000 + type: string + title: encrypted_pin_param + type: object replacement_for: description: The card this is meant to be a replacement for (if any). maxLength: 5000 @@ -70766,6 +79798,14 @@ paths: - stolen type: string x-stripeBypassValidation: true + second_line: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + description: The second line to print on the card. shipping: description: The address where the card will be shipped. properties: @@ -71142,6 +80182,11 @@ paths: maxLength: 5000 type: string type: array + allowed_merchant_countries: + items: + maxLength: 5000 + type: string + type: array blocked_categories: items: enum: @@ -71451,6 +80496,11 @@ paths: maxLength: 5000 type: string type: array + blocked_merchant_countries: + items: + maxLength: 5000 + type: string + type: array spending_limits: items: properties: @@ -71931,6 +80981,9 @@ paths: format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + personalization_design: + maxLength: 5000 + type: string pin: description: The desired new PIN for this card. properties: @@ -72254,6 +81307,11 @@ paths: maxLength: 5000 type: string type: array + allowed_merchant_countries: + items: + maxLength: 5000 + type: string + type: array blocked_categories: items: enum: @@ -72563,6 +81621,11 @@ paths: maxLength: 5000 type: string type: array + blocked_merchant_countries: + items: + maxLength: 5000 + type: string + type: array spending_limits: items: properties: @@ -72939,7 +82002,7 @@ paths: operationId: GetIssuingDisputes parameters: - description: >- - Select Issuing disputes that were created during the given date + Only return Issuing disputes that were created during the given date interval. explode: true in: query @@ -73988,36 +83051,14 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/issuing/settlements: + /v1/issuing/personalization_designs: 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 +

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

+ operationId: GetIssuingPersonalizationDesigns 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 @@ -74051,6 +83092,31 @@ paths: schema: type: integer style: form + - description: Only return personalization designs with the given lookup keys. + explode: true + in: query + name: lookup_keys + required: false + schema: + items: + maxLength: 200 + type: string + type: array + style: deepObject + - description: Only return personalization designs with the given preferences. + explode: true + in: query + name: preferences + required: false + schema: + properties: + is_default: + type: boolean + is_platform_default: + type: boolean + title: preferences_list_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 @@ -74064,6 +83130,18 @@ paths: maxLength: 5000 type: string style: form + - description: Only return personalization designs with the given status. + in: query + name: status + required: false + schema: + enum: + - active + - inactive + - rejected + - review + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -74082,7 +83160,7 @@ paths: properties: data: items: - $ref: '#/components/schemas/issuing.settlement' + $ref: '#/components/schemas/issuing.personalization_design' type: array has_more: description: >- @@ -74099,14 +83177,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: ^/v1/issuing/settlements + pattern: ^/v1/issuing/personalization_designs type: string required: - data - has_more - object - url - title: IssuingSettlementList + title: IssuingPersonalizationDesignList type: object x-expandableFields: - data @@ -74117,10 +83195,142 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/issuing/settlements/{settlement}': + post: + description:

Creates a personalization design object.

+ operationId: PostIssuingPersonalizationDesigns + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + carrier_text: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + preferences: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + card_logo: + description: >- + The file for the card logo, for use with physical bundles + that support card logos. Must have a `purpose` value of + `issuing_logo`. + type: string + carrier_text: + description: >- + Hash containing carrier text, for use with physical bundles + that support carrier text. + properties: + footer_body: + anyOf: + - maxLength: 200 + type: string + - enum: + - '' + type: string + footer_title: + anyOf: + - maxLength: 30 + type: string + - enum: + - '' + type: string + header_body: + anyOf: + - maxLength: 200 + type: string + - enum: + - '' + type: string + header_title: + anyOf: + - maxLength: 30 + type: string + - enum: + - '' + type: string + title: carrier_text_param + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + lookup_key: + description: >- + A lookup key used to retrieve personalization designs + dynamically from a static string. This may be up to 200 + characters. + maxLength: 200 + 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 + name: + description: Friendly display name. + maxLength: 200 + type: string + physical_bundle: + description: >- + The physical bundle object belonging to this personalization + design. + maxLength: 5000 + type: string + preferences: + description: >- + Information on whether this personalization design is used + to create cards when one is not specified. + properties: + is_default: + type: boolean + required: + - is_default + title: preferences_param + type: object + transfer_lookup_key: + description: >- + If set to true, will atomically remove the lookup key from + the existing personalization design, and assign it to this + personalization design. + type: boolean + required: + - physical_bundle + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/issuing.personalization_design' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/issuing/personalization_designs/{personalization_design}': get: - description:

Retrieves an Issuing Settlement object.

- operationId: GetIssuingSettlementsSettlement + description:

Retrieves a personalization design object.

+ operationId: GetIssuingPersonalizationDesignsPersonalizationDesign parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -74134,7 +83344,7 @@ paths: type: array style: deepObject - in: path - name: settlement + name: personalization_design required: true schema: maxLength: 5000 @@ -74154,7 +83364,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/issuing.settlement' + $ref: '#/components/schemas/issuing.personalization_design' description: Successful response. default: content: @@ -74163,14 +83373,11 @@ 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 a card personalization object.

+ operationId: PostIssuingPersonalizationDesignsPersonalizationDesign parameters: - in: path - name: settlement + name: personalization_design required: true schema: maxLength: 5000 @@ -74180,21 +83387,96 @@ paths: content: application/x-www-form-urlencoded: encoding: + card_logo: + explode: true + style: deepObject + carrier_text: + explode: true + style: deepObject expand: explode: true style: deepObject + lookup_key: + explode: true + style: deepObject metadata: explode: true style: deepObject + name: + explode: true + style: deepObject + preferences: + explode: true + style: deepObject schema: additionalProperties: false properties: + card_logo: + anyOf: + - type: string + - enum: + - '' + type: string + description: >- + The file for the card logo, for use with physical bundles + that support card logos. Must have a `purpose` value of + `issuing_logo`. + carrier_text: + anyOf: + - properties: + footer_body: + anyOf: + - maxLength: 200 + type: string + - enum: + - '' + type: string + footer_title: + anyOf: + - maxLength: 30 + type: string + - enum: + - '' + type: string + header_body: + anyOf: + - maxLength: 200 + type: string + - enum: + - '' + type: string + header_title: + anyOf: + - maxLength: 30 + type: string + - enum: + - '' + type: string + title: carrier_text_param + type: object + - enum: + - '' + type: string + description: >- + Hash containing carrier text, for use with physical bundles + that support carrier text. expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + lookup_key: + anyOf: + - maxLength: 200 + type: string + - enum: + - '' + type: string + description: >- + A lookup key used to retrieve personalization designs + dynamically from a static string. This may be up to 200 + characters. metadata: additionalProperties: type: string @@ -74207,6 +83489,39 @@ paths: value to them. All keys can be unset by posting an empty value to `metadata`. type: object + name: + anyOf: + - maxLength: 200 + type: string + - enum: + - '' + type: string + description: >- + Friendly display name. Providing an empty string will set + the field to null. + physical_bundle: + description: >- + The physical bundle object belonging to this personalization + design. + maxLength: 5000 + type: string + preferences: + description: >- + Information on whether this personalization design is used + to create cards when one is not specified. + properties: + is_default: + type: boolean + required: + - is_default + title: preferences_param + type: object + transfer_lookup_key: + description: >- + If set to true, will atomically remove the lookup key from + the existing personalization design, and assign it to this + personalization design. + type: boolean type: object required: false responses: @@ -74214,7 +83529,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/issuing.settlement' + $ref: '#/components/schemas/issuing.personalization_design' description: Successful response. default: content: @@ -74222,52 +83537,14 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/issuing/transactions: + /v1/issuing/physical_bundles: 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 +

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

+ operationId: GetIssuingPhysicalBundles 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 @@ -74314,16 +83591,25 @@ paths: maxLength: 5000 type: string style: form - - description: >- - Only return transactions that have the given type. One of `capture` - or `refund`. + - description: Only return physical bundles with the given status. + in: query + name: status + required: false + schema: + enum: + - active + - inactive + - review + type: string + style: form + - description: Only return physical bundles with the given type. in: query name: type required: false schema: enum: - - capture - - refund + - custom + - standard type: string style: form requestBody: @@ -74344,7 +83630,7 @@ paths: properties: data: items: - $ref: '#/components/schemas/issuing.transaction' + $ref: '#/components/schemas/issuing.physical_bundle' type: array has_more: description: >- @@ -74361,14 +83647,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: ^/v1/issuing/transactions + pattern: ^/v1/issuing/physical_bundles type: string required: - data - has_more - object - url - title: IssuingTransactionList + title: IssuingPhysicalBundleList type: object x-expandableFields: - data @@ -74379,240 +83665,10 @@ paths: 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 - prefetch: - 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 - required: - - countries - title: filters_params - type: object - 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 - prefetch: - description: >- - List of data features that you would like to retrieve upon - account creation. - items: - enum: - - balances - - ownership - 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: - - 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}': + '/v1/issuing/physical_bundles/{physical_bundle}': get: - description: >- -

Retrieves the details of a Financial Connections - Session

- operationId: GetLinkAccountSessionsSession + description:

Retrieves a physical bundle object.

+ operationId: GetIssuingPhysicalBundlesPhysicalBundle parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -74626,7 +83682,7 @@ paths: type: array style: deepObject - in: path - name: session + name: physical_bundle required: true schema: maxLength: 5000 @@ -74646,7 +83702,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/financial_connections.session' + $ref: '#/components/schemas/issuing.physical_bundle' description: Successful response. default: content: @@ -74654,31 +83710,35 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/linked_accounts: + /v1/issuing/settlements: get: description: >- -

Returns a list of Financial Connections Account - objects.

- operationId: GetLinkedAccounts +

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: >- - If present, only return accounts that belong to the specified - account holder. `account_holder[customer]` and - `account_holder[account]` are mutually exclusive. + Only return issuing settlements that were created during the given + date interval. explode: true in: query - name: account_holder + name: created required: false schema: - properties: - account: - maxLength: 5000 - type: string - customer: - maxLength: 5000 - type: string - title: accountholder_params - type: object + 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 @@ -74713,16 +83773,6 @@ paths: 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 @@ -74753,9 +83803,8 @@ paths: description: '' properties: data: - description: Details about each object. items: - $ref: '#/components/schemas/financial_connections.account' + $ref: '#/components/schemas/issuing.settlement' type: array has_more: description: >- @@ -74772,14 +83821,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: ^/v1/financial_connections/accounts + pattern: ^/v1/issuing/settlements type: string required: - data - has_more - object - url - title: BankConnectionsResourceLinkedAccountList + title: IssuingSettlementList type: object x-expandableFields: - data @@ -74790,20 +83839,11 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/linked_accounts/{account}': + '/v1/issuing/settlements/{settlement}': get: - description: >- -

Retrieves the details of an Financial Connections - Account.

- operationId: GetLinkedAccountsAccount + description:

Retrieves an Issuing Settlement object.

+ operationId: GetIssuingSettlementsSettlement 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 @@ -74815,6 +83855,13 @@ paths: 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: @@ -74829,7 +83876,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/financial_connections.account' + $ref: '#/components/schemas/issuing.settlement' description: Successful response. default: content: @@ -74837,16 +83884,15 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/linked_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: PostLinkedAccountsAccountDisconnect +

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: account + name: settlement required: true schema: maxLength: 5000 @@ -74859,6 +83905,9 @@ paths: expand: explode: true style: deepObject + metadata: + explode: true + style: deepObject schema: additionalProperties: false properties: @@ -74868,6 +83917,18 @@ paths: 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: @@ -74875,7 +83936,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/financial_connections.account' + $ref: '#/components/schemas/issuing.settlement' description: Successful response. default: content: @@ -74883,18 +83944,41 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/linked_accounts/{account}/owners': + /v1/issuing/tokens: get: - description:

Lists all owners for a given Account

- operationId: GetLinkedAccountsAccountOwners + description:

Lists all Issuing Token objects for a given card.

+ operationId: GetIssuingTokens parameters: - - in: path - name: account + - description: The Issuing card identifier to list tokens for. + in: query + name: card required: true schema: maxLength: 5000 type: string - style: simple + style: form + - description: >- + Only return Issuing tokens 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 @@ -74928,14 +84012,6 @@ paths: 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 @@ -74949,6 +84025,18 @@ paths: maxLength: 5000 type: string style: form + - description: Select Issuing tokens with the given status. + in: query + name: status + required: false + schema: + enum: + - active + - deleted + - requested + - suspended + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -74966,9 +84054,8 @@ paths: description: '' properties: data: - description: Details about each object. items: - $ref: '#/components/schemas/financial_connections.account_owner' + $ref: '#/components/schemas/issuing.token' type: array has_more: description: >- @@ -74991,7 +84078,7 @@ paths: - has_more - object - url - title: BankConnectionsResourceOwnerList + title: IssuingNetworkTokenList type: object x-expandableFields: - data @@ -75002,15 +84089,24 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/linked_accounts/{account}/refresh': - post: - description: >- -

Refreshes the data associated with a Financial Connections - Account.

- operationId: PostLinkedAccountsAccountRefresh + '/v1/issuing/tokens/{token}': + get: + description:

Retrieves an Issuing Token object.

+ operationId: GetIssuingTokensToken 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: account + name: token required: true schema: maxLength: 5000 @@ -75019,41 +84115,18 @@ paths: requestBody: content: application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - features: - 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 - 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 + properties: {} type: object - required: true + required: false responses: '200': content: application/json: schema: - $ref: '#/components/schemas/financial_connections.account' + $ref: '#/components/schemas/issuing.token' description: Successful response. default: content: @@ -75061,43 +84134,52 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/mandates/{mandate}': - get: - description:

Retrieves a Mandate object.

- operationId: GetMandatesMandate + post: + description: >- +

Attempts to update the specified Issuing Token object to + the status specified.

+ operationId: PostIssuingTokensToken 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 + name: token required: true schema: + maxLength: 5000 type: string 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 + status: + description: Specifies which status the token should be updated to. + enum: + - active + - deleted + - suspended + type: string + required: + - status type: object - required: false + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/mandate' + $ref: '#/components/schemas/issuing.token' description: Successful response. default: content: @@ -75105,15 +84187,33 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/payment_intents: + /v1/issuing/transactions: get: - description:

Returns a list of PaymentIntents.

- operationId: GetPaymentIntents + 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: >- - 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. + - 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 @@ -75133,16 +84233,6 @@ paths: type: object - type: integer style: deepObject - - description: >- - Only return PaymentIntents 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 @@ -75189,6 +84279,18 @@ paths: 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: @@ -75207,7 +84309,7 @@ paths: properties: data: items: - $ref: '#/components/schemas/payment_intent' + $ref: '#/components/schemas/issuing.transaction' type: array has_more: description: >- @@ -75224,14 +84326,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: ^/v1/payment_intents + pattern: ^/v1/issuing/transactions type: string required: - data - has_more - object - url - title: PaymentFlowsPaymentIntentList + title: IssuingTransactionList type: object x-expandableFields: - data @@ -75242,379 +84344,1259 @@ paths: 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: >- -

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.

- operationId: PostPaymentIntents +

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: - automatic_payment_methods: - explode: true - style: deepObject expand: explode: true style: deepObject - mandate_data: - explode: true - style: deepObject metadata: explode: true style: deepObject - off_session: - explode: true - style: deepObject - payment_method_data: - explode: true - style: deepObject - payment_method_options: + 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 - payment_method_types: + expand: explode: true style: deepObject - radar_options: + filters: explode: true style: deepObject - shipping: + permissions: explode: true style: deepObject - transfer_data: + prefetch: explode: true style: deepObject schema: additionalProperties: false 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 - 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 - automatic_payment_methods: - 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. + account_holder: + description: The account holder to link accounts for. properties: - allow_redirects: + account: + maxLength: 5000 + type: string + customer: + maxLength: 5000 + type: string + type: enum: - - always - - never + - account + - customer type: string - enabled: - type: boolean required: - - enabled - title: automatic_payment_methods_param + - type + title: accountholder_params type: object - capture_method: - description: >- - Controls when the funds will be captured from the customer's - account. - enum: - - automatic - - automatic_async - - manual - type: string - confirm: - 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. - type: boolean - confirmation_method: - 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). - type: string - 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. - maxLength: 5000 - type: string - description: - description: >- - An arbitrary string attached to the object. Often useful for - displaying to users. - maxLength: 1000 - type: string - error_on_requires_action: - 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). - type: boolean expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - mandate: - 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). - maxLength: 5000 - type: string - 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 - - enum: - - '' - type: string - 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). - 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`. + filters: + description: Filters to restrict the kinds of accounts to collect. + properties: + countries: + items: + maxLength: 5000 + type: string + type: array + required: + - countries + title: filters_params type: object - off_session: - anyOf: - - type: boolean - - enum: - - one_off - - recurring - maxLength: 5000 - type: 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). - on_behalf_of: - 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). - type: string - payment_method: + permissions: 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. + List of data features that you would like to request access + to. - 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. - maxLength: 5000 - type: string - payment_method_configuration: + 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 + prefetch: description: >- - The ID of the payment method configuration to use with this - PaymentIntent. - maxLength: 100 - type: string - payment_method_data: + List of data features that you would like to retrieve upon + account creation. + items: + enum: + - balances + - ownership + - transactions + type: string + x-stripeBypassValidation: true + type: array + return_url: 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. - 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 + 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: + - 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: + '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/linked_accounts: + get: + description: >- +

Returns a list of Financial Connections Account + objects.

+ operationId: GetLinkedAccounts + 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/linked_accounts/{account}': + get: + description: >- +

Retrieves the details of an Financial Connections + Account.

+ operationId: GetLinkedAccountsAccount + 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/linked_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: PostLinkedAccountsAccountDisconnect + 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/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: >- +

Refreshes the data associated with a Financial Connections + Account.

+ operationId: PostLinkedAccountsAccountRefresh + 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 + 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 + features: + description: The list of account features that you would like to refresh. + items: + enum: + - balance + - ownership + - transactions + 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: + '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/payment_intents: + get: + description:

Returns a list of PaymentIntents.

+ operationId: GetPaymentIntents + 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 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 PaymentIntents for the customer that this customer ID + specifies. + 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: >- + A cursor for use in pagination. `starting_after` is an object ID + that defines your place in the list. For instance, if you make a + list request and receive 100 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/payment_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/payment_intents + type: string + required: + - data + - has_more + - object + - url + title: PaymentFlowsPaymentIntentList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + post: + description: >- +

Creates a PaymentIntent object.

+ + +

After the PaymentIntent is created, attach a payment method and confirm + + to continue the payment. Learn more about the available payment flows + + with the Payment Intents API.

+ + +

When you use confirm=true during creation, it’s + equivalent to creating + + and confirming the PaymentIntent in the same call. You can use any + parameters + + available in the confirm + API when you supply + + confirm=true.

+ operationId: PostPaymentIntents + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + automatic_payment_methods: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + mandate_data: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + off_session: + 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 + radar_options: + 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 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 + 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 + automatic_payment_methods: + description: >- + When you enable this parameter, this PaymentIntent accepts + payment methods that you enable in the Dashboard and that + are compatible with this PaymentIntent's other parameters. + properties: + allow_redirects: + enum: + - always + - never + type: string + enabled: + type: boolean + required: + - enabled + title: automatic_payment_methods_param + type: object + capture_method: + description: >- + Controls when the funds will be captured from the customer's + account. + enum: + - automatic + - automatic_async + - manual + type: string + confirm: + description: >- + Set to `true` to attempt to [confirm this + PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) + immediately. This parameter defaults to `false`. When + creating and confirming a PaymentIntent at the same time, + you can also provide the parameters available in the + [Confirm + API](https://stripe.com/docs/api/payment_intents/confirm). + type: boolean + confirmation_method: + description: >- + Describes whether we can confirm this PaymentIntent + automatically, or if it requires customer action to confirm + the payment. + enum: + - automatic + - manual + type: string + confirmation_token: + description: >- + ID of the ConfirmationToken used to confirm this + PaymentIntent. + + + If the provided ConfirmationToken contains properties that + are also being provided in this request, such as + `payment_method`, then the values in this request will take + precedence. + 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 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. + maxLength: 5000 + type: string + description: + description: >- + An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 1000 + type: string + error_on_requires_action: + description: >- + Set to `true` to fail the payment attempt if the + PaymentIntent transitions into `requires_action`. Use this + parameter for simpler integrations that don't handle + customer actions, such as [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). + type: boolean + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + mandate: + description: >- + ID of the mandate that's 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). + maxLength: 5000 + type: string + 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 + - enum: + - '' + type: string + 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). + 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 + off_session: + anyOf: + - type: boolean + - enum: + - one_off + - recurring + maxLength: 5000 + type: string + description: >- + Set to `true` to indicate that the customer isn't in your + checkout flow during this payment attempt and can't + authenticate. Use this parameter in 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). + on_behalf_of: + description: >- + The Stripe account ID that these funds are intended for. + Learn more about the [use case for connected + accounts](https://stripe.com/docs/payments/connected-accounts). + type: string + payment_method: + 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 you omit this parameter with `confirm=true`, + `customer.default_source` attaches as this PaymentIntent's + payment instrument to improve migration for users of the + Charges API. We recommend that you explicitly provide the + `payment_method` moving forward. + maxLength: 5000 + type: string + payment_method_configuration: + description: >- + The ID of the payment method configuration to use with this + PaymentIntent. + maxLength: 100 + type: string + payment_method_data: + 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. + 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: - '' @@ -75751,6 +85733,7 @@ paths: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -75796,6 +85779,10 @@ paths: additionalProperties: type: string type: object + mobilepay: + properties: {} + title: param + type: object oxxo: properties: {} title: param @@ -75828,6 +85815,7 @@ paths: - santander_przelew24 - tmobile_usbugi_bankowe - toyota_bank + - velobank - volkswagen_bank type: string x-stripeBypassValidation: true @@ -75854,7 +85842,11 @@ paths: session: maxLength: 5000 type: string - title: radar_options + title: radar_options_with_hidden_options + type: object + revolut_pay: + properties: {} + title: param type: object sepa_debit: properties: @@ -75880,6 +85872,10 @@ paths: - country title: param type: object + swish: + properties: {} + title: param + type: object type: enum: - acss_debit @@ -75901,14 +85897,17 @@ paths: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -75951,7 +85950,7 @@ paths: type: object payment_method_options: description: >- - Payment-method-specific configuration for this + Payment method-specific configuration for this PaymentIntent. properties: acss_debit: @@ -76113,6 +86112,12 @@ paths: code: maxLength: 5000 type: string + setup_future_usage: + enum: + - '' + - none + type: string + x-stripeBypassValidation: true title: payment_intent_payment_method_options_param type: object - enum: @@ -76235,13 +86240,35 @@ paths: maxLength: 5000 type: string x-stripeBypassValidation: true + request_extended_authorization: + enum: + - if_available + - never + type: string + request_incremental_authorization: + enum: + - if_available + - never + type: string + request_multicapture: + enum: + - if_available + - never + type: string + request_overcapture: + enum: + - if_available + - never + type: string request_three_d_secure: enum: - any - automatic - maxLength: 5000 + - challenge type: string x-stripeBypassValidation: true + require_cvc_recollection: + type: boolean setup_future_usage: enum: - '' @@ -76263,6 +86290,78 @@ paths: - enum: - '' type: string + three_d_secure: + properties: + ares_trans_status: + enum: + - A + - C + - I + - 'N' + - R + - U + - 'Y' + type: string + cryptogram: + maxLength: 5000 + type: string + electronic_commerce_indicator: + enum: + - '01' + - '02' + - '05' + - '06' + - '07' + type: string + x-stripeBypassValidation: true + exemption_indicator: + enum: + - low_risk + - none + type: string + network_options: + properties: + cartes_bancaires: + properties: + cb_avalgo: + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - A + type: string + cb_exemption: + maxLength: 4 + type: string + cb_score: + type: integer + required: + - cb_avalgo + title: cartes_bancaires_network_options_param + type: object + title: network_options_param + type: object + requestor_challenge_indicator: + maxLength: 2 + type: string + transaction_id: + maxLength: 5000 + type: string + version: + enum: + - 1.0.2 + - 2.1.0 + - 2.2.0 + type: string + x-stripeBypassValidation: true + required: + - cryptogram + - transaction_id + - version + title: payment_method_options_param + type: object title: payment_intent_param type: object - enum: @@ -76483,6 +86582,7 @@ paths: enum: - none type: string + x-stripeBypassValidation: true title: payment_method_options_param type: object - enum: @@ -76546,6 +86646,23 @@ paths: - enum: - '' type: string + mobilepay: + 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 oxxo: anyOf: - properties: @@ -76665,6 +86782,20 @@ paths: - enum: - '' type: string + revolut_pay: + anyOf: + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string sepa_debit: anyOf: - properties: @@ -76709,6 +86840,25 @@ paths: - enum: - '' type: string + swish: + anyOf: + - properties: + reference: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string us_bank_account: anyOf: - properties: @@ -76729,6 +86879,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -76737,6 +86888,16 @@ paths: type: string title: linked_account_options_param type: object + mandate_options: + properties: + collection_method: + enum: + - '' + - paper + type: string + x-stripeBypassValidation: true + title: mandate_options_param + type: object networks: properties: requested: @@ -76813,9 +86974,9 @@ paths: type: object 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"]. Use automatic_payment_methods to + The list of payment method types (for example, a card) that + this PaymentIntent can use. If you don't provide this, it + defaults to ["card"]. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). items: @@ -76824,9 +86985,8 @@ paths: type: array radar_options: description: >- - Options to configure Radar. See [Radar - Session](https://stripe.com/docs/radar/radar-session) for - more information. + Options to configure Radar. Learn more about [Radar + Sessions](https://stripe.com/docs/radar/radar-session). properties: session: maxLength: 5000 @@ -76835,10 +86995,9 @@ paths: 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 in live mode, a receipt will be sent regardless of - your [email + Email address to send the receipt to. If you specify + `receipt_email` for a payment in live mode, you send a + receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). type: string return_url: @@ -76919,9 +87078,12 @@ paths: 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. + For card charges, use + [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). + Otherwise, you can use this value as the complete + description of a charge on your customers' statements. It + must contain at least one letter and be 1–22 characters + long. maxLength: 22 type: string statement_descriptor_suffix: @@ -76929,17 +87091,16 @@ paths: 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. + account to form the complete statement descriptor. The + concatenated descriptor must contain 1-22 characters. maxLength: 22 type: string transfer_data: description: >- - The parameters used to automatically create a Transfer when - the payment succeeds. + The parameters that you can use to automatically create a + Transfer. - For more information, see the PaymentIntents [use case for - connected + Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). properties: amount: @@ -76953,9 +87114,8 @@ paths: 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/connect/separate-charges-and-transfers) - for details. + group. Learn more about the [use case for connected + accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). type: string use_stripe_sdk: description: >- @@ -77115,7 +87275,7 @@ paths: operationId: GetPaymentIntentsIntent parameters: - description: >- - The client secret of the PaymentIntent. It's required if you use a + The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. in: query name: client_secret @@ -77553,6 +87713,7 @@ paths: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -77598,6 +87759,10 @@ paths: additionalProperties: type: string type: object + mobilepay: + properties: {} + title: param + type: object oxxo: properties: {} title: param @@ -77630,6 +87795,7 @@ paths: - santander_przelew24 - tmobile_usbugi_bankowe - toyota_bank + - velobank - volkswagen_bank type: string x-stripeBypassValidation: true @@ -77656,7 +87822,11 @@ paths: session: maxLength: 5000 type: string - title: radar_options + title: radar_options_with_hidden_options + type: object + revolut_pay: + properties: {} + title: param type: object sepa_debit: properties: @@ -77682,6 +87852,10 @@ paths: - country title: param type: object + swish: + properties: {} + title: param + type: object type: enum: - acss_debit @@ -77703,14 +87877,17 @@ paths: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -77915,6 +88092,12 @@ paths: code: maxLength: 5000 type: string + setup_future_usage: + enum: + - '' + - none + type: string + x-stripeBypassValidation: true title: payment_intent_payment_method_options_param type: object - enum: @@ -78037,13 +88220,35 @@ paths: maxLength: 5000 type: string x-stripeBypassValidation: true + request_extended_authorization: + enum: + - if_available + - never + type: string + request_incremental_authorization: + enum: + - if_available + - never + type: string + request_multicapture: + enum: + - if_available + - never + type: string + request_overcapture: + enum: + - if_available + - never + type: string request_three_d_secure: enum: - any - automatic - maxLength: 5000 + - challenge type: string x-stripeBypassValidation: true + require_cvc_recollection: + type: boolean setup_future_usage: enum: - '' @@ -78065,6 +88270,78 @@ paths: - enum: - '' type: string + three_d_secure: + properties: + ares_trans_status: + enum: + - A + - C + - I + - 'N' + - R + - U + - 'Y' + type: string + cryptogram: + maxLength: 5000 + type: string + electronic_commerce_indicator: + enum: + - '01' + - '02' + - '05' + - '06' + - '07' + type: string + x-stripeBypassValidation: true + exemption_indicator: + enum: + - low_risk + - none + type: string + network_options: + properties: + cartes_bancaires: + properties: + cb_avalgo: + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - A + type: string + cb_exemption: + maxLength: 4 + type: string + cb_score: + type: integer + required: + - cb_avalgo + title: cartes_bancaires_network_options_param + type: object + title: network_options_param + type: object + requestor_challenge_indicator: + maxLength: 2 + type: string + transaction_id: + maxLength: 5000 + type: string + version: + enum: + - 1.0.2 + - 2.1.0 + - 2.2.0 + type: string + x-stripeBypassValidation: true + required: + - cryptogram + - transaction_id + - version + title: payment_method_options_param + type: object title: payment_intent_param type: object - enum: @@ -78285,6 +88562,7 @@ paths: enum: - none type: string + x-stripeBypassValidation: true title: payment_method_options_param type: object - enum: @@ -78348,6 +88626,23 @@ paths: - enum: - '' type: string + mobilepay: + 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 oxxo: anyOf: - properties: @@ -78467,6 +88762,20 @@ paths: - enum: - '' type: string + revolut_pay: + anyOf: + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string sepa_debit: anyOf: - properties: @@ -78511,6 +88820,25 @@ paths: - enum: - '' type: string + swish: + anyOf: + - properties: + reference: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string us_bank_account: anyOf: - properties: @@ -78531,6 +88859,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -78539,6 +88868,16 @@ paths: type: string title: linked_account_options_param type: object + mandate_options: + properties: + collection_method: + enum: + - '' + - paper + type: string + x-stripeBypassValidation: true + title: mandate_options_param + type: object networks: properties: requested: @@ -78714,9 +89053,12 @@ paths: description: Shipping information for this PaymentIntent. 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. + For card charges, use + [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). + Otherwise, you can use this value as the complete + description of a charge on your customers' statements. It + must contain at least one letter and be 1–22 characters + long. maxLength: 22 type: string statement_descriptor_suffix: @@ -78764,8 +89106,8 @@ paths: '/v1/payment_intents/{intent}/apply_customer_balance': post: description: >- -

Manually reconcile the remaining amount for a customer_balance - PaymentIntent.

+

Manually reconcile the remaining amount for a + customer_balance PaymentIntent.

operationId: PostPaymentIntentsIntentApplyCustomerBalance parameters: - in: path @@ -78787,22 +89129,22 @@ paths: properties: amount: description: >- - Amount intended to be applied to this PaymentIntent from the - customer’s cash balance. + Amount that you intend to apply 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). + unit](https://stripe.com/docs/currencies#zero-decimal) (for + example, 100 cents to charge 1 USD or 100 to charge 100 JPY, + 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. + When you omit the amount, it defaults to the remaining + amount requested on the PaymentIntent. type: integer currency: description: >- @@ -78835,21 +89177,21 @@ paths: '/v1/payment_intents/{intent}/cancel': post: description: >- -

A PaymentIntent object can be canceled when it is in one of these +

You can cancel a PaymentIntent object when it’s in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, in rare cases, processing.

-

Once canceled, no additional charges will be made by the - PaymentIntent and any operations on the PaymentIntent will fail with an +

After it’s canceled, no additional charges are made by the + PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining - amount_capturable will automatically be refunded.

+ amount_capturable is automatically refunded.

-

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

operationId: PostPaymentIntentsIntentCancel @@ -78873,8 +89215,8 @@ paths: properties: cancellation_reason: description: >- - Reason for canceling this PaymentIntent. Possible values are - `duplicate`, `fraudulent`, `requested_by_customer`, or + Reason for canceling this PaymentIntent. Possible values + are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` enum: - abandoned @@ -78912,8 +89254,8 @@ paths: status is requires_capture.

-

Uncaptured PaymentIntents will be canceled a set number of days after - they are created (7 by default).

+

Uncaptured PaymentIntents are cancelled a set number of days (7 by + default) after their creation.

Learn more about separate @@ -78947,8 +89289,8 @@ paths: 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 is automatically refunded. Defaults to the full + `amount_capturable` if it's not provided. type: integer application_fee_amount: description: >- @@ -78966,6 +89308,16 @@ paths: maxLength: 5000 type: string type: array + final_capture: + description: >- + Defaults to `true`. When capturing a PaymentIntent, setting + `final_capture` to `false` notifies Stripe to not release + the remaining uncaptured funds to make sure that they're + captured in future requests. You can only use this setting + when + [multicapture](https://stripe.com/docs/payments/multicapture) + is available for PaymentIntents. + type: boolean metadata: anyOf: - additionalProperties: @@ -78984,9 +89336,12 @@ paths: value to `metadata`. 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. + For card charges, use + [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). + Otherwise, you can use this value as the complete + description of a charge on your customers' statements. It + must contain at least one letter and be 1–22 characters + long. maxLength: 22 type: string statement_descriptor_suffix: @@ -78994,17 +89349,16 @@ paths: 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. + account to form the complete statement descriptor. The + concatenated descriptor must be 1-22 characters long. maxLength: 22 type: string transfer_data: description: >- - The parameters used to automatically create a Transfer when - the payment + The parameters that you can use to automatically create a + transfer after the payment - is captured. For more information, see the PaymentIntents - [use case for connected + is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). properties: amount: @@ -79083,11 +89437,7 @@ paths: explicitly re-confirm the PaymentIntent to initiate the next payment - attempt. Read the expanded - documentation - - to learn more about manual confirmation.

+ attempt.

operationId: PostPaymentIntentsIntentConfirm parameters: - in: path @@ -79144,6 +89494,18 @@ paths: description: The client secret of the PaymentIntent. maxLength: 5000 type: string + confirmation_token: + description: >- + ID of the ConfirmationToken used to confirm this + PaymentIntent. + + + If the provided ConfirmationToken contains properties that + are also being provided in this request, such as + `payment_method`, then the values in this request will take + precedence. + maxLength: 5000 + type: string error_on_requires_action: description: >- Set to `true` to fail the payment attempt if the @@ -79159,7 +89521,7 @@ paths: type: string type: array mandate: - description: ID of the mandate to be used for this payment. + description: ID of the mandate that's used for this payment. maxLength: 5000 type: string mandate_data: @@ -79203,7 +89565,8 @@ paths: - enum: - '' type: string - - properties: + - description: This hash contains details about the Mandate to create + properties: customer_acceptance: properties: online: @@ -79229,7 +89592,6 @@ paths: - customer_acceptance title: client_key_param type: object - description: This hash contains details about the Mandate to create off_session: anyOf: - type: boolean @@ -79239,10 +89601,10 @@ paths: maxLength: 5000 type: 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 + Set to `true` to indicate that the customer isn't in your + checkout flow during this payment attempt and can't + authenticate. Use this parameter in scenarios where you + collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). payment_method: description: >- @@ -79478,6 +89840,7 @@ paths: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -79523,6 +89886,10 @@ paths: additionalProperties: type: string type: object + mobilepay: + properties: {} + title: param + type: object oxxo: properties: {} title: param @@ -79555,6 +89922,7 @@ paths: - santander_przelew24 - tmobile_usbugi_bankowe - toyota_bank + - velobank - volkswagen_bank type: string x-stripeBypassValidation: true @@ -79581,7 +89949,11 @@ paths: session: maxLength: 5000 type: string - title: radar_options + title: radar_options_with_hidden_options + type: object + revolut_pay: + properties: {} + title: param type: object sepa_debit: properties: @@ -79607,6 +89979,10 @@ paths: - country title: param type: object + swish: + properties: {} + title: param + type: object type: enum: - acss_debit @@ -79628,14 +90004,17 @@ paths: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -79678,7 +90057,7 @@ paths: type: object payment_method_options: description: >- - Payment-method-specific configuration for this + Payment method-specific configuration for this PaymentIntent. properties: acss_debit: @@ -79840,6 +90219,12 @@ paths: code: maxLength: 5000 type: string + setup_future_usage: + enum: + - '' + - none + type: string + x-stripeBypassValidation: true title: payment_intent_payment_method_options_param type: object - enum: @@ -79962,13 +90347,35 @@ paths: maxLength: 5000 type: string x-stripeBypassValidation: true + request_extended_authorization: + enum: + - if_available + - never + type: string + request_incremental_authorization: + enum: + - if_available + - never + type: string + request_multicapture: + enum: + - if_available + - never + type: string + request_overcapture: + enum: + - if_available + - never + type: string request_three_d_secure: enum: - any - automatic - maxLength: 5000 + - challenge type: string x-stripeBypassValidation: true + require_cvc_recollection: + type: boolean setup_future_usage: enum: - '' @@ -79990,6 +90397,78 @@ paths: - enum: - '' type: string + three_d_secure: + properties: + ares_trans_status: + enum: + - A + - C + - I + - 'N' + - R + - U + - 'Y' + type: string + cryptogram: + maxLength: 5000 + type: string + electronic_commerce_indicator: + enum: + - '01' + - '02' + - '05' + - '06' + - '07' + type: string + x-stripeBypassValidation: true + exemption_indicator: + enum: + - low_risk + - none + type: string + network_options: + properties: + cartes_bancaires: + properties: + cb_avalgo: + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - A + type: string + cb_exemption: + maxLength: 4 + type: string + cb_score: + type: integer + required: + - cb_avalgo + title: cartes_bancaires_network_options_param + type: object + title: network_options_param + type: object + requestor_challenge_indicator: + maxLength: 2 + type: string + transaction_id: + maxLength: 5000 + type: string + version: + enum: + - 1.0.2 + - 2.1.0 + - 2.2.0 + type: string + x-stripeBypassValidation: true + required: + - cryptogram + - transaction_id + - version + title: payment_method_options_param + type: object title: payment_intent_param type: object - enum: @@ -80210,6 +90689,7 @@ paths: enum: - none type: string + x-stripeBypassValidation: true title: payment_method_options_param type: object - enum: @@ -80273,6 +90753,23 @@ paths: - enum: - '' type: string + mobilepay: + 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 oxxo: anyOf: - properties: @@ -80392,6 +90889,20 @@ paths: - enum: - '' type: string + revolut_pay: + anyOf: + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string sepa_debit: anyOf: - properties: @@ -80436,6 +90947,25 @@ paths: - enum: - '' type: string + swish: + anyOf: + - properties: + reference: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string us_bank_account: anyOf: - properties: @@ -80456,6 +90986,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -80464,6 +90995,16 @@ paths: type: string title: linked_account_options_param type: object + mandate_options: + properties: + collection_method: + enum: + - '' + - paper + type: string + x-stripeBypassValidation: true + title: mandate_options_param + type: object networks: properties: requested: @@ -80540,10 +91081,9 @@ paths: type: object payment_method_types: 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 + The list of payment method types (for example, a card) that + this PaymentIntent can use. Use `automatic_payment_methods` + to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). items: maxLength: 5000 @@ -80551,9 +91091,8 @@ paths: type: array radar_options: description: >- - Options to configure Radar. See [Radar - Session](https://stripe.com/docs/radar/radar-session) for - more information. + Options to configure Radar. Learn more about [Radar + Sessions](https://stripe.com/docs/radar/radar-session). properties: session: maxLength: 5000 @@ -80701,10 +91240,10 @@ paths:

Incremental authorizations attempt to increase the authorized amount on - your customer’s card to the new, higher amount provided. As - with the + your customer’s card to the new, higher amount provided. + Similar to the - initial authorization, incremental authorizations may be declined. A + initial authorization, incremental authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to further @@ -80712,19 +91251,18 @@ paths:

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

@@ -80732,7 +91270,7 @@ paths:

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

+ After it’s captured, a PaymentIntent can no longer be incremented.

Learn more about - - The updated total amount you intend to collect from the + The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. type: integer @@ -80805,18 +91343,20 @@ paths: 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. + For card charges, use + [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). + Otherwise, you can use this value as the complete + description of a charge on your customers' statements. It + must contain at least one letter and be 1–22 characters + long. maxLength: 22 type: string transfer_data: description: >- - The parameters used to automatically create a Transfer when + The parameters used to automatically create a transfer after the payment is captured. - For more information, see the PaymentIntents [use case for - connected + Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). properties: amount: @@ -81059,6 +91599,9 @@ paths: phone_number_collection: explode: true style: deepObject + restrictions: + explode: true + style: deepObject shipping_address_collection: explode: true style: deepObject @@ -81128,12 +91671,27 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_params type: object billing_address_collection: - description: Configuration for collecting the customer's billing address. + description: >- + Configuration for collecting the customer's billing address. + Defaults to `auto`. enum: - auto - required @@ -81141,6 +91699,17 @@ paths: consent_collection: description: Configure fields to gather active consent from customers. properties: + payment_method_reuse_agreement: + properties: + position: + enum: + - auto + - hidden + type: string + required: + - position + title: payment_method_reuse_agreement_params + type: object promotions: enum: - auto @@ -81164,7 +91733,7 @@ paths: custom_fields: description: >- Collect additional information from your customer using - custom fields. Up to 2 fields are supported. + custom fields. Up to 3 fields are supported. items: properties: dropdown: @@ -81241,6 +91810,19 @@ paths: Display additional text for your customers using custom text. properties: + after_submit: + anyOf: + - properties: + message: + maxLength: 1200 + type: string + required: + - message + title: custom_text_position_param + type: object + - enum: + - '' + type: string shipping_address: anyOf: - properties: @@ -81298,6 +91880,12 @@ paths: maxLength: 5000 type: string type: array + inactive_message: + description: >- + The custom message to be displayed to a customer when a + payment link is no longer active. + maxLength: 500 + type: string invoice_creation: description: Generate a post-purchase Invoice for one-time payments. properties: @@ -81319,10 +91907,10 @@ paths: - items: properties: name: - maxLength: 30 + maxLength: 40 type: string value: - maxLength: 30 + maxLength: 140 type: string required: - name @@ -81339,6 +91927,19 @@ paths: footer: maxLength: 5000 type: string + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object metadata: anyOf: - additionalProperties: @@ -81426,11 +92027,27 @@ paths: - automatic_async - manual type: string + description: + maxLength: 1000 + type: string + metadata: + additionalProperties: + type: string + type: object setup_future_usage: enum: - off_session - on_session type: string + statement_descriptor: + maxLength: 22 + type: string + statement_descriptor_suffix: + maxLength: 22 + type: string + transfer_group: + maxLength: 5000 + type: string title: payment_intent_data_params type: object payment_method_collection: @@ -81442,7 +92059,8 @@ paths: discount. - Can only be set in `subscription` mode. + Can only be set in `subscription` mode. Defaults to + `always`. If you'd like information on how to collect a payment method @@ -81489,6 +92107,7 @@ paths: - promptpay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay type: string @@ -81508,6 +92127,21 @@ paths: - enabled title: phone_number_collection_params type: object + restrictions: + description: Settings that restrict the usage of a payment link. + properties: + completed_sessions: + properties: + limit: + type: integer + required: + - limit + title: completed_sessions_params + type: object + required: + - completed_sessions + title: restrictions_params + type: object shipping_address_collection: description: >- Configuration for collecting the customer's shipping @@ -81795,8 +92429,47 @@ paths: description: maxLength: 500 type: string + invoice_settings: + properties: + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + title: subscription_data_invoice_settings_params + type: object + metadata: + additionalProperties: + type: string + type: object trial_period_days: type: integer + trial_settings: + properties: + end_behavior: + properties: + missing_payment_method: + enum: + - cancel + - create_invoice + - pause + type: string + required: + - missing_payment_method + title: end_behavior + type: object + required: + - end_behavior + title: trial_settings_config + type: object title: subscription_data_params type: object tax_id_collection: @@ -81914,6 +92587,9 @@ paths: expand: explode: true style: deepObject + inactive_message: + explode: true + style: deepObject invoice_creation: explode: true style: deepObject @@ -81923,12 +92599,21 @@ paths: metadata: explode: true style: deepObject + payment_intent_data: + explode: true + style: deepObject payment_method_types: explode: true style: deepObject + restrictions: + explode: true + style: deepObject shipping_address_collection: explode: true style: deepObject + subscription_data: + explode: true + style: deepObject schema: additionalProperties: false properties: @@ -81974,12 +92659,27 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_params type: object billing_address_collection: - description: Configuration for collecting the customer's billing address. + description: >- + Configuration for collecting the customer's billing address. + Defaults to `auto`. enum: - auto - required @@ -82062,12 +92762,25 @@ paths: type: string description: >- Collect additional information from your customer using - custom fields. Up to 2 fields are supported. + custom fields. Up to 3 fields are supported. custom_text: description: >- Display additional text for your customers using custom text. properties: + after_submit: + anyOf: + - properties: + message: + maxLength: 1200 + type: string + required: + - message + title: custom_text_position_param + type: object + - enum: + - '' + type: string shipping_address: anyOf: - properties: @@ -82125,6 +92838,16 @@ paths: maxLength: 5000 type: string type: array + inactive_message: + anyOf: + - maxLength: 500 + type: string + - enum: + - '' + type: string + description: >- + The custom message to be displayed to a customer when a + payment link is no longer active. invoice_creation: description: Generate a post-purchase Invoice for one-time payments. properties: @@ -82146,10 +92869,10 @@ paths: - items: properties: name: - maxLength: 30 + maxLength: 40 type: string value: - maxLength: 30 + maxLength: 140 type: string required: - name @@ -82166,6 +92889,19 @@ paths: footer: maxLength: 5000 type: string + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object metadata: anyOf: - additionalProperties: @@ -82238,6 +92974,49 @@ paths: sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. type: object + payment_intent_data: + description: >- + A subset of parameters to be passed to PaymentIntent + creation for Checkout Sessions in `payment` mode. + properties: + description: + anyOf: + - maxLength: 1000 + type: string + - enum: + - '' + type: string + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + statement_descriptor: + anyOf: + - maxLength: 22 + type: string + - enum: + - '' + type: string + statement_descriptor_suffix: + anyOf: + - maxLength: 22 + type: string + - enum: + - '' + type: string + transfer_group: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + title: payment_intent_data_update_params + type: object payment_method_collection: description: >- Specify whether Checkout should collect a payment method. @@ -82247,7 +93026,8 @@ paths: discount. - Can only be set in `subscription` mode. + Can only be set in `subscription` mode. Defaults to + `always`. If you'd like information on how to collect a payment method @@ -82288,6 +93068,7 @@ paths: - promptpay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay type: string @@ -82301,6 +93082,25 @@ paths: Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + restrictions: + anyOf: + - properties: + completed_sessions: + properties: + limit: + type: integer + required: + - limit + title: completed_sessions_params + type: object + required: + - completed_sessions + title: restrictions_params + type: object + - enum: + - '' + type: string + description: Settings that restrict the usage of a payment link. shipping_address_collection: anyOf: - properties: @@ -82556,6 +93356,61 @@ paths: description: >- Configuration for collecting the customer's shipping address. + 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: + invoice_settings: + properties: + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + title: subscription_data_invoice_settings_params + type: object + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + trial_settings: + anyOf: + - properties: + end_behavior: + properties: + missing_payment_method: + enum: + - cancel + - create_invoice + - pause + type: string + required: + - missing_payment_method + title: end_behavior + type: object + required: + - end_behavior + title: trial_settings_config + type: object + - enum: + - '' + type: string + title: subscription_data_update_params + type: object type: object required: false responses: @@ -82816,6 +93671,9 @@ paths: cashapp: explode: true style: deepObject + customer_balance: + explode: true + style: deepObject eps: explode: true style: deepObject @@ -82864,6 +93722,9 @@ paths: promptpay: explode: true style: deepObject + revolut_pay: + explode: true + style: deepObject sepa_debit: explode: true style: deepObject @@ -82876,6 +93737,9 @@ paths: wechat_pay: explode: true style: deepObject + zip: + explode: true + style: deepObject schema: additionalProperties: false properties: @@ -83167,6 +94031,27 @@ paths: type: object title: payment_method_param type: object + customer_balance: + description: >- + Uses a customer’s [cash + balance](https://stripe.com/docs/payments/customer-balance) + for the payment. The cash balance can be funded via a bank + transfer. Check this + [page](https://stripe.com/docs/payments/bank-transfers) for + more details. + properties: + display_preference: + properties: + preference: + enum: + - none + - 'off' + - 'on' + type: string + title: display_preference_param + type: object + title: payment_method_param + type: object eps: description: >- EPS is an Austria-based payment method that allows customers @@ -83313,8 +94198,10 @@ paths: description: >- JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, - and available to all businesses in the US, Canada, - Australia, New Zealand, UK, and Ireland. Check this + and available to all businesses in Australia, Canada, Hong + Kong, Japan, New Zealand, Singapore, Switzerland, United + Kingdom, United States, and all countries in the European + Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. properties: @@ -83505,6 +94392,26 @@ paths: type: object title: payment_method_param type: object + revolut_pay: + description: >- + Revolut Pay, developed by Revolut, a global finance app, is + a digital wallet payment method. Revolut Pay uses the + customer’s stored balance or cards to fund the payment, and + offers the option for non-Revolut customers to save their + details after their first purchase. + properties: + display_preference: + properties: + preference: + enum: + - none + - 'off' + - 'on' + type: string + title: display_preference_param + type: object + title: payment_method_param + type: object sepa_debit: description: >- The [Single Euro Payments Area @@ -83596,6 +94503,25 @@ paths: type: object title: payment_method_param type: object + zip: + description: >- + Zip gives your customers a way to split purchases over a + series of payments. Check this + [page](https://stripe.com/docs/payments/zip) for more + details like country availability. + properties: + display_preference: + properties: + preference: + enum: + - none + - 'off' + - 'on' + type: string + title: display_preference_param + type: object + title: payment_method_param + type: object type: object required: false responses: @@ -83713,6 +94639,9 @@ paths: cashapp: explode: true style: deepObject + customer_balance: + explode: true + style: deepObject eps: explode: true style: deepObject @@ -83761,6 +94690,9 @@ paths: promptpay: explode: true style: deepObject + revolut_pay: + explode: true + style: deepObject sepa_debit: explode: true style: deepObject @@ -83773,6 +94705,9 @@ paths: wechat_pay: explode: true style: deepObject + zip: + explode: true + style: deepObject schema: additionalProperties: false properties: @@ -84067,6 +95002,27 @@ paths: type: object title: payment_method_param type: object + customer_balance: + description: >- + Uses a customer’s [cash + balance](https://stripe.com/docs/payments/customer-balance) + for the payment. The cash balance can be funded via a bank + transfer. Check this + [page](https://stripe.com/docs/payments/bank-transfers) for + more details. + properties: + display_preference: + properties: + preference: + enum: + - none + - 'off' + - 'on' + type: string + title: display_preference_param + type: object + title: payment_method_param + type: object eps: description: >- EPS is an Austria-based payment method that allows customers @@ -84213,8 +95169,10 @@ paths: description: >- JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, - and available to all businesses in the US, Canada, - Australia, New Zealand, UK, and Ireland. Check this + and available to all businesses in Australia, Canada, Hong + Kong, Japan, New Zealand, Singapore, Switzerland, United + Kingdom, United States, and all countries in the European + Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. properties: @@ -84399,6 +95357,26 @@ paths: type: object title: payment_method_param type: object + revolut_pay: + description: >- + Revolut Pay, developed by Revolut, a global finance app, is + a digital wallet payment method. Revolut Pay uses the + customer’s stored balance or cards to fund the payment, and + offers the option for non-Revolut customers to save their + details after their first purchase. + properties: + display_preference: + properties: + preference: + enum: + - none + - 'off' + - 'on' + type: string + title: display_preference_param + type: object + title: payment_method_param + type: object sepa_debit: description: >- The [Single Euro Payments Area @@ -84490,6 +95468,25 @@ paths: type: object title: payment_method_param type: object + zip: + description: >- + Zip gives your customers a way to split purchases over a + series of payments. Check this + [page](https://stripe.com/docs/payments/zip) for more + details like country availability. + properties: + display_preference: + properties: + preference: + enum: + - none + - 'off' + - 'on' + type: string + title: display_preference_param + type: object + title: payment_method_param + type: object type: object required: false responses: @@ -84918,14 +95915,17 @@ paths: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -85074,6 +96074,9 @@ paths: metadata: explode: true style: deepObject + mobilepay: + explode: true + style: deepObject oxxo: explode: true style: deepObject @@ -85095,12 +96098,18 @@ paths: radar_options: explode: true style: deepObject + revolut_pay: + explode: true + style: deepObject sepa_debit: explode: true style: deepObject sofort: explode: true style: deepObject + swish: + explode: true + style: deepObject us_bank_account: explode: true style: deepObject @@ -85273,6 +96282,16 @@ paths: type: integer exp_year: type: integer + networks: + properties: + preferred: + enum: + - cartes_bancaires + - mastercard + - visa + type: string + title: networks_params + type: object number: maxLength: 5000 type: string @@ -85431,6 +96450,7 @@ paths: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -85496,6 +96516,13 @@ paths: value to them. All keys can be unset by posting an empty value to `metadata`. type: object + mobilepay: + description: >- + If this is a `mobilepay` PaymentMethod, this hash contains + details about the MobilePay payment method. + properties: {} + title: param + type: object oxxo: description: >- If this is an `oxxo` PaymentMethod, this hash contains @@ -85534,6 +96561,7 @@ paths: - santander_przelew24 - tmobile_usbugi_bankowe - toyota_bank + - velobank - volkswagen_bank type: string x-stripeBypassValidation: true @@ -85580,7 +96608,14 @@ paths: session: maxLength: 5000 type: string - title: radar_options + title: radar_options_with_hidden_options + type: object + revolut_pay: + description: >- + If this is a `Revolut Pay` PaymentMethod, this hash contains + details about the Revolut Pay payment method. + properties: {} + title: param type: object sepa_debit: description: >- @@ -85612,6 +96647,13 @@ paths: - country title: param type: object + swish: + description: >- + If this is a `swish` PaymentMethod, this hash contains + details about the Swish payment method. + properties: {} + title: param + type: object type: description: >- The type of the PaymentMethod. An additional hash is @@ -85639,14 +96681,17 @@ paths: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -85857,6 +96902,17 @@ paths: type: integer exp_year: type: integer + networks: + properties: + preferred: + enum: + - '' + - cartes_bancaires + - mastercard + - visa + type: string + title: networks_update_api_param + type: object title: update_api_param type: object expand: @@ -85898,6 +96954,11 @@ paths: - company - individual type: string + account_type: + enum: + - checking + - savings + type: string title: update_param type: object type: object @@ -86049,7 +97110,10 @@ paths: with the most recently created payouts appearing first.

operationId: GetPayouts parameters: - - explode: true + - description: >- + Only return payouts that are expected to arrive during the given + date interval. + explode: true in: query name: arrival_date required: false @@ -86068,7 +97132,10 @@ paths: type: object - type: integer style: deepObject - - explode: true + - description: >- + Only return payouts that were created during the given date + interval. + explode: true in: query name: created required: false @@ -86443,9 +97510,9 @@ paths: '/v1/payouts/{payout}/cancel': post: description: >- -

You can cancel a previously created payout if it hasn’t been paid out - yet. Stripe refunds the funds to your available balance. You can’t - cancel automatic Stripe payouts.

+

You can cancel a previously created payout if its status is + pending. Stripe refunds the funds to your available + balance. You can’t cancel automatic Stripe payouts.

operationId: PostPayoutsPayoutCancel parameters: - in: path @@ -86491,8 +97558,8 @@ paths: description: >-

Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank - accounts. If the payout is in the pending status, use - /v1/payouts/:id/cancel instead.

+ accounts. If the payout is manual and in the pending + status, use /v1/payouts/:id/cancel instead.

By requesting a reversal through @@ -86810,8 +97877,8 @@ paths: 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). + 3 months. Maximum of three years interval allowed (3 years, + 36 months, or 156 weeks). type: integer metadata: anyOf: @@ -86829,6 +97896,10 @@ paths: format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + meter: + description: The meter tracking the usage of a metered price + maxLength: 5000 + type: string nickname: description: 'A brief description of the plan, hidden from customers.' maxLength: 5000 @@ -87132,7 +98203,11 @@ paths: description: Error response. /v1/prices: get: - description:

Returns a list of your prices.

+ description: >- +

Returns a list of your active prices, excluding inline + prices. For the list of inactive prices, set active to + false.

operationId: GetPrices parameters: - description: >- @@ -87240,6 +98315,9 @@ paths: - week - year type: string + meter: + maxLength: 5000 + type: string usage_type: enum: - licensed @@ -87549,6 +98627,9 @@ paths: type: string interval_count: type: integer + meter: + maxLength: 5000 + type: string usage_type: enum: - licensed @@ -88306,8 +99387,8 @@ paths: type: array features: description: >- - A list of up to 15 features for this product. These are - displayed in [pricing + A list of up to 15 marketing features for this product. + These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). items: properties: @@ -88707,8 +99788,8 @@ paths: - '' type: string description: >- - A list of up to 15 features for this product. These are - displayed in [pricing + A list of up to 15 marketing features for this product. + These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). images: anyOf: @@ -89452,6 +100533,19 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_param @@ -89512,6 +100606,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -89583,6 +100680,19 @@ paths: properties: days_until_due: type: integer + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object title: quote_param type: object line_items: @@ -89592,6 +100702,25 @@ paths: quantity, and the resulting cost. items: properties: + 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 price: maxLength: 5000 type: string @@ -89690,6 +100819,10 @@ paths: - enum: - '' type: string + metadata: + additionalProperties: + type: string + type: object trial_period_days: anyOf: - type: integer @@ -89874,6 +101007,19 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_param @@ -89929,6 +101075,9 @@ paths: discount: maxLength: 5000 type: string + promotion_code: + maxLength: 5000 + type: string title: discounts_data_param type: object type: array @@ -89972,6 +101121,19 @@ paths: properties: days_until_due: type: integer + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object title: quote_param type: object line_items: @@ -89981,6 +101143,25 @@ paths: quantity, and the resulting cost. items: properties: + 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 id: maxLength: 5000 type: string @@ -90086,6 +101267,10 @@ paths: - enum: - '' type: string + metadata: + additionalProperties: + type: string + type: object trial_period_days: anyOf: - type: integer @@ -90497,7 +101682,10 @@ paths: description: Error response. '/v1/quotes/{quote}/pdf': get: - description:

Download the PDF for a finalized quote

+ description: >- +

Download the PDF for a finalized quote. Explanation for special + handling can be found here

operationId: GetQuotesQuotePdf parameters: - description: Specifies which fields in the response should be expanded. @@ -90541,6 +101729,8 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. + servers: + - url: 'https://files.stripe.com/' /v1/radar/early_fraud_warnings: get: description:

Returns a list of early fraud warnings.

@@ -90555,6 +101745,28 @@ paths: schema: type: string style: form + - description: >- + Only return early fraud warnings 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 @@ -90723,7 +101935,8 @@ paths: created object appearing first.

operationId: GetRadarValueListItems parameters: - - explode: true + - description: Only return items that were created during the given date interval. + explode: true in: query name: created required: false @@ -91016,7 +102229,10 @@ paths: maxLength: 800 type: string style: form - - explode: true + - description: >- + Only return value lists that were created during the given date + interval. + explode: true in: query name: created required: false @@ -91369,10 +102585,9 @@ paths: /v1/refunds: get: description: >- -

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.

+

Returns a list of all refunds you created. We return the refunds in + sorted order, with the most recent refunds appearing first The 10 most + recent refunds are always available by default on the Charge object.

operationId: GetRefunds parameters: - description: Only return refunds for the charge specified by this charge ID. @@ -91382,7 +102597,10 @@ paths: schema: type: string style: form - - explode: true + - description: >- + Only return refunds that were created during the given date + interval. + explode: true in: query name: created required: false @@ -91507,7 +102725,30 @@ paths: $ref: '#/components/schemas/error' description: Error response. post: - description:

Create a refund.

+ description: >- +

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

+ + +

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

+ + +

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

+ + +

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

operationId: PostRefunds requestBody: content: @@ -91523,9 +102764,9 @@ paths: additionalProperties: false properties: amount: - description: A positive integer representing how much to refund. type: integer charge: + description: The identifier of the charge to refund. maxLength: 5000 type: string currency: @@ -91573,9 +102814,18 @@ paths: - customer_balance type: string payment_intent: + description: The identifier of the PaymentIntent to refund. maxLength: 5000 type: string reason: + description: >- + String indicating the reason for the refund. If set, + possible values are `duplicate`, `fraudulent`, and + `requested_by_customer`. If you believe the charge to be + fraudulent, specifying `fraudulent` as the reason will add + the associated card and email to your [block + lists](https://stripe.com/docs/radar/lists), and will also + help us improve our fraud detection algorithms. enum: - duplicate - fraudulent @@ -91583,8 +102833,22 @@ paths: maxLength: 5000 type: string refund_application_fee: + description: >- + Boolean indicating whether the application fee should be + refunded when refunding this charge. If a full charge refund + is given, the full application fee will be refunded. + Otherwise, the application fee will be refunded in an amount + proportional to the amount of the charge refunded. An + application fee can be refunded only by the application that + created the charge. type: boolean reverse_transfer: + description: >- + Boolean indicating whether the transfer should be reversed + when refunding this charge. The transfer will be reversed + proportionally to the amount being refunded (either the + entire or partial amount).

A transfer can be reversed + only by the application that created the charge. type: boolean type: object required: false @@ -91647,8 +102911,9 @@ paths: description: Error response. post: description: >- -

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

+

Updates the refund that you specify by setting the values of the + passed parameters. Any parameters that you don’t provide remain + unchanged.

This request only accepts metadata as an argument.

@@ -91716,8 +102981,8 @@ paths:

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 +

You can’t cancel refunds in other states. Only refunds for payment + methods that require customer action can enter the requires_action state.

operationId: PostRefundsRefundCancel parameters: @@ -91765,7 +103030,10 @@ paths: first.

operationId: GetReportingReportRuns parameters: - - explode: true + - description: >- + Only return Report Runs that were created during the given date + interval. + explode: true in: query name: created required: false @@ -91941,6 +103209,8 @@ paths: - anticipation_repayment - charge - charge_failure + - climate_order_purchase + - climate_order_refund - connect_collection_transfer - connect_reserved_funds - contribution @@ -91956,7 +103226,6 @@ paths: - issuing_dispute - issuing_transaction - network_cost - - obligation - other_adjustment - partial_capture_reversal - payout @@ -91971,6 +103240,7 @@ paths: - topup_reversal - transfer - transfer_reversal + - unreconciled_customer_funds maxLength: 5000 type: string x-stripeBypassValidation: true @@ -92770,7 +104040,10 @@ paths: appearing first.

operationId: GetReviews parameters: - - explode: true + - description: >- + Only return reviews that were created during the given date + interval. + explode: true in: query name: created required: false @@ -93203,7 +104476,7 @@ paths: type: integer style: form - description: >- - Only return SetupIntents associated with the specified payment + Only return SetupIntents that associate with the specified payment method. in: query name: payment_method @@ -93283,10 +104556,10 @@ paths:

Creates a SetupIntent object.

-

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

operationId: PostSetupIntents requestBody: @@ -93337,9 +104610,9 @@ paths: type: boolean automatic_payment_methods: description: >- - When enabled, this SetupIntent will accept payment methods - that you have enabled in the Dashboard and are compatible - with this SetupIntent's other parameters. + When you enable this parameter, this SetupIntent accepts + payment methods that you enable in the Dashboard and that + are compatible with its other parameters. properties: allow_redirects: enum: @@ -93355,10 +104628,22 @@ paths: 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. + immediately. This parameter defaults to `false`. If a card + is the attached payment method, you can provide a + `return_url` in case further authentication is necessary. type: boolean + confirmation_token: + description: >- + ID of the ConfirmationToken used to confirm this + SetupIntent. + + + If the provided ConfirmationToken contains properties that + are also being provided in this request, such as + `payment_method`, then the values in this request will take + precedence. + maxLength: 5000 + type: string customer: description: >- ID of the Customer this SetupIntent belongs to, if one @@ -93442,7 +104727,7 @@ paths: - '' type: string description: >- - This hash contains details about the Mandate to create. This + 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). metadata: @@ -93458,7 +104743,7 @@ paths: value to `metadata`. type: object on_behalf_of: - description: The Stripe account ID for which this SetupIntent is created. + description: The Stripe account ID created for this SetupIntent. type: string payment_method: description: >- @@ -93469,7 +104754,7 @@ paths: payment_method_configuration: description: >- The ID of the payment method configuration to use with this - Setup Intent. + SetupIntent. maxLength: 100 type: string payment_method_data: @@ -93696,6 +104981,7 @@ paths: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -93741,6 +105027,10 @@ paths: additionalProperties: type: string type: object + mobilepay: + properties: {} + title: param + type: object oxxo: properties: {} title: param @@ -93773,6 +105063,7 @@ paths: - santander_przelew24 - tmobile_usbugi_bankowe - toyota_bank + - velobank - volkswagen_bank type: string x-stripeBypassValidation: true @@ -93799,7 +105090,11 @@ paths: session: maxLength: 5000 type: string - title: radar_options + title: radar_options_with_hidden_options + type: object + revolut_pay: + properties: {} + title: param type: object sepa_debit: properties: @@ -93825,6 +105120,10 @@ paths: - country title: param type: object + swish: + properties: {} + title: param + type: object type: enum: - acss_debit @@ -93846,14 +105145,17 @@ paths: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -93895,7 +105197,7 @@ paths: title: payment_method_data_params type: object payment_method_options: - description: Payment-method-specific configuration for this SetupIntent. + description: Payment method-specific configuration for this SetupIntent. properties: acss_debit: properties: @@ -94015,11 +105317,78 @@ paths: enum: - any - automatic - maxLength: 5000 + - challenge type: string x-stripeBypassValidation: true + three_d_secure: + properties: + ares_trans_status: + enum: + - A + - C + - I + - 'N' + - R + - U + - 'Y' + type: string + cryptogram: + maxLength: 5000 + type: string + electronic_commerce_indicator: + enum: + - '01' + - '02' + - '05' + - '06' + - '07' + type: string + x-stripeBypassValidation: true + network_options: + properties: + cartes_bancaires: + properties: + cb_avalgo: + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - A + type: string + cb_exemption: + maxLength: 4 + type: string + cb_score: + type: integer + required: + - cb_avalgo + title: cartes_bancaires_network_options_param + type: object + title: network_options_param + type: object + requestor_challenge_indicator: + maxLength: 2 + type: string + transaction_id: + maxLength: 5000 + type: string + version: + enum: + - 1.0.2 + - 2.1.0 + - 2.2.0 + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_param + type: object title: setup_intent_param type: object + card_present: + properties: {} + title: setup_intent_payment_method_options_param + type: object link: properties: {} title: setup_intent_payment_method_options_param @@ -94058,6 +105427,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -94066,6 +105436,16 @@ paths: type: string title: linked_account_options_param type: object + mandate_options: + properties: + collection_method: + enum: + - '' + - paper + type: string + x-stripeBypassValidation: true + title: mandate_options_param + type: object networks: properties: requested: @@ -94090,8 +105470,8 @@ paths: 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, + The list of payment method types (for example, card) that + this SetupIntent can use. If you don't provide this, it defaults to ["card"]. items: maxLength: 5000 @@ -94101,15 +105481,15 @@ paths: 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 + app or site. 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. + If you populate this hash, this SetupIntent generates a + `single_use` mandate after successful completion. properties: amount: type: integer @@ -94168,8 +105548,8 @@ paths: operationId: GetSetupIntentsIntent parameters: - description: >- - The client secret of the SetupIntent. Required if a publishable key - is used to retrieve the SetupIntent. + The client secret of the SetupIntent. We require this string if you + use a publishable key to retrieve the SetupIntent. in: query name: client_secret required: false @@ -94558,6 +105938,7 @@ paths: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -94603,6 +105984,10 @@ paths: additionalProperties: type: string type: object + mobilepay: + properties: {} + title: param + type: object oxxo: properties: {} title: param @@ -94635,6 +106020,7 @@ paths: - santander_przelew24 - tmobile_usbugi_bankowe - toyota_bank + - velobank - volkswagen_bank type: string x-stripeBypassValidation: true @@ -94661,7 +106047,11 @@ paths: session: maxLength: 5000 type: string - title: radar_options + title: radar_options_with_hidden_options + type: object + revolut_pay: + properties: {} + title: param type: object sepa_debit: properties: @@ -94687,6 +106077,10 @@ paths: - country title: param type: object + swish: + properties: {} + title: param + type: object type: enum: - acss_debit @@ -94708,14 +106102,17 @@ paths: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -94757,7 +106154,7 @@ paths: title: payment_method_data_params type: object payment_method_options: - description: Payment-method-specific configuration for this SetupIntent. + description: Payment method-specific configuration for this SetupIntent. properties: acss_debit: properties: @@ -94877,11 +106274,78 @@ paths: enum: - any - automatic - maxLength: 5000 + - challenge type: string x-stripeBypassValidation: true + three_d_secure: + properties: + ares_trans_status: + enum: + - A + - C + - I + - 'N' + - R + - U + - 'Y' + type: string + cryptogram: + maxLength: 5000 + type: string + electronic_commerce_indicator: + enum: + - '01' + - '02' + - '05' + - '06' + - '07' + type: string + x-stripeBypassValidation: true + network_options: + properties: + cartes_bancaires: + properties: + cb_avalgo: + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - A + type: string + cb_exemption: + maxLength: 4 + type: string + cb_score: + type: integer + required: + - cb_avalgo + title: cartes_bancaires_network_options_param + type: object + title: network_options_param + type: object + requestor_challenge_indicator: + maxLength: 2 + type: string + transaction_id: + maxLength: 5000 + type: string + version: + enum: + - 1.0.2 + - 2.1.0 + - 2.2.0 + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_param + type: object title: setup_intent_param type: object + card_present: + properties: {} + title: setup_intent_payment_method_options_param + type: object link: properties: {} title: setup_intent_payment_method_options_param @@ -94920,6 +106384,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -94928,6 +106393,16 @@ paths: type: string title: linked_account_options_param type: object + mandate_options: + properties: + collection_method: + enum: + - '' + - paper + type: string + x-stripeBypassValidation: true + title: mandate_options_param + type: object networks: properties: requested: @@ -94952,9 +106427,9 @@ paths: 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"]. + The list of payment method types (for example, card) that + this SetupIntent can set up. If you don't provide this + array, it defaults to ["card"]. items: maxLength: 5000 type: string @@ -94977,14 +106452,14 @@ paths: '/v1/setup_intents/{intent}/cancel': post: description: >- -

A SetupIntent object can be canceled when it is in one of these +

You can cancel a SetupIntent object when it’s 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.

+

After you cancel it, setup is abandoned and any operations on the + SetupIntent fail with an error.

operationId: PostSetupIntentsIntentCancel parameters: - in: path @@ -95006,7 +106481,7 @@ paths: properties: cancellation_reason: description: >- - Reason for canceling this SetupIntent. Possible values are + Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` enum: - abandoned @@ -95097,6 +106572,18 @@ paths: description: The client secret of the SetupIntent. maxLength: 5000 type: string + confirmation_token: + description: >- + ID of the ConfirmationToken used to confirm this + SetupIntent. + + + If the provided ConfirmationToken contains properties that + are also being provided in this request, such as + `payment_method`, then the values in this request will take + precedence. + maxLength: 5000 + type: string expand: description: Specifies which fields in the response should be expanded. items: @@ -95144,7 +106631,8 @@ paths: - enum: - '' type: string - - properties: + - description: This hash contains details about the Mandate to create + properties: customer_acceptance: properties: online: @@ -95170,7 +106658,6 @@ paths: - 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 @@ -95401,6 +106888,7 @@ paths: - knab - moneyou - n26 + - nn - rabobank - regiobank - revolut @@ -95446,6 +106934,10 @@ paths: additionalProperties: type: string type: object + mobilepay: + properties: {} + title: param + type: object oxxo: properties: {} title: param @@ -95478,6 +106970,7 @@ paths: - santander_przelew24 - tmobile_usbugi_bankowe - toyota_bank + - velobank - volkswagen_bank type: string x-stripeBypassValidation: true @@ -95504,7 +106997,11 @@ paths: session: maxLength: 5000 type: string - title: radar_options + title: radar_options_with_hidden_options + type: object + revolut_pay: + properties: {} + title: param type: object sepa_debit: properties: @@ -95530,6 +107027,10 @@ paths: - country title: param type: object + swish: + properties: {} + title: param + type: object type: enum: - acss_debit @@ -95551,14 +107052,17 @@ paths: - klarna - konbini - link + - mobilepay - oxxo - p24 - paynow - paypal - pix - promptpay + - revolut_pay - sepa_debit - sofort + - swish - us_bank_account - wechat_pay - zip @@ -95600,7 +107104,7 @@ paths: title: payment_method_data_params type: object payment_method_options: - description: Payment-method-specific configuration for this SetupIntent. + description: Payment method-specific configuration for this SetupIntent. properties: acss_debit: properties: @@ -95720,11 +107224,78 @@ paths: enum: - any - automatic - maxLength: 5000 + - challenge type: string x-stripeBypassValidation: true + three_d_secure: + properties: + ares_trans_status: + enum: + - A + - C + - I + - 'N' + - R + - U + - 'Y' + type: string + cryptogram: + maxLength: 5000 + type: string + electronic_commerce_indicator: + enum: + - '01' + - '02' + - '05' + - '06' + - '07' + type: string + x-stripeBypassValidation: true + network_options: + properties: + cartes_bancaires: + properties: + cb_avalgo: + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - A + type: string + cb_exemption: + maxLength: 4 + type: string + cb_score: + type: integer + required: + - cb_avalgo + title: cartes_bancaires_network_options_param + type: object + title: network_options_param + type: object + requestor_challenge_indicator: + maxLength: 2 + type: string + transaction_id: + maxLength: 5000 + type: string + version: + enum: + - 1.0.2 + - 2.1.0 + - 2.2.0 + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_param + type: object title: setup_intent_param type: object + card_present: + properties: {} + title: setup_intent_payment_method_options_param + type: object link: properties: {} title: setup_intent_payment_method_options_param @@ -95763,6 +107334,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -95771,6 +107343,16 @@ paths: type: string title: linked_account_options_param type: object + mandate_options: + properties: + collection_method: + enum: + - '' + - paper + type: string + x-stripeBypassValidation: true + title: mandate_options_param + type: object networks: properties: requested: @@ -97554,6 +109136,9 @@ paths: billing_thresholds: explode: true style: deepObject + discounts: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -97586,6 +109171,28 @@ paths: subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + 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 to redeem into discounts for the subscription + item. expand: description: Specifies which fields in the response should be expanded. items: @@ -97698,7 +109305,7 @@ paths: proration_behavior: description: >- Determines how to handle - [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + [prorations](https://stripe.com/docs/billing/subscriptions/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. The default value is @@ -97788,7 +109395,7 @@ paths: proration_behavior: description: >- Determines how to handle - [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + [prorations](https://stripe.com/docs/billing/subscriptions/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. The default value is @@ -97887,6 +109494,9 @@ paths: billing_thresholds: explode: true style: deepObject + discounts: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -97919,6 +109529,28 @@ paths: subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + 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 to redeem into discounts for the subscription + item. expand: description: Specifies which fields in the response should be expanded. items: @@ -98043,54 +109675,280 @@ paths: proration_behavior: description: >- Determines how to handle - [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + [prorations](https://stripe.com/docs/billing/subscriptions/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. The default value is `create_prorations`. enum: - - always_invoice - - create_prorations - - none + - 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: >- +

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 + 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: path + name: subscription_item + 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: + description: '' + properties: + data: + items: + $ref: '#/components/schemas/usage_record_summary' + 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: UsageEventsResourceUsageRecordSummaryList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + 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 + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + timestamp: + 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 - 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 + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array quantity: - description: >- - The quantity you'd like to apply to the subscription item - you're creating. + description: The usage quantity for the specified timestamp. type: integer - tax_rates: + timestamp: anyOf: - - items: - maxLength: 5000 - type: string - type: array - enum: - - '' + - now + maxLength: 5000 type: string + - format: unix-time + type: integer 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. + 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/subscription_item' + $ref: '#/components/schemas/usage_record' description: Successful response. default: content: @@ -98098,22 +109956,85 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/subscription_items/{subscription_item}/usage_record_summaries': + /v1/subscription_schedules: 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:

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 + 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 @@ -98147,6 +110068,35 @@ 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 @@ -98160,12 +110110,6 @@ paths: 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: @@ -98184,7 +110128,7 @@ paths: properties: data: items: - $ref: '#/components/schemas/usage_record_summary' + $ref: '#/components/schemas/subscription_schedule' type: array has_more: description: >- @@ -98201,13 +110145,14 @@ paths: 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: UsageEventsResourceUsageRecordSummaryList + title: SubscriptionSchedulesResourceScheduleList type: object x-expandableFields: - data @@ -98218,71 +110163,162 @@ 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 +

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 - timestamp: + metadata: + explode: true + style: deepObject + phases: + explode: true + style: deepObject + start_date: explode: true style: deepObject schema: additionalProperties: false properties: - action: + customer: 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. + 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 + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + 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: + anyOf: + - maxLength: 500 + type: string + - enum: + - '' + type: string + invoice_settings: + properties: + account_tax_ids: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + days_until_due: + type: integer + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + title: subscription_schedule_default_settings_param + type: object + on_behalf_of: + anyOf: + - type: string + - enum: + - '' + type: string + 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: >- + Behavior of the subscription schedule and underlying + subscription 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: - - increment - - set + - cancel + - none + - release + - renew type: string expand: description: Specifies which fields in the response should be expanded. @@ -98290,32 +110326,370 @@ paths: maxLength: 5000 type: string type: array - quantity: - description: The usage quantity for the specified timestamp. - type: integer - timestamp: + 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: + discounts: + 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 + 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_with_negative_amounts + 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 + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + 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: + anyOf: + - maxLength: 500 + type: string + - enum: + - '' + 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 + end_date: + format: unix-time + type: integer + invoice_settings: + properties: + account_tax_ids: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + days_until_due: + type: integer + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + title: invoice_settings + 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 + 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 + 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: configuration_item_params + type: object + type: array + iterations: + type: integer + metadata: + additionalProperties: + type: string + type: object + on_behalf_of: + type: string + 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: + - format: unix-time + type: integer - 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 + 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: true + required: false responses: '200': content: application/json: schema: - $ref: '#/components/schemas/usage_record' + $ref: '#/components/schemas/subscription_schedule' description: Successful response. default: content: @@ -98323,98 +110697,14 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/subscription_schedules: + '/v1/subscription_schedules/{schedule}': get: - description:

Retrieves the list of your subscription schedules.

- operationId: GetSubscriptionSchedules + 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: >- - 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 - 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 @@ -98426,57 +110716,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: schedule + required: true schema: maxLength: 5000 type: string - style: form + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -98491,38 +110737,7 @@ 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 - title: SubscriptionSchedulesResourceScheduleList - type: object - x-expandableFields: - - data + $ref: '#/components/schemas/subscription_schedule' description: Successful response. default: content: @@ -98531,10 +110746,16 @@ 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 an existing subscription schedule.

+ operationId: PostSubscriptionSchedulesSchedule + parameters: + - in: path + name: schedule + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -98551,18 +110772,9 @@ paths: 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 @@ -98574,6 +110786,19 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_config @@ -98612,8 +110837,30 @@ paths: type: string invoice_settings: properties: + account_tax_ids: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string days_until_due: type: integer + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object title: subscription_schedule_default_settings_param type: object on_behalf_of: @@ -98644,7 +110891,7 @@ paths: subscription 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 + subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. enum: - cancel @@ -98658,18 +110905,6 @@ paths: 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: @@ -98692,12 +110927,27 @@ paths: 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. + phase. Note that past phases can be omitted. items: properties: add_invoice_items: items: properties: + discounts: + 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 price: maxLength: 5000 type: string @@ -98744,6 +110994,19 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object required: - enabled title: automatic_tax_config @@ -98773,8 +111036,6 @@ paths: coupon: maxLength: 5000 type: string - currency: - type: string default_payment_method: maxLength: 5000 type: string @@ -98794,13 +111055,59 @@ paths: - enum: - '' 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 end_date: - format: unix-time - type: integer + anyOf: + - format: unix-time + type: integer + - enum: + - now + maxLength: 5000 + type: string invoice_settings: properties: + account_tax_ids: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string days_until_due: type: integer + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object title: invoice_settings type: object items: @@ -98818,6 +111125,25 @@ paths: - enum: - '' 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 metadata: additionalProperties: type: string @@ -98892,6 +111218,14 @@ paths: - create_prorations - none type: string + start_date: + anyOf: + - format: unix-time + type: integer + - enum: + - now + maxLength: 5000 + type: string transfer_data: properties: amount_percent: @@ -98905,26 +111239,28 @@ paths: trial: type: boolean trial_end: - format: unix-time - type: integer + anyOf: + - format: unix-time + type: integer + - enum: + - now + maxLength: 5000 + type: string required: - items title: phase_configuration_params type: object type: array - start_date: - anyOf: - - type: integer - - enum: - - now - maxLength: 5000 - type: string + proration_behavior: 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. + 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: @@ -98940,14 +111276,235 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/subscription_schedules/{schedule}': + '/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: + - in: path + name: schedule + 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 + 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: 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 + preserve_cancel_date: + description: >- + Keep any cancellation on the subscription that the schedule + has set + 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/subscriptions: 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 +

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: Filter subscriptions by their automatic tax settings. + explode: true + in: query + name: automatic_tax + required: false + schema: + properties: + enabled: + type: boolean + required: + - enabled + title: automatic_tax_filter_params + type: object + style: deepObject + - 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 + - description: >- + Only return subscriptions 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 + - 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 + 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 @@ -98959,13 +111516,74 @@ paths: type: string type: array style: deepObject - - in: path - name: schedule - required: true + - 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: Filter for subscriptions that contain this recurring price ID. + in: query + name: price + 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: >- + 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 + - paused + - trialing + - unpaid + type: string + 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: @@ -98980,7 +111598,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/subscription_schedule' + 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 + title: SubscriptionsSubscriptionList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -98989,517 +111638,918 @@ paths: $ref: '#/components/schemas/error' description: Error response. post: - description:

Updates an existing subscription schedule.

- operationId: PostSubscriptionSchedulesSchedule - parameters: - - in: path - name: schedule - required: true - schema: - maxLength: 5000 - type: string - style: simple + description: >- +

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.

+ operationId: PostSubscriptions requestBody: content: application/x-www-form-urlencoded: encoding: - default_settings: + add_invoice_items: + explode: true + style: deepObject + application_fee_percent: + explode: true + style: deepObject + automatic_tax: + explode: true + style: deepObject + billing_cycle_anchor_config: + explode: true + style: deepObject + billing_thresholds: + explode: true + style: deepObject + default_tax_rates: + explode: true + style: deepObject + discounts: explode: true style: deepObject expand: explode: true style: deepObject + invoice_settings: + explode: true + style: deepObject + items: + explode: true + style: deepObject metadata: explode: true style: deepObject - phases: + on_behalf_of: + 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 + trial_settings: explode: true style: deepObject schema: additionalProperties: false properties: - default_settings: + 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: + discounts: + 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 + 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_with_negative_amounts + 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: + anyOf: + - type: number + - enum: + - '' + type: string + description: >- + A non-negative decimal between 0 and 100, with at most two + decimal places. This represents the percentage of the + subscription invoice total 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). + automatic_tax: description: >- - Object representing the subscription schedule's default - settings. + Automatic tax settings for this subscription. We recommend + you only include this parameter when the existing value is + being changed. properties: - application_fee_percent: - type: number - automatic_tax: + enabled: + type: boolean + liability: 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: - anyOf: - - maxLength: 500 + account: type: string - - enum: - - '' + type: + enum: + - account + - self type: string - invoice_settings: - properties: - days_until_due: - type: integer - title: subscription_schedule_default_settings_param + required: + - type + title: param type: object - on_behalf_of: - anyOf: - - type: string - - enum: - - '' - type: string - 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 + required: + - enabled + title: automatic_tax_config type: object - end_behavior: + backdate_start_date: description: >- - Behavior of the subscription schedule and underlying - subscription 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. + 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 in UTC format to anchor the + subscription's [billing + cycle](https://stripe.com/docs/subscriptions/billing-cycle). + The anchor is the reference point that aligns future billing + cycle dates. It sets the day of week for `week` intervals, + the day of month for `month` and `year` intervals, and the + month of year for `year` intervals. + format: unix-time + type: integer + x-stripeBypassValidation: true + billing_cycle_anchor_config: + description: >- + Mutually exclusive with billing_cycle_anchor and only valid + with monthly and yearly price intervals. When provided, the + billing_cycle_anchor is set to the next occurence of the + day_of_month at the hour, minute, and second UTC. + properties: + day_of_month: + type: integer + hour: + type: integer + minute: + type: integer + month: + type: integer + second: + type: integer + required: + - day_of_month + title: billing_cycle_anchor_config_param + type: object + 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 and mark the subscription as `active`. Defaults + to `charge_automatically`. enum: - - cancel - - none - - release - - renew + - 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. This field has been + deprecated and will be removed in a future API version. Use + `discounts` instead. + 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 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: >- + 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 and certain local payment methods UIs. + maxLength: 500 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 to redeem into discounts for the subscription. + If not specified or empty, inherits the discount from the + subscription's customer. expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - metadata: - anyOf: - - additionalProperties: - type: string + invoice_settings: + description: All invoices will be billed using the specified settings. + properties: + account_tax_ids: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param 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: + title: invoice_settings_param + type: object + items: 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. + A list of up to 20 subscription items, each with an attached + price. 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_with_negative_amounts - 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: + usage_gte: type: integer - reset_billing_cycle_anchor: - type: boolean - title: billing_thresholds_param + required: + - usage_gte + title: item_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: + discounts: anyOf: - items: - maxLength: 5000 - type: string + 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: - anyOf: - - maxLength: 500 - type: string - - enum: - - '' + metadata: + additionalProperties: + type: string + type: object + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: type: string - end_date: - anyOf: - - type: integer - - enum: - - now + product: maxLength: 5000 type: string - invoice_settings: - properties: - days_until_due: + 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 - title: invoice_settings + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + - recurring + title: recurring_price_data type: object - items: - items: - properties: - billing_thresholds: - anyOf: - - properties: - usage_gte: - type: integer - required: - - usage_gte - title: item_billing_thresholds_param + 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 + on_behalf_of: + anyOf: + - type: string + - enum: + - '' + type: string + description: >- + The account on behalf of which to charge, for each of the + subscription's invoices. + payment_behavior: + description: >- + Only applies to subscriptions with + `collection_method=charge_automatically`. + + + Use `allow_incomplete` to create Subscriptions with + `status=incomplete` if the first invoice can't be paid. + Creating Subscriptions with this status allows you to manage + scenarios where additional customer 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 + PaymentIntent on the first invoice. This allows simpler + management of scenarios where additional customer 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 PaymentIntent 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 can't + be paid. For example, if a payment method requires 3DS + authentication due to SCA regulation and further customer + action is needed, this parameter doesn't 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. + + + Subscriptions with `collection_method=send_invoice` are + automatically activated regardless of the first Invoice + status. + 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 - - enum: - - '' + verification_method: + enum: + - automatic + - instant + - microdeposits type: string - metadata: - additionalProperties: - type: string + x-stripeBypassValidation: true + title: invoice_payment_method_options_param type: object - price: - maxLength: 5000 + - enum: + - '' type: string - price_data: - properties: - currency: - type: string - product: - maxLength: 5000 + bancontact: + anyOf: + - properties: + preferred_language: + enum: + - de + - en + - fr + - nl type: string - recurring: + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + card: + anyOf: + - properties: + mandate_options: properties: - interval: + amount: + type: integer + amount_type: enum: - - day - - month - - week - - year + - fixed + - maximum type: string - interval_count: - type: integer - required: - - interval - title: recurring_adhoc + description: + maxLength: 200 + type: string + title: mandate_options_param type: object - tax_behavior: + network: enum: - - exclusive - - inclusive - - unspecified + - amex + - cartes_bancaires + - diners + - discover + - eftpos_au + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + maxLength: 5000 type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal + x-stripeBypassValidation: true + request_three_d_secure: + enum: + - any + - automatic + - challenge type: string - required: - - currency - - product - - recurring - title: recurring_price_data + title: subscription_payment_method_options_param type: object - quantity: - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' + - 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: configuration_item_params - type: object - type: array - iterations: - type: integer - metadata: - additionalProperties: - type: string - type: object - on_behalf_of: - type: string - 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 + 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 + sepa_debit: + 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 + prefetch: + items: + enum: + - balances + - transactions + 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 + - cashapp + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - konbini + - link + - p24 + - paynow + - paypal + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay type: string - required: - - items - title: phase_configuration_params - type: object - type: array + 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 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. This + field has been deprecated and will be removed in a future + API version. Use `discounts` instead. + maxLength: 5000 + type: string proration_behavior: description: >- - If the update changes the current phase, indicates whether - the changes should be prorated. The default value is - `create_prorations`. + Determines how to handle + [prorations](https://stripe.com/docs/billing/subscriptions/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 - 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}/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: - - in: path - name: schedule - 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 - invoice_now: + transfer_data: 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: + 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 + - format: unix-time + type: integer 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: 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 - preserve_cancel_date: + Unix timestamp representing the end of the trial period the + customer will get before being charged for the first time. + 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: >- - Keep any cancellation on the subscription that the schedule - has set + 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 + trial_settings: + description: Settings related to subscription trials. + properties: + end_behavior: + properties: + missing_payment_method: + enum: + - cancel + - create_invoice + - pause + type: string + required: + - missing_payment_method + title: end_behavior + type: object + required: + - end_behavior + title: trial_settings_config + type: object + required: + - customer type: object - required: false + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/subscription_schedule' + $ref: '#/components/schemas/subscription' description: Successful response. default: content: @@ -99507,118 +112557,22 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/subscriptions: + /v1/subscriptions/search: 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 +

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: - - description: Filter subscriptions by their automatic tax settings. - explode: true - in: query - name: automatic_tax - required: false - schema: - properties: - enabled: - type: boolean - required: - - enabled - title: automatic_tax_filter_params - type: object - style: deepObject - - 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 - 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 - 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 @@ -99639,61 +112593,25 @@ 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 call can include `starting_after=obj_foo` in order to - fetch the next page of the list. + 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: starting_after + name: page required: false schema: 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 - - paused - - trialing - - unpaid - type: string - 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. + 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: test_clock - required: false + name: query + required: true schema: maxLength: 5000 type: string @@ -99719,28 +112637,32 @@ paths: $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 + 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`. + 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/subscriptions type: string required: - data - has_more - object - url - title: SubscriptionsSubscriptionList + title: SearchResult type: object x-expandableFields: - data @@ -99751,28 +112673,228 @@ 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 + parameters: + - in: path + name: subscription_exposed_id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + cancellation_details: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + cancellation_details: + description: Details about why this subscription was cancelled + properties: + comment: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + feedback: + enum: + - '' + - customer_service + - low_quality + - missing_features + - other + - switched_service + - too_complex + - too_expensive + - unused + type: string + title: cancellation_details_param + type: object + 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: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/subscription' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + get: + description:

Retrieves the subscription with the given ID.

+ operationId: GetSubscriptionsSubscriptionExposedId + 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 + 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/subscription' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. post: description: >- -

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

+

Updates an existing subscription to match the specified parameters. + When changing prices or quantities, we optionally prorate the price we + charge next month to make up for any price changes. -

When you create a subscription with - collection_method=charge_automatically, the first invoice - is finalized as part of the request. + To preview how the proration is calculated, use the upcoming invoice endpoint.

- The payment_behavior parameter determines the exact - behavior of the initial payment.

+

By default, we prorate subscription changes. For example, if a + customer signs up on May 1 for a 100 price, they’ll + be billed 100 immediately. If on May 15 they switch + to a 200 price, then on June 1 they’ll be billed + 250 (200 for a renewal of her + subscription, plus a 50 prorating adjustment for + half of the previous month’s 100 difference). + Similarly, a downgrade generates a credit that is applied to the next + invoice. We also prorate when you make quantity changes.

-

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 +

Switching prices does not normally change the billing date or + generate an immediate charge unless:

+ + +
    + +
  • The billing interval is changed (for example, from monthly to + yearly).
  • + +
  • The subscription moves from free to paid, or paid to free.
  • + +
  • A trial starts or ends.
  • + +
+ + +

In these cases, we apply a credit for the unused time on the previous + price, immediately charge the customer using the new price, and reset + the billing date.

+ + +

If you want to charge for an upgrade immediately, pass + proration_behavior as always_invoice to create + prorations, automatically invoice the customer for those proration + adjustments, and attempt to collect payment. If you pass + create_prorations, the prorations are created but not + automatically invoiced. If you want to bill the customer for the + prorations before the subscription’s renewal date, you need to manually + invoice the customer.

+ + +

If you don’t want to prorate, set the proration_behavior + option to none. With this option, the customer is billed + 100 on May 1 and 200 on June + 1. Similarly, if you set proration_behavior to + none when switching between different billing intervals + (for example, from monthly to yearly), we don’t generate any credits for + the old subscription’s unused time. We still reset the billing date and + bill immediately for the new subscription.

+ + +

Updating the quantity on a subscription many times in an hour may + result in rate limiting. If you need to + bill for a frequently changing quantity, consider integrating usage-based billing + instead.

+ 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: @@ -99780,18 +112902,39 @@ paths: add_invoice_items: explode: true style: deepObject + application_fee_percent: + explode: true + style: deepObject automatic_tax: explode: true style: deepObject billing_thresholds: explode: true style: deepObject + cancel_at: + explode: true + style: deepObject + cancellation_details: + explode: true + style: deepObject + default_source: + explode: true + style: deepObject default_tax_rates: explode: true style: deepObject + description: + explode: true + style: deepObject + discounts: + explode: true + style: deepObject expand: explode: true style: deepObject + invoice_settings: + explode: true + style: deepObject items: explode: true style: deepObject @@ -99801,6 +112944,9 @@ paths: on_behalf_of: explode: true style: deepObject + pause_collection: + explode: true + style: deepObject payment_settings: explode: true style: deepObject @@ -99826,6 +112972,21 @@ paths: You may pass up to 20 items. items: properties: + discounts: + 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 price: maxLength: 5000 type: string @@ -99867,6 +113028,11 @@ paths: type: object type: array application_fee_percent: + anyOf: + - type: number + - enum: + - '' + type: string description: >- A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the @@ -99876,7 +113042,6 @@ paths: 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 @@ -99885,29 +113050,35 @@ paths: properties: enabled: type: boolean + liability: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object 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 + 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: @@ -99926,19 +113097,47 @@ paths: 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. - 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 + cancellation_details: + description: Details about why this subscription was cancelled + properties: + comment: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + feedback: + enum: + - '' + - customer_service + - low_quality + - missing_features + - other + - switched_service + - too_complex + - too_expensive + - unused + type: string + title: cancellation_details_param + type: object collection_method: description: >- Either `charge_automatically`, or `send_invoice`. When @@ -99956,18 +113155,9 @@ paths: 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: The identifier of the customer to subscribe. + for that particular subscription. This field has been + deprecated and will be removed in a future API version. Use + `discounts` instead. maxLength: 5000 type: string days_until_due: @@ -99988,6 +113178,12 @@ paths: maxLength: 5000 type: string default_source: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string description: >- ID of the default payment source for the subscription. It must belong to the customer associated with the subscription @@ -99996,9 +113192,7 @@ paths: 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](https://stripe.com/docs/api/customers/object#customer_object-default_source). default_tax_rates: anyOf: - items: @@ -100012,20 +113206,75 @@ paths: 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: + anyOf: + - maxLength: 500 + type: string + - enum: + - '' + type: 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. - maxLength: 500 - type: string + surfaces and certain local payment methods UIs. + 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 to redeem into discounts for the subscription. + If not specified or empty, inherits the discount from the + subscription's customer. expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + invoice_settings: + description: All invoices will be billed using the specified settings. + properties: + account_tax_ids: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + issuer: + properties: + account: + type: string + type: + enum: + - account + - self + type: string + required: + - type + title: param + type: object + title: invoice_settings_param + type: object items: description: >- A list of up to 20 subscription items, each with an attached @@ -100044,10 +113293,40 @@ paths: - enum: - '' type: string + clear_usage: + type: boolean + deleted: + type: boolean + 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 + id: + maxLength: 5000 + type: string metadata: - additionalProperties: - type: string - type: object + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string price: maxLength: 5000 type: string @@ -100101,7 +113380,7 @@ paths: - enum: - '' type: string - title: subscription_item_create_params + title: subscription_item_update_params type: object type: array metadata: @@ -100134,55 +113413,70 @@ paths: description: >- The account on behalf of which to charge, for each of the subscription's invoices. + 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. Note that the subscription status will be + unchanged and will not be updated to `paused`. Learn more + about [pausing + collection](/billing/subscriptions/pause-payment). payment_behavior: description: >- - Only applies to subscriptions with - `collection_method=charge_automatically`. - - - 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 + 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 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 + 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. 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. + or collecting a mandate for a bank debit payment method. - `pending_if_incomplete` is only used with updates and cannot - be passed when creating a subscription. + 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). - Subscriptions with `collection_method=send_invoice` are - automatically activated regardless of the first invoice - status. + 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 @@ -100272,6 +113566,7 @@ paths: enum: - any - automatic + - challenge type: string title: subscription_payment_method_options_param type: object @@ -100311,6 +113606,14 @@ paths: - enum: - '' type: string + sepa_debit: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string us_bank_account: anyOf: - properties: @@ -100331,6 +113634,7 @@ paths: items: enum: - balances + - transactions type: string x-stripeBypassValidation: true type: array @@ -100348,163 +113652,551 @@ paths: - enum: - '' type: string - title: payment_method_options + 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 + - cashapp + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - konbini + - link + - p24 + - paynow + - paypal + - 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 + proration_behavior: + description: >- + Determines how to handle + [prorations](https://stripe.com/docs/billing/subscriptions/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. The default value is + `create_prorations`. + 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#upcoming_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 + trial_settings: + description: Settings related to subscription trials. + properties: + end_behavior: + properties: + missing_payment_method: + enum: + - cancel + - create_invoice + - pause + type: string + required: + - missing_payment_method + title: end_behavior + type: object + required: + - end_behavior + title: trial_settings_config + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/subscription' + description: Successful response. + default: + content: + application/json: + 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 + parameters: + - in: path + name: subscription_exposed_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_discount' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/subscriptions/{subscription}/resume': + post: + description: >- +

Initiates resumption of a paused subscription, optionally resetting + the billing cycle anchor and creating prorations. If a resumption + invoice is generated, it must be paid or marked uncollectible before the + subscription will be unpaused. If payment succeeds the subscription will + become active, and if payment fails the subscription will + be past_due. The resumption invoice will void automatically + if not paid by the expiration date.

+ operationId: PostSubscriptionsSubscriptionResume + parameters: + - in: path + name: subscription + 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: + 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). Setting the value to `unchanged` + advances the subscription's billing cycle anchor to the + period that surrounds 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 + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + proration_behavior: + description: >- + Determines how to handle + [prorations](https://stripe.com/docs/billing/subscriptions/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. The default value is + `create_prorations`. + enum: + - always_invoice + - create_prorations + - none + type: string + proration_date: + description: >- + If set, the proration will be calculated as though the + subscription was resumed 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. + format: unix-time + type: integer + type: object + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/subscription' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/tax/calculations: + post: + description: >- +

Calculates tax based on input and returns a Tax + Calculation object.

+ operationId: PostTaxCalculations + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + customer_details: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + line_items: + explode: true + style: deepObject + shipping_cost: + explode: true + style: deepObject + schema: + additionalProperties: false + 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 + customer: + description: >- + The ID of an existing customer to use for this calculation. + If provided, the customer's address and tax IDs are copied + to `customer_details`. + maxLength: 5000 + type: string + customer_details: + description: 'Details about the customer, including address and tax IDs.' + properties: + address: + properties: + city: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + country: + maxLength: 5000 + type: string + line1: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + line2: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + postal_code: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + state: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + required: + - country + title: postal_address type: object - payment_method_types: - anyOf: - - items: + address_source: + enum: + - billing + - shipping + type: string + ip_address: + type: string + tax_ids: + items: + properties: + type: enum: - - ach_credit_transfer - - ach_debit - - acss_debit - - au_becs_debit - - bacs_debit - - bancontact - - boleto - - card - - cashapp - - customer_balance - - fpx - - giropay - - grabpay - - ideal - - konbini - - link - - paynow - - paypal - - promptpay - - sepa_debit - - sofort - - us_bank_account - - wechat_pay + - ad_nrt + - ae_trn + - ar_cuit + - au_abn + - au_arn + - bg_uic + - bo_tin + - br_cnpj + - br_cpf + - ca_bn + - ca_gst_hst + - ca_pst_bc + - ca_pst_mb + - ca_pst_sk + - ca_qst + - ch_vat + - cl_tin + - cn_tin + - co_nit + - cr_tin + - do_rcn + - ec_ruc + - eg_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 + - jp_trn + - ke_pin + - kr_brn + - li_uid + - mx_rfc + - my_frp + - my_itn + - my_sst + - no_vat + - no_voec + - nz_gst + - pe_ruc + - ph_tin + - ro_tin + - rs_pib + - ru_inn + - ru_kpp + - sa_vat + - sg_gst + - sg_uen + - si_tin + - sv_nit + - th_vat + - tr_tin + - tw_vat + - ua_vat + - us_ein + - uy_ruc + - ve_rif + - vn_tin + - za_vat + maxLength: 5000 type: string x-stripeBypassValidation: true - type: array - - enum: - - '' - type: string - save_default_payment_method: + value: + type: string + required: + - type + - value + title: data_params + type: object + type: array + taxability_override: enum: - - 'off' - - on_subscription + - customer_exempt + - none + - reverse_charge type: string - title: payment_settings + title: customer_details 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`. 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. + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + line_items: + description: A list of items the customer is purchasing. + items: + properties: + amount: + type: integer + product: + maxLength: 5000 + type: string + quantity: + type: integer + reference: + maxLength: 500 + type: string + tax_behavior: + enum: + - exclusive + - inclusive + type: string + tax_code: + type: string + required: + - amount + title: calculation_line_item + type: object + type: array + shipping_cost: + description: Shipping cost details to be used for the calculation. properties: - amount_percent: - type: number - destination: - type: string - required: - - destination - title: transfer_data_specs - type: object - trial_end: - anyOf: - - enum: - - now + amount: + type: integer + shipping_rate: 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. - 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: + tax_behavior: + enum: + - exclusive + - inclusive + type: string + tax_code: + type: string + title: shipping_cost + type: object + tax_date: 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. + Timestamp of date at which the tax rules and rates in effect + applies for the calculation. Measured in seconds since the + Unix epoch. Can be up to 48 hours in the past, and up to 48 + hours in the future. type: integer - trial_settings: - description: Settings related to subscription trials. - properties: - end_behavior: - properties: - missing_payment_method: - enum: - - cancel - - create_invoice - - pause - type: string - required: - - missing_payment_method - title: end_behavior - type: object - required: - - end_behavior - title: trial_settings_config - type: object required: - - customer + - currency + - line_items type: object required: true responses: @@ -100512,7 +114204,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/subscription' + $ref: '#/components/schemas/tax.calculation' description: Successful response. default: content: @@ -100520,22 +114212,33 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - /v1/subscriptions/search: + '/v1/tax/calculations/{calculation}/line_items': get: description: >- -

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 +

Retrieves the line items of a persisted tax calculation as a + collection.

+ operationId: GetTaxCalculationsCalculationLineItems parameters: + - in: path + name: calculation + 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: 500 + type: string + style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -100557,26 +114260,16 @@ paths: 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. + A cursor for use in pagination. `starting_after` is an object ID + that defines your place in the list. For instance, if you make a + list request and receive 100 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: page + name: starting_after 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 + maxLength: 500 type: string style: form requestBody: @@ -100596,140 +114289,36 @@ paths: description: '' properties: data: + description: Details about each object. items: - $ref: '#/components/schemas/subscription' + $ref: '#/components/schemas/tax.calculation_line_item' 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/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: subscription_exposed_id - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - cancellation_details: - explode: true - style: deepObject - expand: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - cancellation_details: - description: Details about why this subscription was cancelled - properties: - comment: - anyOf: - - maxLength: 5000 - type: string - - enum: - - '' - type: string - feedback: - enum: - - '' - - customer_service - - low_quality - - missing_features - - other - - switched_service - - too_complex - - too_expensive - - unused - type: string - title: cancellation_details_param - type: object - 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: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/subscription' + 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/calculations/[^/]+/line_items' + type: string + required: + - data + - has_more + - object + - url + title: TaxProductResourceTaxCalculationLineItemList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -100737,10 +114326,24 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. + /v1/tax/registrations: get: - description:

Retrieves the subscription with the given ID.

- operationId: GetSubscriptionsSubscriptionExposedId + description:

Returns a list of Tax Registration objects.

+ operationId: GetTaxRegistrations 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 @@ -100752,13 +114355,40 @@ paths: type: string type: array style: deepObject - - in: path - name: subscription_exposed_id - required: true + - 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 + - description: The status of the Tax Registration. + in: query + name: status + required: false + schema: + enum: + - active + - all + - expired + - scheduled + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -100773,7 +114403,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/subscription' + description: '' + properties: + data: + items: + $ref: '#/components/schemas/tax.registration' + 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/registrations + type: string + required: + - data + - has_more + - object + - url + title: TaxProductRegistrationsResourceTaxRegistrationList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -100782,1135 +114443,953 @@ paths: $ref: '#/components/schemas/error' description: Error response. 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 - parameters: - - in: path - name: subscription_exposed_id - required: true - schema: - maxLength: 5000 - type: string - style: simple + description:

Creates a new Tax Registration object.

+ operationId: PostTaxRegistrations 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 - cancel_at: - explode: true - style: deepObject - cancellation_details: + active_from: explode: true style: deepObject - default_source: - explode: true - style: deepObject - default_tax_rates: - explode: true - style: deepObject - description: - explode: true - style: deepObject - expand: - explode: true - style: deepObject - items: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - on_behalf_of: - 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 - trial_settings: + country_options: 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_with_negative_amounts - 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 total 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 - 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 - cancellation_details: - description: Details about why this subscription was cancelled - properties: - comment: - anyOf: - - maxLength: 5000 - type: string - - enum: - - '' - type: string - feedback: - enum: - - '' - - customer_service - - low_quality - - missing_features - - other - - switched_service - - too_complex - - too_expensive - - unused - type: string - title: cancellation_details_param - type: object - 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 and mark the subscription as `active`. 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: - anyOf: - - maxLength: 5000 - type: string - - enum: - - '' - type: 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_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: - anyOf: - - maxLength: 500 - type: string - - enum: - - '' - type: 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. - 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 - 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: - 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 - on_behalf_of: - anyOf: - - type: string - - enum: - - '' - type: string - description: >- - The account on behalf of which to charge, for each of the - subscription's invoices. - pause_collection: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + active_from: 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: - - '' + - now + maxLength: 5000 type: string + - format: unix-time + type: integer description: >- - If specified, payment collection for this subscription will - be paused. - payment_behavior: + Time at which the Tax Registration becomes active. It can be + either `now` to indicate the current time, or a future + timestamp measured in seconds since the Unix epoch. + country: 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 + Two-letter country code ([ISO 3166-1 + alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + maxLength: 5000 type: string - payment_settings: + country_options: description: >- - Payment settings to pass to invoices created by the - subscription. + Specific options for a registration in the specified + `country`. properties: - payment_method_options: + ae: 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: + enum: + - standard + type: string + required: + - type + title: default + type: object + at: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard type: string - bancontact: - anyOf: - - properties: - preferred_language: - enum: - - de - - en - - fr - - nl - type: string - title: invoice_payment_method_options_param - type: object - - enum: - - '' + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + au: + properties: + type: + enum: + - standard + type: string + required: + - type + title: default + type: object + be: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard 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 - - eftpos_au - - 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: - - '' + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + bg: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard 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: - - '' + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + ca: + properties: + province_standard: + properties: + province: + maxLength: 5000 type: string - konbini: - anyOf: - - properties: {} - title: invoice_payment_method_options_param - type: object - - enum: - - '' + required: + - province + title: province_standard + type: object + type: + enum: + - province_standard + - simplified + - standard + type: string + required: + - type + title: canada + type: object + ch: + properties: + type: + enum: + - standard + type: string + required: + - type + title: default + type: object + cl: + properties: + type: + enum: + - simplified + type: string + required: + - type + title: simplified + type: object + co: + properties: + type: + enum: + - simplified + type: string + required: + - type + title: simplified + type: object + cy: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard 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 - prefetch: - items: - enum: - - balances - 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: - - '' + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + cz: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + de: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + dk: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + ee: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + es: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + fi: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + fr: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + gb: + properties: + type: + enum: + - standard + type: string + required: + - type + title: default + type: object + gr: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + hr: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + hu: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + id: + properties: + type: + enum: + - simplified + type: string + required: + - type + title: simplified + type: object + ie: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + is: + properties: + type: + enum: + - standard + type: string + required: + - type + title: default + type: object + it: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + jp: + properties: + type: + enum: + - standard + type: string + required: + - type + title: default + type: object + kr: + properties: + type: + enum: + - simplified + type: string + required: + - type + title: simplified + type: object + lt: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard type: string - title: payment_method_options + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe type: object - payment_method_types: - anyOf: - - items: - enum: - - ach_credit_transfer - - ach_debit - - acss_debit - - au_becs_debit - - bacs_debit - - bancontact - - boleto - - card - - cashapp - - customer_balance - - fpx - - giropay - - grabpay - - ideal - - konbini - - link - - paynow - - paypal - - promptpay - - sepa_debit - - sofort - - us_bank_account - - wechat_pay - type: string - x-stripeBypassValidation: true - type: array - - enum: - - '' + lu: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard type: string - save_default_payment_method: - enum: - - 'off' - - on_subscription - type: string - title: payment_settings - type: object - pending_invoice_item_interval: - anyOf: - - properties: - interval: + required: + - type + title: europe + type: object + lv: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: enum: - - day - - month - - week - - year + - ioss + - oss_non_union + - oss_union + - standard type: string - interval_count: - type: integer required: - - interval - title: pending_invoice_item_interval_params + - type + title: europe 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. The default value is - `create_prorations`. - 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#upcoming_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: + mt: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard type: string required: - - destination - title: transfer_data_specs + - type + title: europe 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 - trial_settings: - description: Settings related to subscription trials. - properties: - end_behavior: + mx: properties: - missing_payment_method: + type: enum: - - cancel - - create_invoice - - pause + - simplified type: string required: - - missing_payment_method - title: end_behavior + - type + title: simplified type: object - required: - - end_behavior - title: trial_settings_config - type: object - type: object - required: false - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/subscription' - description: Successful response. - default: - content: - application/json: - 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 - parameters: - - in: path - name: subscription_exposed_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_discount' - description: Successful response. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/error' - description: Error response. - '/v1/subscriptions/{subscription}/resume': - post: - description: >- -

Initiates resumption of a paused subscription, optionally resetting - the billing cycle anchor and creating prorations. If a resumption - invoice is generated, it must be paid or marked uncollectible before the - subscription will be unpaused. If payment succeeds the subscription will - become active, and if payment fails the subscription will - be past_due. The resumption invoice will void automatically - if not paid by the expiration date.

- operationId: PostSubscriptionsSubscriptionResume - parameters: - - in: path - name: subscription - 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: - 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). Setting the value to `unchanged` - advances the subscription's billing cycle anchor to the - period that surrounds 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 - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - 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. The default value is - `create_prorations`. - enum: - - always_invoice - - create_prorations - - none - type: string - proration_date: - description: >- - If set, the proration will be calculated as though the - subscription was resumed 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. - format: unix-time - type: integer - type: object - required: false - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/subscription' - description: Successful response. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/error' - description: Error response. - /v1/tax/calculations: - post: - description: >- -

Calculates tax based on input and returns a Tax - Calculation object.

- operationId: PostTaxCalculations - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - customer_details: - explode: true - style: deepObject - expand: - explode: true - style: deepObject - line_items: - explode: true - style: deepObject - shipping_cost: - explode: true - style: deepObject - schema: - additionalProperties: false - 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 - customer: - description: >- - The ID of an existing customer to use for this calculation. - If provided, the customer's address and tax IDs are copied - to `customer_details`. - maxLength: 5000 - type: string - customer_details: - description: 'Details about the customer, including address and tax IDs.' - properties: - address: + my: properties: - city: - anyOf: - - maxLength: 5000 + type: + enum: + - simplified + type: string + required: + - type + title: simplified + type: object + nl: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard type: string - - enum: - - '' + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + 'no': + properties: + type: + enum: + - standard + type: string + required: + - type + title: default + type: object + nz: + properties: + type: + enum: + - standard + type: string + required: + - type + title: default + type: object + pl: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard type: string - country: - maxLength: 5000 + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard type: string - line1: - anyOf: - - maxLength: 5000 + required: + - type + title: europe + type: object + pt: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard type: string - - enum: - - '' + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + ro: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard type: string - line2: - anyOf: - - maxLength: 5000 + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + sa: + properties: + type: + enum: + - simplified + type: string + required: + - type + title: simplified + type: object + se: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard type: string - - enum: - - '' + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + sg: + properties: + type: + enum: + - standard + type: string + required: + - type + title: default + type: object + si: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard type: string - postal_code: - anyOf: - - maxLength: 5000 + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + sk: + properties: + standard: + properties: + place_of_supply_scheme: + enum: + - small_seller + - standard + type: string + required: + - place_of_supply_scheme + title: standard + type: object + type: + enum: + - ioss + - oss_non_union + - oss_union + - standard + type: string + required: + - type + title: europe + type: object + th: + properties: + type: + enum: + - simplified + type: string + required: + - type + title: simplified + type: object + tr: + properties: + type: + enum: + - simplified + type: string + required: + - type + title: simplified + type: object + us: + properties: + local_amusement_tax: + properties: + jurisdiction: + maxLength: 5000 type: string - - enum: - - '' + required: + - jurisdiction + title: local_amusement_tax + type: object + local_lease_tax: + properties: + jurisdiction: + maxLength: 5000 type: string + required: + - jurisdiction + title: local_lease_tax + type: object state: - anyOf: - - maxLength: 5000 - type: string - - enum: - - '' - type: string + maxLength: 5000 + type: string + type: + enum: + - local_amusement_tax + - local_lease_tax + - state_communications_tax + - state_sales_tax + type: string + x-stripeBypassValidation: true required: - - country - title: postal_address + - state + - type + title: united_states type: object - address_source: - enum: - - billing - - shipping - type: string - ip_address: - type: string - tax_ids: - items: - properties: - type: - enum: - - ad_nrt - - ae_trn - - ar_cuit - - au_abn - - au_arn - - bg_uic - - bo_tin - - br_cnpj - - br_cpf - - ca_bn - - ca_gst_hst - - ca_pst_bc - - ca_pst_mb - - ca_pst_sk - - ca_qst - - ch_vat - - cl_tin - - cn_tin - - co_nit - - cr_tin - - do_rcn - - ec_ruc - - eg_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 - - jp_trn - - ke_pin - - kr_brn - - li_uid - - mx_rfc - - my_frp - - my_itn - - my_sst - - no_vat - - nz_gst - - pe_ruc - - ph_tin - - ro_tin - - rs_pib - - ru_inn - - ru_kpp - - sa_vat - - sg_gst - - sg_uen - - si_tin - - sv_nit - - th_vat - - tr_tin - - tw_vat - - ua_vat - - us_ein - - uy_ruc - - ve_rif - - vn_tin - - za_vat - maxLength: 5000 - type: string - x-stripeBypassValidation: true - value: - type: string - required: - - type - - value - title: data_params - type: object - type: array - taxability_override: - enum: - - customer_exempt - - none - - reverse_charge - type: string - title: customer_details + vn: + properties: + type: + enum: + - simplified + type: string + required: + - type + title: simplified + type: object + za: + properties: + type: + enum: + - standard + type: string + required: + - type + title: default + type: object + title: country_options type: object expand: description: Specifies which fields in the response should be expanded. @@ -101918,59 +115397,18 @@ paths: maxLength: 5000 type: string type: array - line_items: - description: A list of items the customer is purchasing. - items: - properties: - amount: - type: integer - product: - maxLength: 5000 - type: string - quantity: - type: integer - reference: - maxLength: 500 - type: string - tax_behavior: - enum: - - exclusive - - inclusive - type: string - tax_code: - type: string - required: - - amount - title: calculation_line_item - type: object - type: array - shipping_cost: - description: Shipping cost details to be used for the calculation. - properties: - amount: - type: integer - shipping_rate: - maxLength: 5000 - type: string - tax_behavior: - enum: - - exclusive - - inclusive - type: string - tax_code: - type: string - title: shipping_cost - type: object - tax_date: + expires_at: description: >- - Timestamp of date at which the tax rules and rates in effect - applies for the calculation. Measured in seconds since the - Unix epoch. Can be up to 48 hours in the past, and up to 48 - hours in the future. + If set, the Tax Registration stops being active at this + time. If not set, the Tax Registration will be active + indefinitely. Timestamp measured in seconds since the Unix + epoch. + format: unix-time type: integer required: - - currency - - line_items + - active_from + - country + - country_options type: object required: true responses: @@ -101978,7 +115416,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/tax.calculation' + $ref: '#/components/schemas/tax.registration' description: Successful response. default: content: @@ -101986,33 +115424,11 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/tax/calculations/{calculation}/line_items': + '/v1/tax/registrations/{id}': get: - description: >- -

Retrieves the line items of a persisted tax calculation as a - collection.

- operationId: GetTaxCalculationsCalculationLineItems + description:

Returns a Tax Registration object.

+ operationId: GetTaxRegistrationsId parameters: - - in: path - name: calculation - 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: 500 - type: string - style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -102024,28 +115440,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: id + required: true schema: - maxLength: 500 + maxLength: 5000 type: string - style: form + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -102060,39 +115461,89 @@ paths: content: application/json: schema: - description: '' - properties: - data: - description: Details about each object. - items: - $ref: '#/components/schemas/tax.calculation_line_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. + $ref: '#/components/schemas/tax.registration' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + post: + description: >- +

Updates an existing Tax Registration object.

+ + +

A registration cannot be deleted after it has been created. If you + wish to end a registration you may do so by setting + expires_at.

+ operationId: PostTaxRegistrationsId + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + active_from: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + expires_at: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + active_from: + anyOf: + - enum: + - now + maxLength: 5000 + type: string + - format: unix-time + type: integer + description: >- + Time at which the registration becomes active. It can be + either `now` to indicate the current time, or a timestamp + measured in seconds since the Unix epoch. + expand: + description: Specifies which fields in the response should be expanded. + items: maxLength: 5000 - pattern: '^/v1/tax/calculations/[^/]+/line_items' type: string - required: - - data - - has_more - - object - - url - title: TaxProductResourceTaxCalculationLineItemList - type: object - x-expandableFields: - - data + type: array + expires_at: + anyOf: + - enum: + - now + maxLength: 5000 + type: string + - format: unix-time + type: integer + - enum: + - '' + type: string + description: >- + If set, the registration stops being active at this time. If + not set, the registration will be active indefinitely. It + can be either `now` to indicate the current time, or a + timestamp measured in seconds since the Unix epoch. + type: object + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tax.registration' description: Successful response. default: content: @@ -102322,8 +115773,10 @@ paths: flat_amount: description: >- A flat amount to reverse across the entire transaction, in - negative integer cents. This value represents the total - amount to refund from the transaction, including taxes. + the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal) in + negative. This value represents the total amount to refund + from the transaction, including taxes. type: integer line_items: description: The line item amounts to reverse. @@ -102670,7 +116123,185 @@ paths: - has_more - object - url - title: TaxProductResourceTaxCodeList + title: TaxProductResourceTaxCodeList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/tax_codes/{id}': + 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 + 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/tax_code' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + /v1/tax_ids: + get: + description:

Returns a list of tax IDs.

+ operationId: GetTaxIds + 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: >- + The account or customer the tax ID belongs to. Defaults to + `owner[type]=self`. + explode: true + in: query + name: owner + required: false + schema: + properties: + account: + type: string + customer: + maxLength: 5000 + type: string + type: + enum: + - account + - application + - customer + - self + type: string + required: + - type + title: owner_params + 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: + description: Details about each object. + items: + $ref: '#/components/schemas/tax_id' + 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: TaxIDsList type: object x-expandableFields: - data @@ -102681,13 +116312,195 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/tax_codes/{id}': - get: + post: + description:

Creates a new account or customer tax_id object.

+ operationId: PostTaxIds + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + owner: + 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 + owner: + description: >- + The account or customer the tax ID belongs to. Defaults to + `owner[type]=self`. + properties: + account: + type: string + customer: + maxLength: 5000 + type: string + type: + enum: + - account + - application + - customer + - self + type: string + required: + - type + title: owner_params + type: object + type: + description: >- + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, + `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, + `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, + `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, + `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_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`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, + `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, + `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, + `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, + `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, + `vn_tin`, or `za_vat` + enum: + - ad_nrt + - ae_trn + - ar_cuit + - au_abn + - au_arn + - bg_uic + - bo_tin + - br_cnpj + - br_cpf + - ca_bn + - ca_gst_hst + - ca_pst_bc + - ca_pst_mb + - ca_pst_sk + - ca_qst + - ch_vat + - cl_tin + - cn_tin + - co_nit + - cr_tin + - do_rcn + - ec_ruc + - eg_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 + - jp_trn + - ke_pin + - kr_brn + - li_uid + - mx_rfc + - my_frp + - my_itn + - my_sst + - no_vat + - no_voec + - nz_gst + - pe_ruc + - ph_tin + - ro_tin + - rs_pib + - ru_inn + - ru_kpp + - sa_vat + - sg_gst + - sg_uen + - si_tin + - sv_nit + - th_vat + - tr_tin + - tw_vat + - ua_vat + - us_ein + - uy_ruc + - ve_rif + - vn_tin + - za_vat + maxLength: 5000 + type: string + x-stripeBypassValidation: true + value: + description: Value of the tax ID. + type: string + required: + - type + - value + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tax_id' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/tax_ids/{id}': + delete: 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 +

Deletes an existing account or customer tax_id + object.

+ operationId: DeleteTaxIdsId + 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_tax_id' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + get: + description:

Retrieves an account or customer tax_id object.

+ operationId: GetTaxIdsId parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -102721,7 +116534,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/tax_code' + $ref: '#/components/schemas/tax_id' description: Successful response. default: content: @@ -102968,9 +116781,9 @@ paths: - qst - rst - sales_tax - - service_tax - vat type: string + x-stripeBypassValidation: true required: - display_name - inclusive @@ -103135,9 +116948,9 @@ paths: - qst - rst - sales_tax - - service_tax - vat type: string + x-stripeBypassValidation: true type: object required: false responses: @@ -103279,6 +117092,9 @@ paths: expand: explode: true style: deepObject + offline: + explode: true + style: deepObject tipping: explode: true style: deepObject @@ -103307,6 +117123,23 @@ paths: maxLength: 5000 type: string type: array + name: + description: Name of the configuration + maxLength: 100 + type: string + offline: + anyOf: + - properties: + enabled: + type: boolean + required: + - enabled + title: offline + type: object + - enum: + - '' + type: string + description: Configurations for collecting transactions offline. tipping: anyOf: - properties: @@ -103641,6 +117474,9 @@ paths: expand: explode: true style: deepObject + offline: + explode: true + style: deepObject tipping: explode: true style: deepObject @@ -103673,6 +117509,23 @@ paths: maxLength: 5000 type: string type: array + name: + description: Name of the configuration + maxLength: 100 + type: string + offline: + anyOf: + - properties: + enabled: + type: boolean + required: + - enabled + title: offline + type: object + - enum: + - '' + type: string + description: Configurations for collecting transactions offline. tipping: anyOf: - properties: @@ -104368,6 +118221,7 @@ paths: - bbpos_chipper2x - bbpos_wisepad3 - bbpos_wisepos_e + - mobile_phone_reader - simulated_wisepos_e - stripe_m2 - verifone_P400 @@ -104773,10 +118627,239 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/terminal/readers/{reader}/process_payment_intent': + '/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 + type: array + payment_intent: + description: PaymentIntent ID + maxLength: 5000 + type: string + process_config: + description: Configuration overrides + properties: + enable_customer_cancellation: + type: boolean + skip_tipping: + type: boolean + tipping: + properties: + amount_eligible: + type: integer + title: tipping_config + type: object + title: process_config + type: object + required: + - payment_intent + 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}/process_setup_intent': + post: + description:

Initiates a setup intent flow on a Reader.

+ operationId: PostTerminalReadersReaderProcessSetupIntent + 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: + 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 + process_config: + description: Configuration overrides + properties: + enable_customer_cancellation: + type: boolean + title: process_setup_config + type: object + setup_intent: + description: SetupIntent ID + maxLength: 5000 + type: string + required: + - customer_consent_collected + - setup_intent + 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}/refund_payment': + post: + description:

Initiates a refund on a Reader

+ operationId: PostTerminalReadersReaderRefundPayment + 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 + metadata: + explode: true + style: deepObject + refund_payment_config: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: >- + A positive integer in __cents__ representing how much of + this charge to refund. + type: integer + charge: + description: ID of the Charge to refund. + 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 + payment_intent: + description: ID of the PaymentIntent to refund. + maxLength: 5000 + type: string + refund_application_fee: + description: >- + Boolean indicating whether the application fee should be + refunded when refunding this charge. If a full charge refund + is given, the full application fee will be refunded. + Otherwise, the application fee will be refunded in an amount + proportional to the amount of the charge refunded. An + application fee can be refunded only by the application that + created the charge. + type: boolean + refund_payment_config: + description: Configuration overrides + properties: + enable_customer_cancellation: + type: boolean + title: refund_payment_config + type: object + reverse_transfer: + description: >- + Boolean indicating whether the transfer should be reversed + when refunding this charge. The transfer will be reversed + proportionally to the amount being refunded (either the + entire or partial amount). A transfer can be reversed only + by the application that created the charge. + type: boolean + 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}/set_reader_display': post: - description:

Initiates a payment flow on a Reader.

- operationId: PostTerminalReadersReaderProcessPaymentIntent + description:

Sets reader display to show cart details.

+ operationId: PostTerminalReadersReaderSetReaderDisplay parameters: - in: path name: reader @@ -104789,40 +118872,60 @@ paths: content: application/x-www-form-urlencoded: encoding: - expand: + cart: explode: true style: deepObject - process_config: + expand: explode: true style: deepObject schema: additionalProperties: false properties: + cart: + description: Cart + properties: + currency: + type: string + line_items: + items: + properties: + amount: + type: integer + description: + maxLength: 5000 + type: string + quantity: + type: integer + required: + - amount + - description + - quantity + title: line_item + type: object + type: array + tax: + type: integer + total: + type: integer + required: + - currency + - line_items + - total + title: cart + type: object expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - payment_intent: - description: PaymentIntent ID - maxLength: 5000 + type: + description: Type + enum: + - cart type: string - process_config: - description: Configuration overrides - properties: - skip_tipping: - type: boolean - tipping: - properties: - amount_eligible: - type: integer - title: tipping_config - type: object - title: process_config - type: object required: - - payment_intent + - type type: object required: true responses: @@ -104838,18 +118941,12 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. - '/v1/terminal/readers/{reader}/process_setup_intent': + /v1/test_helpers/confirmation_tokens: post: - description:

Initiates a setup intent flow on a Reader.

- operationId: PostTerminalReadersReaderProcessSetupIntent - parameters: - - in: path - name: reader - required: true - schema: - maxLength: 5000 - type: string - style: simple + description: >- +

Creates a test mode Confirmation Token server side for your + integration tests.

+ operationId: PostTestHelpersConfirmationTokens requestBody: content: application/x-www-form-urlencoded: @@ -104857,215 +118954,527 @@ paths: expand: explode: true style: deepObject - process_config: + payment_method_data: + explode: true + style: deepObject + shipping: explode: true style: deepObject schema: additionalProperties: false 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 - process_config: - description: Configuration overrides - properties: {} - title: process_setup_config + payment_method: + description: ID of an existing PaymentMethod. + maxLength: 5000 + type: string + payment_method_data: + description: >- + If provided, this hash will be used to create a + PaymentMethod. + 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: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + phone: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + 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 + cashapp: + properties: {} + 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_of_china + - 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 + - n26 + - nn + - rabobank + - regiobank + - revolut + - sns_bank + - triodos_bank + - van_lanschot + - yoursafe + 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 + mobilepay: + properties: {} + title: param + 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 + - velobank + - volkswagen_bank + type: string + x-stripeBypassValidation: true + title: param + type: object + paynow: + properties: {} + title: param + type: object + paypal: + 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_with_hidden_options + type: object + revolut_pay: + properties: {} + title: param + 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 + swish: + properties: {} + title: param + type: object + type: + enum: + - acss_debit + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto + - cashapp + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - konbini + - link + - mobilepay + - oxxo + - p24 + - paynow + - paypal + - pix + - promptpay + - revolut_pay + - sepa_debit + - sofort + - swish + - us_bank_account + - wechat_pay + - zip + 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 + zip: + properties: {} + title: param + type: object + required: + - type + title: payment_method_data_params type: object - setup_intent: - description: SetupIntent ID - maxLength: 5000 - type: string - required: - - customer_consent_collected - - setup_intent - 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}/refund_payment': - post: - description:

Initiates a refund on a Reader

- operationId: PostTerminalReadersReaderRefundPayment - 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 - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - amount: - description: >- - A positive integer in __cents__ representing how much of - this charge to refund. - type: integer - charge: - description: ID of the Charge to refund. - maxLength: 5000 + return_url: + description: Return URL used to confirm the Intent. type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - additionalProperties: - type: string + setup_future_usage: description: >- - Set of [key-value - pairs](https://stripe.com/docs/api/metadata) that you can - attach to an object. This can be useful for storing - additional information about the object in a structured - format. 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_intent: - description: ID of the PaymentIntent to refund. - maxLength: 5000 + Indicates that you intend to make future payments with this + ConfirmationToken's payment method. + + + The presence of this property will [attach the payment + method](https://stripe.com/docs/payments/save-during-payment) + to the PaymentIntent's Customer, if present, after the + PaymentIntent is confirmed and any required actions from the + user are complete. + enum: + - off_session + - on_session type: string - refund_application_fee: - description: >- - Boolean indicating whether the application fee should be - refunded when refunding this charge. If a full charge refund - is given, the full application fee will be refunded. - Otherwise, the application fee will be refunded in an amount - proportional to the amount of the charge refunded. An - application fee can be refunded only by the application that - created the charge. - type: boolean - reverse_transfer: - description: >- - Boolean indicating whether the transfer should be reversed - when refunding this charge. The transfer will be reversed - proportionally to the amount being refunded (either the - entire or partial amount). A transfer can be reversed only - by the application that created the charge. - type: boolean - 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}/set_reader_display': - post: - description:

Sets reader display to show cart details.

- operationId: PostTerminalReadersReaderSetReaderDisplay - parameters: - - in: path - name: reader - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - cart: - explode: true - style: deepObject - expand: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - cart: - description: Cart + shipping: + description: Shipping information for this ConfirmationToken. properties: - currency: + 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 - line_items: - items: - properties: - amount: - type: integer - description: - maxLength: 5000 - type: string - quantity: - type: integer - required: - - amount - - description - - quantity - title: line_item - type: object - type: array - tax: - type: integer - total: - type: integer + phone: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string required: - - currency - - line_items - - total - title: cart + - address + - name + title: recipient_shipping_with_optional_fields_address type: object - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - type: - description: Type - enum: - - cart - type: string - required: - - type type: object - required: true + required: false responses: '200': content: application/json: schema: - $ref: '#/components/schemas/terminal.reader' + $ref: '#/components/schemas/confirmation_token' description: Successful response. default: content: @@ -105174,7 +119583,7 @@ paths: amount: description: >- The total amount to attempt to authorize. This amount is in - the provided currency, or defaults to the cards currency, + the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). type: integer @@ -105554,6 +119963,9 @@ paths: terminal_id: maxLength: 5000 type: string + url: + maxLength: 5000 + type: string title: merchant_data_specs type: object network_data: @@ -105583,6 +119995,25 @@ paths: - mismatch - not_provided type: string + authentication_exemption: + properties: + claimed_by: + enum: + - acquirer + - issuer + type: string + type: + enum: + - low_value_transaction + - transaction_risk_analysis + - unknown + type: string + x-stripeBypassValidation: true + required: + - claimed_by + - type + title: authentication_exemption_specs + type: object cvc_check: enum: - match @@ -105595,6 +120026,20 @@ paths: - mismatch - not_provided type: string + three_d_secure: + properties: + result: + enum: + - attempt_acknowledged + - authenticated + - failed + - required + type: string + x-stripeBypassValidation: true + required: + - result + title: three_d_secure_specs + type: object title: verification_data_specs type: object wallet: @@ -106113,6 +120558,178 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. + '/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate': + post: + description: >- +

Updates the status of the specified testmode + personalization design object to active.

+ operationId: >- + PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate + parameters: + - in: path + name: personalization_design + 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/issuing.personalization_design' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate': + post: + description: >- +

Updates the status of the specified testmode + personalization design object to inactive.

+ operationId: >- + PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate + parameters: + - in: path + name: personalization_design + 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/issuing.personalization_design' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. + '/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject': + post: + description: >- +

Updates the status of the specified testmode + personalization design object to rejected.

+ operationId: PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject + parameters: + - in: path + name: personalization_design + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + rejection_reasons: + 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 + rejection_reasons: + description: The reason(s) the personalization design was rejected. + properties: + card_logo: + items: + enum: + - geographic_location + - inappropriate + - network_name + - non_binary_image + - non_fiat_currency + - other + - other_entity + - promotional_material + type: string + type: array + carrier_text: + items: + enum: + - geographic_location + - inappropriate + - network_name + - non_fiat_currency + - other + - other_entity + - promotional_material + type: string + type: array + title: rejection_reasons_param + type: object + required: + - rejection_reasons + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/issuing.personalization_design' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. /v1/test_helpers/issuing/transactions/create_force_capture: post: description: >- @@ -106491,6 +121108,9 @@ paths: terminal_id: maxLength: 5000 type: string + url: + maxLength: 5000 + type: string title: merchant_data_specs type: object purchase_details: @@ -106988,6 +121608,9 @@ paths: terminal_id: maxLength: 5000 type: string + url: + maxLength: 5000 + type: string title: merchant_data_specs type: object purchase_details: @@ -108110,7 +122733,12 @@ paths: title: source_params type: object network: - description: The rails used for the object. + description: >- + Specifies the network rails to be used. If not set, will + default to the PaymentMethod's preferred network. See the + [docs](https://stripe.com/docs/treasury/money-movement/timelines) + to learn more about money movement timelines for each + network type. enum: - ach - us_domestic_wire @@ -108205,7 +122833,12 @@ paths: title: source_params type: object network: - description: The rails used for the object. + description: >- + Specifies the network rails to be used. If not set, will + default to the PaymentMethod's preferred network. See the + [docs](https://stripe.com/docs/treasury/money-movement/timelines) + to learn more about money movement timelines for each + network type. enum: - ach type: string @@ -108234,9 +122867,9 @@ paths: 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.

+ You can use this token with any API method in place of a bank account + dictionary. You can only use this token once. To do so, attach it to a + Custom account.

operationId: PostTokens requestBody: content: @@ -108267,7 +122900,7 @@ paths: additionalProperties: false properties: account: - description: Information for the account this token will represent. + description: Information for the account this token represents. properties: business_type: enum: @@ -108410,6 +123043,7 @@ paths: - public_company - public_corporation - public_partnership + - registered_charity - single_member_llc - sole_establishment - sole_proprietorship @@ -108613,6 +123247,25 @@ paths: 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 + title: + maxLength: 5000 + type: string + title: individual_relationship_specs + type: object ssn_last_4: maxLength: 5000 type: string @@ -108674,6 +123327,9 @@ paths: type: string currency: type: string + payment_method: + maxLength: 5000 + type: string routing_number: maxLength: 5000 type: string @@ -108719,6 +123375,16 @@ paths: name: maxLength: 5000 type: string + networks: + properties: + preferred: + enum: + - cartes_bancaires + - mastercard + - visa + type: string + title: networks_param_specs + type: object number: maxLength: 5000 type: string @@ -108739,18 +123405,18 @@ paths: 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 + Create a token for the customer, which is owned by the + application's account. You can only use this 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). + header](https://stripe.com/docs/connect/authentication). + Learn more about [cloning saved payment + methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). maxLength: 5000 type: string cvc_update: - description: The updated CVC value this token will represent. + description: The updated CVC value this token represents. properties: cvc: maxLength: 5000 @@ -108766,8 +123432,28 @@ paths: type: string type: array person: - description: Information for the person this token will represent. + description: Information for the person this token represents. properties: + additional_tos_acceptances: + properties: + account: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + anyOf: + - maxLength: 5000 + type: string + - enum: + - '' + type: string + title: settings_terms_of_service_specs + type: object + title: person_additional_tos_acceptances_specs + type: object address: properties: city: @@ -108985,6 +123671,8 @@ paths: type: boolean executive: type: boolean + legal_guardian: + type: boolean owner: type: boolean percent_ownership: @@ -109029,7 +123717,7 @@ paths: title: person_token_specs type: object pii: - description: The PII this token will represent. + description: The PII this token represents. properties: id_number: maxLength: 5000 @@ -109518,7 +124206,10 @@ paths: transfers appearing first.

operationId: GetTransfers parameters: - - explode: true + - description: >- + Only return transfers that were created during the given date + interval. + explode: true in: query name: created required: false @@ -110704,7 +125395,10 @@ paths: description:

Returns a list of FinancialAccounts.

operationId: GetTreasuryFinancialAccounts parameters: - - explode: true + - description: >- + Only return FinancialAccounts that were created during the given + date interval. + explode: true in: query name: created required: false @@ -111743,6 +126437,28 @@ paths: FinancialAccount.

operationId: GetTreasuryOutboundPayments parameters: + - description: >- + Only return OutboundPayments 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 OutboundPayments sent to this customer. in: query name: customer @@ -112079,8 +126795,9 @@ paths: 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`. + 140 characters for `us_domestic_wire` payments, or 500 + characters for `stripe` network transfers. The default value + is "payment". maxLength: 5000 type: string required: @@ -112405,8 +127122,8 @@ paths: 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`. + or 140 characters for `us_domestic_wire` transfers. The + default value is "transfer". maxLength: 5000 type: string required: @@ -112888,7 +127605,10 @@ paths: description:

Retrieves a list of TransactionEntry objects.

operationId: GetTreasuryTransactionEntries parameters: - - explode: true + - description: >- + Only return TransactionEntries that were created during the given + date interval. + explode: true in: query name: created required: false @@ -113103,7 +127823,10 @@ paths: description:

Retrieves a list of Transaction objects.

operationId: GetTreasuryTransactions parameters: - - explode: true + - description: >- + Only return Transactions that were created during the given date + interval. + explode: true in: query name: created required: false @@ -113566,6 +128289,8 @@ paths: - '2022-08-01' - '2022-11-15' - '2023-08-16' + - '2023-10-16' + - '2024-04-10' maxLength: 5000 type: string x-stripeBypassValidation: true @@ -113623,6 +128348,13 @@ paths: - checkout.session.async_payment_succeeded - checkout.session.completed - checkout.session.expired + - climate.order.canceled + - climate.order.created + - climate.order.delayed + - climate.order.delivered + - climate.order.product_substituted + - climate.product.created + - climate.product.pricing_updated - coupon.created - coupon.deleted - coupon.updated @@ -113657,6 +128389,8 @@ paths: - financial_connections.account.disconnected - financial_connections.account.reactivated - financial_connections.account.refreshed_balance + - financial_connections.account.refreshed_ownership + - financial_connections.account.refreshed_transactions - identity.verification_session.canceled - identity.verification_session.created - identity.verification_session.processing @@ -113690,6 +128424,8 @@ paths: - issuing_dispute.funds_reinstated - issuing_dispute.submitted - issuing_dispute.updated + - issuing_token.created + - issuing_token.updated - issuing_transaction.created - issuing_transaction.updated - mandate.updated @@ -114017,6 +128753,13 @@ paths: - checkout.session.async_payment_succeeded - checkout.session.completed - checkout.session.expired + - climate.order.canceled + - climate.order.created + - climate.order.delayed + - climate.order.delivered + - climate.order.product_substituted + - climate.product.created + - climate.product.pricing_updated - coupon.created - coupon.deleted - coupon.updated @@ -114051,6 +128794,8 @@ paths: - financial_connections.account.disconnected - financial_connections.account.reactivated - financial_connections.account.refreshed_balance + - financial_connections.account.refreshed_ownership + - financial_connections.account.refreshed_transactions - identity.verification_session.canceled - identity.verification_session.created - identity.verification_session.processing @@ -114084,6 +128829,8 @@ paths: - issuing_dispute.funds_reinstated - issuing_dispute.submitted - issuing_dispute.updated + - issuing_token.created + - issuing_token.updated - issuing_transaction.created - issuing_transaction.updated - mandate.updated diff --git a/integration-tests/typescript-angular/src/generated/api.github.com.yaml/client.service.ts b/integration-tests/typescript-angular/src/generated/api.github.com.yaml/client.service.ts index bf667dfb..3a4c69be 100644 --- a/integration-tests/typescript-angular/src/generated/api.github.com.yaml/client.service.ts +++ b/integration-tests/typescript-angular/src/generated/api.github.com.yaml/client.service.ts @@ -66,6 +66,7 @@ import { t_code_scanning_default_setup_update_response, t_code_scanning_organization_alert_items, t_code_scanning_ref, + t_code_scanning_ref_full, t_code_scanning_sarifs_receipt, t_code_scanning_sarifs_status, t_code_search_result_item, @@ -75,6 +76,7 @@ import { t_codespace_machine, t_codespace_with_full_repository, t_codespaces_org_secret, + t_codespaces_permissions_check_for_devcontainer, t_codespaces_public_key, t_codespaces_secret, t_codespaces_user_public_key, @@ -97,6 +99,7 @@ import { t_copilot_organization_details, t_copilot_seat_details, t_custom_deployment_rule_app, + t_custom_property_value, t_dependabot_alert, t_dependabot_alert_with_repository, t_dependabot_public_key, @@ -107,6 +110,7 @@ import { t_deployment, t_deployment_branch_policy, t_deployment_branch_policy_name_pattern, + t_deployment_branch_policy_name_pattern_with_type, t_deployment_branch_policy_settings, t_deployment_protection_rule, t_deployment_reviewer_type, @@ -164,16 +168,20 @@ import { t_minimal_repository, t_oidc_custom_sub, t_oidc_custom_sub_repo, + t_org_custom_property, t_org_hook, t_org_membership, + t_org_repo_custom_property_values, t_org_ruleset_conditions, t_organization_actions_secret, t_organization_actions_variable, t_organization_dependabot_secret, + t_organization_fine_grained_permission, t_organization_full, t_organization_invitation, t_organization_programmatic_access_grant, t_organization_programmatic_access_grant_request, + t_organization_role, t_organization_secret_scanning_alert, t_organization_simple, t_package, @@ -183,11 +191,13 @@ import { t_page_build, t_page_build_status, t_page_deployment, + t_pages_deployment_status, t_pages_health_check, t_participation_stats, t_pending_deployment, t_porter_author, t_porter_large_file, + t_prevent_self_review, t_private_user, t_private_vulnerability_report_create, t_project, @@ -229,6 +239,8 @@ import { t_review_custom_gates_comment_required, t_review_custom_gates_state_required, t_root, + t_rule_suite, + t_rule_suites, t_runner, t_runner_application, t_runner_label, @@ -238,6 +250,7 @@ import { t_secret_scanning_alert_resolution_comment, t_secret_scanning_alert_state, t_secret_scanning_location, + t_security_advisory_ecosystems, t_selected_actions, t_short_blob, t_short_branch, @@ -379,19 +392,7 @@ export class ApiClient { ghsaId?: string type?: "reviewed" | "malware" | "unreviewed" cveId?: string - ecosystem?: - | "actions" - | "composer" - | "erlang" - | "go" - | "maven" - | "npm" - | "nuget" - | "other" - | "pip" - | "pub" - | "rubygems" - | "rust" + ecosystem?: t_security_advisory_ecosystems severity?: "unknown" | "low" | "medium" | "high" | "critical" cwes?: string | string[] isWithdrawn?: boolean @@ -1140,6 +1141,7 @@ export class ApiClient { perPage?: number before?: string after?: string + validity?: string }): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) @@ -1159,6 +1161,7 @@ export class ApiClient { per_page: p["perPage"], before: p["before"], after: p["after"], + validity: p["validity"], }) return this.httpClient.request( @@ -2227,6 +2230,21 @@ export class ApiClient { ) } + activityMarkThreadAsDone(p: { + threadId: number + }): Observable< + (HttpResponse & { status: 204 }) | HttpResponse + > { + return this.httpClient.request( + "DELETE", + this.config.basePath + `/notifications/threads/${p["threadId"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + activityGetThreadSubscriptionForAuthenticatedUser(p: { threadId: number }): Observable< @@ -3877,6 +3895,7 @@ export class ApiClient { | (HttpResponse & { status: 401 }) | (HttpResponse & { status: 403 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) | (HttpResponse & { status: 500 }) | HttpResponse > { @@ -3921,7 +3940,7 @@ export class ApiClient { ) } - copilotAddCopilotForBusinessSeatsForTeams(p: { + copilotAddCopilotSeatsForTeams(p: { org: string requestBody: { selected_teams: string[] @@ -3983,7 +4002,7 @@ export class ApiClient { ) } - copilotAddCopilotForBusinessSeatsForUsers(p: { + copilotAddCopilotSeatsForUsers(p: { org: string requestBody: { selected_usernames: string[] @@ -4766,7 +4785,7 @@ export class ApiClient { requestBody?: { email?: string invitee_id?: number - role?: "admin" | "direct_member" | "billing_manager" + role?: "admin" | "direct_member" | "billing_manager" | "reinstate" team_ids?: number[] } }): Observable< @@ -5030,7 +5049,7 @@ export class ApiClient { ) } - copilotGetCopilotSeatAssignmentDetailsForUser(p: { + copilotGetCopilotSeatDetailsForUser(p: { org: string username: string }): Observable< @@ -5284,51 +5303,66 @@ export class ApiClient { ) } - orgsListOutsideCollaborators(p: { + orgsListOrganizationFineGrainedPermissions(p: { org: string - filter?: "2fa_disabled" | "all" - perPage?: number - page?: number }): Observable< - (HttpResponse & { status: 200 }) | HttpResponse + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) + | HttpResponse > { - const params = this._queryParams({ - filter: p["filter"], - per_page: p["perPage"], - page: p["page"], - }) + return this.httpClient.request( + "GET", + this.config.basePath + + `/orgs/${p["org"]}/organization-fine-grained-permissions`, + { + observe: "response", + reportProgress: false, + }, + ) + } + orgsListOrgRoles(p: { + org: string + }): Observable< + | (HttpResponse<{ + roles?: t_organization_role[] + total_count?: number + }> & { status: 200 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) + | HttpResponse + > { return this.httpClient.request( "GET", - this.config.basePath + `/orgs/${p["org"]}/outside_collaborators`, + this.config.basePath + `/orgs/${p["org"]}/organization-roles`, { - params, observe: "response", reportProgress: false, }, ) } - orgsConvertMemberToOutsideCollaborator(p: { + orgsCreateCustomOrganizationRole(p: { org: string - username: string - requestBody?: { - async?: boolean + requestBody: { + description?: string + name: string + permissions: string[] } }): Observable< - | (HttpResponse & { status: 202 }) - | (HttpResponse & { status: 204 }) - | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 201 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) + | (HttpResponse & { status: 422 }) | HttpResponse > { const headers = this._headers({ "Content-Type": "application/json" }) const body = p["requestBody"] return this.httpClient.request( - "PUT", - this.config.basePath + - `/orgs/${p["org"]}/outside_collaborators/${p["username"]}`, + "POST", + this.config.basePath + `/orgs/${p["org"]}/organization-roles`, { headers, body, @@ -5338,21 +5372,16 @@ export class ApiClient { ) } - orgsRemoveOutsideCollaborator(p: { + orgsRevokeAllOrgRolesTeam(p: { org: string - username: string + teamSlug: string }): Observable< - | (HttpResponse & { status: 204 }) - | (HttpResponse<{ - documentation_url?: string - message?: string - }> & { status: 422 }) - | HttpResponse + (HttpResponse & { status: 204 }) | HttpResponse > { return this.httpClient.request( "DELETE", this.config.basePath + - `/orgs/${p["org"]}/outside_collaborators/${p["username"]}`, + `/orgs/${p["org"]}/organization-roles/teams/${p["teamSlug"]}`, { observe: "response", reportProgress: false, @@ -5360,48 +5389,38 @@ export class ApiClient { ) } - packagesListPackagesForOrganization(p: { - packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" + orgsAssignTeamToOrgRole(p: { org: string - visibility?: "public" | "private" | "internal" - page?: number - perPage?: number + teamSlug: string + roleId: number }): Observable< - | (HttpResponse & { status: 200 }) - | (HttpResponse & { status: 400 }) - | (HttpResponse & { status: 401 }) - | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) | HttpResponse > { - const params = this._queryParams({ - package_type: p["packageType"], - visibility: p["visibility"], - page: p["page"], - per_page: p["perPage"], - }) - return this.httpClient.request( - "GET", - this.config.basePath + `/orgs/${p["org"]}/packages`, + "PUT", + this.config.basePath + + `/orgs/${p["org"]}/organization-roles/teams/${p["teamSlug"]}/${p["roleId"]}`, { - params, observe: "response", reportProgress: false, }, ) } - packagesGetPackageForOrganization(p: { - packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" - packageName: string + orgsRevokeOrgRoleTeam(p: { org: string + teamSlug: string + roleId: number }): Observable< - (HttpResponse & { status: 200 }) | HttpResponse + (HttpResponse & { status: 204 }) | HttpResponse > { return this.httpClient.request( - "GET", + "DELETE", this.config.basePath + - `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}`, + `/orgs/${p["org"]}/organization-roles/teams/${p["teamSlug"]}/${p["roleId"]}`, { observe: "response", reportProgress: false, @@ -5409,21 +5428,16 @@ export class ApiClient { ) } - packagesDeletePackageForOrg(p: { - packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" - packageName: string + orgsRevokeAllOrgRolesUser(p: { org: string + username: string }): Observable< - | (HttpResponse & { status: 204 }) - | (HttpResponse & { status: 401 }) - | (HttpResponse & { status: 403 }) - | (HttpResponse & { status: 404 }) - | HttpResponse + (HttpResponse & { status: 204 }) | HttpResponse > { return this.httpClient.request( "DELETE", this.config.basePath + - `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}`, + `/orgs/${p["org"]}/organization-roles/users/${p["username"]}`, { observe: "response", reportProgress: false, @@ -5431,76 +5445,58 @@ export class ApiClient { ) } - packagesRestorePackageForOrg(p: { - packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" - packageName: string + orgsAssignUserToOrgRole(p: { org: string - token?: string + username: string + roleId: number }): Observable< | (HttpResponse & { status: 204 }) - | (HttpResponse & { status: 401 }) - | (HttpResponse & { status: 403 }) - | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) | HttpResponse > { - const params = this._queryParams({ token: p["token"] }) - return this.httpClient.request( - "POST", + "PUT", this.config.basePath + - `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/restore`, + `/orgs/${p["org"]}/organization-roles/users/${p["username"]}/${p["roleId"]}`, { - params, observe: "response", reportProgress: false, }, ) } - packagesGetAllPackageVersionsForPackageOwnedByOrg(p: { - packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" - packageName: string + orgsRevokeOrgRoleUser(p: { org: string - page?: number - perPage?: number - state?: "active" | "deleted" + username: string + roleId: number }): Observable< - | (HttpResponse & { status: 200 }) - | (HttpResponse & { status: 401 }) - | (HttpResponse & { status: 403 }) - | (HttpResponse & { status: 404 }) - | HttpResponse + (HttpResponse & { status: 204 }) | HttpResponse > { - const params = this._queryParams({ - page: p["page"], - per_page: p["perPage"], - state: p["state"], - }) - return this.httpClient.request( - "GET", + "DELETE", this.config.basePath + - `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions`, + `/orgs/${p["org"]}/organization-roles/users/${p["username"]}/${p["roleId"]}`, { - params, observe: "response", reportProgress: false, }, ) } - packagesGetPackageVersionForOrganization(p: { - packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" - packageName: string + orgsGetOrgRole(p: { org: string - packageVersionId: number + roleId: number }): Observable< - (HttpResponse & { status: 200 }) | HttpResponse + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) + | HttpResponse > { return this.httpClient.request( "GET", this.config.basePath + - `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}`, + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}`, { observe: "response", reportProgress: false, @@ -5508,45 +5504,47 @@ export class ApiClient { ) } - packagesDeletePackageVersionForOrg(p: { - packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" - packageName: string + orgsPatchCustomOrganizationRole(p: { org: string - packageVersionId: number + roleId: number + requestBody: { + description?: string + name?: string + permissions?: string[] + } }): Observable< - | (HttpResponse & { status: 204 }) - | (HttpResponse & { status: 401 }) - | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) + | (HttpResponse & { status: 422 }) | HttpResponse > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + return this.httpClient.request( - "DELETE", + "PATCH", this.config.basePath + - `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}`, + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}`, { + headers, + body, observe: "response", reportProgress: false, }, ) } - packagesRestorePackageVersionForOrg(p: { - packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" - packageName: string + orgsDeleteCustomOrganizationRole(p: { org: string - packageVersionId: number + roleId: number }): Observable< - | (HttpResponse & { status: 204 }) - | (HttpResponse & { status: 401 }) - | (HttpResponse & { status: 403 }) - | (HttpResponse & { status: 404 }) - | HttpResponse + (HttpResponse & { status: 204 }) | HttpResponse > { return this.httpClient.request( - "POST", + "DELETE", this.config.basePath + - `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}/restore`, + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}`, { observe: "response", reportProgress: false, @@ -5554,42 +5552,26 @@ export class ApiClient { ) } - orgsListPatGrantRequests(p: { + orgsListOrgRoleTeams(p: { org: string + roleId: number perPage?: number page?: number - sort?: "created_at" - direction?: "asc" | "desc" - owner?: string[] - repository?: string - permission?: string - lastUsedBefore?: string - lastUsedAfter?: string }): Observable< - | (HttpResponse & { - status: 200 - }) - | (HttpResponse & { status: 403 }) - | (HttpResponse & { status: 404 }) - | (HttpResponse & { status: 422 }) - | (HttpResponse & { status: 500 }) + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) | HttpResponse > { const params = this._queryParams({ per_page: p["perPage"], page: p["page"], - sort: p["sort"], - direction: p["direction"], - owner: p["owner"], - repository: p["repository"], - permission: p["permission"], - last_used_before: p["lastUsedBefore"], - last_used_after: p["lastUsedAfter"], }) return this.httpClient.request( "GET", - this.config.basePath + `/orgs/${p["org"]}/personal-access-token-requests`, + this.config.basePath + + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}/teams`, { params, observe: "response", @@ -5598,30 +5580,372 @@ export class ApiClient { ) } - orgsReviewPatGrantRequestsInBulk(p: { + orgsListOrgRoleUsers(p: { org: string - requestBody: { - action: "approve" | "deny" - pat_request_ids?: number[] - reason?: string | null - } + roleId: number + perPage?: number + page?: number }): Observable< - | (HttpResponse<{ - [key: string]: unknown | undefined - }> & { status: 202 }) - | (HttpResponse & { status: 403 }) - | (HttpResponse & { status: 404 }) - | (HttpResponse & { status: 422 }) - | (HttpResponse & { status: 500 }) + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) | HttpResponse > { - const headers = this._headers({ "Content-Type": "application/json" }) - const body = p["requestBody"] + const params = this._queryParams({ + per_page: p["perPage"], + page: p["page"], + }) return this.httpClient.request( - "POST", - this.config.basePath + `/orgs/${p["org"]}/personal-access-token-requests`, - { + "GET", + this.config.basePath + + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}/users`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + orgsListOutsideCollaborators(p: { + org: string + filter?: "2fa_disabled" | "all" + perPage?: number + page?: number + }): Observable< + (HttpResponse & { status: 200 }) | HttpResponse + > { + const params = this._queryParams({ + filter: p["filter"], + per_page: p["perPage"], + page: p["page"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + `/orgs/${p["org"]}/outside_collaborators`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + orgsConvertMemberToOutsideCollaborator(p: { + org: string + username: string + requestBody?: { + async?: boolean + } + }): Observable< + | (HttpResponse & { status: 202 }) + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + + return this.httpClient.request( + "PUT", + this.config.basePath + + `/orgs/${p["org"]}/outside_collaborators/${p["username"]}`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + orgsRemoveOutsideCollaborator(p: { + org: string + username: string + }): Observable< + | (HttpResponse & { status: 204 }) + | (HttpResponse<{ + documentation_url?: string + message?: string + }> & { status: 422 }) + | HttpResponse + > { + return this.httpClient.request( + "DELETE", + this.config.basePath + + `/orgs/${p["org"]}/outside_collaborators/${p["username"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + packagesListPackagesForOrganization(p: { + packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" + org: string + visibility?: "public" | "private" | "internal" + page?: number + perPage?: number + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 400 }) + | (HttpResponse & { status: 401 }) + | (HttpResponse & { status: 403 }) + | HttpResponse + > { + const params = this._queryParams({ + package_type: p["packageType"], + visibility: p["visibility"], + page: p["page"], + per_page: p["perPage"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + `/orgs/${p["org"]}/packages`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + packagesGetPackageForOrganization(p: { + packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" + packageName: string + org: string + }): Observable< + (HttpResponse & { status: 200 }) | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + packagesDeletePackageForOrg(p: { + packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" + packageName: string + org: string + }): Observable< + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 401 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + return this.httpClient.request( + "DELETE", + this.config.basePath + + `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + packagesRestorePackageForOrg(p: { + packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" + packageName: string + org: string + token?: string + }): Observable< + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 401 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + const params = this._queryParams({ token: p["token"] }) + + return this.httpClient.request( + "POST", + this.config.basePath + + `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/restore`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + packagesGetAllPackageVersionsForPackageOwnedByOrg(p: { + packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" + packageName: string + org: string + page?: number + perPage?: number + state?: "active" | "deleted" + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 401 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + const params = this._queryParams({ + page: p["page"], + per_page: p["perPage"], + state: p["state"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + + `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + packagesGetPackageVersionForOrganization(p: { + packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" + packageName: string + org: string + packageVersionId: number + }): Observable< + (HttpResponse & { status: 200 }) | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + packagesDeletePackageVersionForOrg(p: { + packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" + packageName: string + org: string + packageVersionId: number + }): Observable< + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 401 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + return this.httpClient.request( + "DELETE", + this.config.basePath + + `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + packagesRestorePackageVersionForOrg(p: { + packageType: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container" + packageName: string + org: string + packageVersionId: number + }): Observable< + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 401 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + return this.httpClient.request( + "POST", + this.config.basePath + + `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}/restore`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + orgsListPatGrantRequests(p: { + org: string + perPage?: number + page?: number + sort?: "created_at" + direction?: "asc" | "desc" + owner?: string[] + repository?: string + permission?: string + lastUsedBefore?: string + lastUsedAfter?: string + }): Observable< + | (HttpResponse & { + status: 200 + }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) + | (HttpResponse & { status: 500 }) + | HttpResponse + > { + const params = this._queryParams({ + per_page: p["perPage"], + page: p["page"], + sort: p["sort"], + direction: p["direction"], + owner: p["owner"], + repository: p["repository"], + permission: p["permission"], + last_used_before: p["lastUsedBefore"], + last_used_after: p["lastUsedAfter"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + `/orgs/${p["org"]}/personal-access-token-requests`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + orgsReviewPatGrantRequestsInBulk(p: { + org: string + requestBody: { + action: "approve" | "deny" + pat_request_ids?: number[] + reason?: string | null + } + }): Observable< + | (HttpResponse<{ + [key: string]: unknown | undefined + }> & { status: 202 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) + | (HttpResponse & { status: 500 }) + | HttpResponse + > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/orgs/${p["org"]}/personal-access-token-requests`, + { headers, body, observe: "response", @@ -5881,6 +6205,178 @@ export class ApiClient { ) } + orgsGetAllCustomProperties(p: { + org: string + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + `/orgs/${p["org"]}/properties/schema`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + orgsCreateOrUpdateCustomProperties(p: { + org: string + requestBody: { + properties: t_org_custom_property[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + + return this.httpClient.request( + "PATCH", + this.config.basePath + `/orgs/${p["org"]}/properties/schema`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + orgsGetCustomProperty(p: { + org: string + customPropertyName: string + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/orgs/${p["org"]}/properties/schema/${p["customPropertyName"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + orgsCreateOrUpdateCustomProperty(p: { + org: string + customPropertyName: string + requestBody: { + allowed_values?: string[] | null + default_value?: string | string[] | null + description?: string | null + required?: boolean + value_type: "string" | "single_select" + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + + return this.httpClient.request( + "PUT", + this.config.basePath + + `/orgs/${p["org"]}/properties/schema/${p["customPropertyName"]}`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + orgsRemoveCustomProperty(p: { + org: string + customPropertyName: string + }): Observable< + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + return this.httpClient.request( + "DELETE", + this.config.basePath + + `/orgs/${p["org"]}/properties/schema/${p["customPropertyName"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + orgsListCustomPropertiesValuesForRepos(p: { + org: string + perPage?: number + page?: number + repositoryQuery?: string + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + const params = this._queryParams({ + per_page: p["perPage"], + page: p["page"], + repository_query: p["repositoryQuery"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + `/orgs/${p["org"]}/properties/values`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + orgsCreateOrUpdateCustomPropertiesValuesForRepos(p: { + org: string + requestBody: { + properties: t_custom_property_value[] + repository_names: string[] + } + }): Observable< + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) + | HttpResponse + > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + + return this.httpClient.request( + "PATCH", + this.config.basePath + `/orgs/${p["org"]}/properties/values`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + orgsListPublicMembers(p: { org: string perPage?: number @@ -5997,6 +6493,9 @@ export class ApiClient { allow_rebase_merge?: boolean allow_squash_merge?: boolean auto_init?: boolean + custom_properties?: { + [key: string]: unknown | undefined + } delete_branch_on_merge?: boolean description?: string gitignore_template?: string @@ -6018,7 +6517,7 @@ export class ApiClient { visibility?: "public" | "private" } }): Observable< - | (HttpResponse & { status: 201 }) + | (HttpResponse & { status: 201 }) | (HttpResponse & { status: 403 }) | (HttpResponse & { status: 422 }) | HttpResponse @@ -6095,6 +6594,60 @@ export class ApiClient { ) } + reposGetOrgRuleSuites(p: { + org: string + repositoryName?: number + timePeriod?: "hour" | "day" | "week" | "month" + actorName?: string + ruleSuiteResult?: "pass" | "fail" | "bypass" | "all" + perPage?: number + page?: number + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 500 }) + | HttpResponse + > { + const params = this._queryParams({ + repository_name: p["repositoryName"], + time_period: p["timePeriod"], + actor_name: p["actorName"], + rule_suite_result: p["ruleSuiteResult"], + per_page: p["perPage"], + page: p["page"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + `/orgs/${p["org"]}/rulesets/rule-suites`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + reposGetOrgRuleSuite(p: { + org: string + ruleSuiteId: number + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 500 }) + | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/orgs/${p["org"]}/rulesets/rule-suites/${p["ruleSuiteId"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + reposGetOrgRuleset(p: { org: string rulesetId: number @@ -6176,6 +6729,7 @@ export class ApiClient { perPage?: number before?: string after?: string + validity?: string }): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) @@ -6196,6 +6750,7 @@ export class ApiClient { per_page: p["perPage"], before: p["before"], after: p["after"], + validity: p["validity"], }) return this.httpClient.request( @@ -9024,6 +9579,26 @@ export class ApiClient { ) } + actionsForceCancelWorkflowRun(p: { + owner: string + repo: string + runId: number + }): Observable< + | (HttpResponse & { status: 202 }) + | (HttpResponse & { status: 409 }) + | HttpResponse + > { + return this.httpClient.request( + "POST", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/actions/runs/${p["runId"]}/force-cancel`, + { + observe: "response", + reportProgress: false, + }, + ) + } + actionsListJobsForWorkflowRun(p: { owner: string repo: string @@ -9726,17 +10301,13 @@ export class ApiClient { reposListAutolinks(p: { owner: string repo: string - page?: number }): Observable< (HttpResponse & { status: 200 }) | HttpResponse > { - const params = this._queryParams({ page: p["page"] }) - return this.httpClient.request( "GET", this.config.basePath + `/repos/${p["owner"]}/${p["repo"]}/autolinks`, { - params, observe: "response", reportProgress: false, }, @@ -10894,7 +11465,13 @@ export class ApiClient { title?: string } started_at?: string - status?: "queued" | "in_progress" | "completed" + status?: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" } }): Observable< (HttpResponse & { status: 200 }) | HttpResponse @@ -11460,7 +12037,7 @@ export class ApiClient { requestBody: { checkout_uri?: string commit_sha: t_code_scanning_analysis_commit_sha - ref: t_code_scanning_ref + ref: t_code_scanning_ref_full sarif: t_code_scanning_analysis_sarif_file started_at?: string tool_name?: string @@ -11701,26 +12278,63 @@ export class ApiClient { ref?: string clientIp?: string }): Observable< - | (HttpResponse<{ - billable_owner?: t_simple_user - defaults?: { - devcontainer_path: string | null - location: string - } - }> & { status: 200 }) + | (HttpResponse<{ + billable_owner?: t_simple_user + defaults?: { + devcontainer_path: string | null + location: string + } + }> & { status: 200 }) + | (HttpResponse & { status: 401 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + const params = this._queryParams({ + ref: p["ref"], + client_ip: p["clientIp"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + `/repos/${p["owner"]}/${p["repo"]}/codespaces/new`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + codespacesCheckPermissionsForDevcontainer(p: { + owner: string + repo: string + ref: string + devcontainerPath: string + }): Observable< + | (HttpResponse & { + status: 200 + }) | (HttpResponse & { status: 401 }) | (HttpResponse & { status: 403 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) + | (HttpResponse<{ + code?: string + documentation_url?: string + message?: string + }> & { status: 503 }) | HttpResponse > { const params = this._queryParams({ ref: p["ref"], - client_ip: p["clientIp"], + devcontainer_path: p["devcontainerPath"], }) return this.httpClient.request( "GET", - this.config.basePath + `/repos/${p["owner"]}/${p["repo"]}/codespaces/new`, + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/codespaces/permissions_check`, { params, observe: "response", @@ -12196,6 +12810,7 @@ export class ApiClient { commitSha: string }): Observable< | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -12276,6 +12891,7 @@ export class ApiClient { page?: number }): Observable< | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 409 }) | HttpResponse > { const params = this._queryParams({ @@ -12304,6 +12920,7 @@ export class ApiClient { }): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | (HttpResponse & { status: 500 }) | (HttpResponse<{ @@ -13179,6 +13796,7 @@ export class ApiClient { } }): Observable< | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 404 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -13249,6 +13867,7 @@ export class ApiClient { environmentName: string requestBody?: { deployment_branch_policy?: t_deployment_branch_policy_settings + prevent_self_review?: t_prevent_self_review reviewers?: | { id?: number @@ -13330,7 +13949,7 @@ export class ApiClient { owner: string repo: string environmentName: string - requestBody: t_deployment_branch_policy_name_pattern + requestBody: t_deployment_branch_policy_name_pattern_with_type }): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 303 }) @@ -13389,7 +14008,242 @@ export class ApiClient { return this.httpClient.request( "PUT", this.config.basePath + - `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}`, + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + reposDeleteDeploymentBranchPolicy(p: { + owner: string + repo: string + environmentName: string + branchPolicyId: number + }): Observable< + (HttpResponse & { status: 204 }) | HttpResponse + > { + return this.httpClient.request( + "DELETE", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + reposGetAllDeploymentProtectionRules(p: { + environmentName: string + repo: string + owner: string + }): Observable< + | (HttpResponse<{ + custom_deployment_protection_rules?: t_deployment_protection_rule[] + total_count?: number + }> & { status: 200 }) + | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + reposCreateDeploymentProtectionRule(p: { + environmentName: string + repo: string + owner: string + requestBody: { + integration_id?: number + } + }): Observable< + | (HttpResponse & { status: 201 }) + | HttpResponse + > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + reposListCustomDeploymentRuleIntegrations(p: { + environmentName: string + repo: string + owner: string + page?: number + perPage?: number + }): Observable< + | (HttpResponse<{ + available_custom_deployment_protection_rule_integrations?: t_custom_deployment_rule_app[] + total_count?: number + }> & { status: 200 }) + | HttpResponse + > { + const params = this._queryParams({ + page: p["page"], + per_page: p["perPage"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/apps`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + reposGetCustomDeploymentProtectionRule(p: { + owner: string + repo: string + environmentName: string + protectionRuleId: number + }): Observable< + | (HttpResponse & { status: 200 }) + | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/${p["protectionRuleId"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + reposDisableDeploymentProtectionRule(p: { + environmentName: string + repo: string + owner: string + protectionRuleId: number + }): Observable< + (HttpResponse & { status: 204 }) | HttpResponse + > { + return this.httpClient.request( + "DELETE", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/${p["protectionRuleId"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + actionsListEnvironmentSecrets(p: { + owner: string + repo: string + environmentName: string + perPage?: number + page?: number + }): Observable< + | (HttpResponse<{ + secrets: t_actions_secret[] + total_count: number + }> & { status: 200 }) + | HttpResponse + > { + const params = this._queryParams({ + per_page: p["perPage"], + page: p["page"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + actionsGetEnvironmentPublicKey(p: { + owner: string + repo: string + environmentName: string + }): Observable< + | (HttpResponse & { status: 200 }) + | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/public-key`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + actionsGetEnvironmentSecret(p: { + owner: string + repo: string + environmentName: string + secretName: string + }): Observable< + (HttpResponse & { status: 200 }) | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + actionsCreateOrUpdateEnvironmentSecret(p: { + owner: string + repo: string + environmentName: string + secretName: string + requestBody: { + encrypted_value: string + key_id: string + } + }): Observable< + | (HttpResponse & { status: 201 }) + | (HttpResponse & { status: 204 }) + | HttpResponse + > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + + return this.httpClient.request( + "PUT", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}`, { headers, body, @@ -13399,18 +14253,18 @@ export class ApiClient { ) } - reposDeleteDeploymentBranchPolicy(p: { + actionsDeleteEnvironmentSecret(p: { owner: string repo: string environmentName: string - branchPolicyId: number + secretName: string }): Observable< (HttpResponse & { status: 204 }) | HttpResponse > { return this.httpClient.request( "DELETE", this.config.basePath + - `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}`, + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}`, { observe: "response", reportProgress: false, @@ -13418,38 +14272,46 @@ export class ApiClient { ) } - reposGetAllDeploymentProtectionRules(p: { - environmentName: string - repo: string + actionsListEnvironmentVariables(p: { owner: string + repo: string + environmentName: string + perPage?: number + page?: number }): Observable< | (HttpResponse<{ - custom_deployment_protection_rules?: t_deployment_protection_rule[] - total_count?: number + total_count: number + variables: t_actions_variable[] }> & { status: 200 }) | HttpResponse > { + const params = this._queryParams({ + per_page: p["perPage"], + page: p["page"], + }) + return this.httpClient.request( "GET", this.config.basePath + - `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules`, + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables`, { + params, observe: "response", reportProgress: false, }, ) } - reposCreateDeploymentProtectionRule(p: { - environmentName: string - repo: string + actionsCreateEnvironmentVariable(p: { owner: string + repo: string + environmentName: string requestBody: { - integration_id?: number + name: string + value: string } }): Observable< - | (HttpResponse & { status: 201 }) - | HttpResponse + (HttpResponse & { status: 201 }) | HttpResponse > { const headers = this._headers({ "Content-Type": "application/json" }) const body = p["requestBody"] @@ -13457,7 +14319,7 @@ export class ApiClient { return this.httpClient.request( "POST", this.config.basePath + - `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules`, + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables`, { headers, body, @@ -13467,68 +14329,65 @@ export class ApiClient { ) } - reposListCustomDeploymentRuleIntegrations(p: { - environmentName: string - repo: string + actionsGetEnvironmentVariable(p: { owner: string - page?: number - perPage?: number + repo: string + environmentName: string + name: string }): Observable< - | (HttpResponse<{ - available_custom_deployment_protection_rule_integrations?: t_custom_deployment_rule_app[] - total_count?: number - }> & { status: 200 }) - | HttpResponse + (HttpResponse & { status: 200 }) | HttpResponse > { - const params = this._queryParams({ - page: p["page"], - per_page: p["perPage"], - }) - return this.httpClient.request( "GET", this.config.basePath + - `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/apps`, + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables/${p["name"]}`, { - params, observe: "response", reportProgress: false, }, ) } - reposGetCustomDeploymentProtectionRule(p: { + actionsUpdateEnvironmentVariable(p: { owner: string repo: string + name: string environmentName: string - protectionRuleId: number + requestBody: { + name?: string + value?: string + } }): Observable< - | (HttpResponse & { status: 200 }) - | HttpResponse + (HttpResponse & { status: 204 }) | HttpResponse > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + return this.httpClient.request( - "GET", + "PATCH", this.config.basePath + - `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/${p["protectionRuleId"]}`, + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables/${p["name"]}`, { + headers, + body, observe: "response", reportProgress: false, }, ) } - reposDisableDeploymentProtectionRule(p: { - environmentName: string - repo: string + actionsDeleteEnvironmentVariable(p: { owner: string - protectionRuleId: number + repo: string + name: string + environmentName: string }): Observable< (HttpResponse & { status: 204 }) | HttpResponse > { return this.httpClient.request( "DELETE", this.config.basePath + - `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/${p["protectionRuleId"]}`, + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables/${p["name"]}`, { observe: "response", reportProgress: false, @@ -13657,6 +14516,7 @@ export class ApiClient { | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 403 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -13693,6 +14553,7 @@ export class ApiClient { }): Observable< | (HttpResponse & { status: 201 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -13718,6 +14579,7 @@ export class ApiClient { }): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) | HttpResponse > { return this.httpClient.request( @@ -13736,7 +14598,9 @@ export class ApiClient { repo: string ref: string }): Observable< - (HttpResponse & { status: 200 }) | HttpResponse + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 409 }) + | HttpResponse > { return this.httpClient.request( "GET", @@ -13756,6 +14620,7 @@ export class ApiClient { }): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) | HttpResponse > { return this.httpClient.request( @@ -13778,6 +14643,7 @@ export class ApiClient { } }): Observable< | (HttpResponse & { status: 201 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -13806,6 +14672,7 @@ export class ApiClient { } }): Observable< | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -13831,6 +14698,7 @@ export class ApiClient { ref: string }): Observable< | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -13861,6 +14729,7 @@ export class ApiClient { } }): Observable< | (HttpResponse & { status: 201 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -13886,6 +14755,7 @@ export class ApiClient { }): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) | HttpResponse > { return this.httpClient.request( @@ -13916,6 +14786,7 @@ export class ApiClient { | (HttpResponse & { status: 201 }) | (HttpResponse & { status: 403 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -13942,6 +14813,7 @@ export class ApiClient { }): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 409 }) | (HttpResponse & { status: 422 }) | HttpResponse > { @@ -13992,10 +14864,8 @@ export class ApiClient { active?: boolean config?: { content_type?: t_webhook_config_content_type - digest?: string insecure_ssl?: t_webhook_config_insecure_ssl secret?: t_webhook_config_secret - token?: string url?: t_webhook_config_url } events?: string[] @@ -14050,14 +14920,7 @@ export class ApiClient { requestBody: { active?: boolean add_events?: string[] - config?: { - address?: string - content_type?: t_webhook_config_content_type - insecure_ssl?: t_webhook_config_insecure_ssl - room?: string - secret?: t_webhook_config_secret - url: t_webhook_config_url - } + config?: t_webhook_config events?: string[] remove_events?: string[] } @@ -15757,13 +16620,19 @@ export class ApiClient { licensesGetForRepo(p: { owner: string repo: string + ref?: t_code_scanning_ref }): Observable< - (HttpResponse & { status: 200 }) | HttpResponse + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 404 }) + | HttpResponse > { + const params = this._queryParams({ ref: p["ref"] }) + return this.httpClient.request( "GET", this.config.basePath + `/repos/${p["owner"]}/${p["repo"]}/license`, { + params, observe: "response", reportProgress: false, }, @@ -16234,7 +17103,8 @@ export class ApiClient { owner: string repo: string requestBody: { - artifact_url: string + artifact_id?: number + artifact_url?: string environment?: string oidc_token: string pages_build_version: string @@ -16252,7 +17122,7 @@ export class ApiClient { return this.httpClient.request( "POST", this.config.basePath + - `/repos/${p["owner"]}/${p["repo"]}/pages/deployment`, + `/repos/${p["owner"]}/${p["repo"]}/pages/deployments`, { headers, body, @@ -16262,6 +17132,46 @@ export class ApiClient { ) } + reposGetPagesDeployment(p: { + owner: string + repo: string + pagesDeploymentId: number | string + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/pages/deployments/${p["pagesDeploymentId"]}`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + reposCancelPagesDeployment(p: { + owner: string + repo: string + pagesDeploymentId: number | string + }): Observable< + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + return this.httpClient.request( + "POST", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/pages/deployments/${p["pagesDeploymentId"]}/cancel`, + { + observe: "response", + reportProgress: false, + }, + ) + } + reposGetPagesHealthCheck(p: { owner: string repo: string @@ -16283,6 +17193,27 @@ export class ApiClient { ) } + reposCheckPrivateVulnerabilityReporting(p: { + owner: string + repo: string + }): Observable< + | (HttpResponse<{ + enabled: boolean + }> & { status: 200 }) + | (HttpResponse & { status: 422 }) + | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/private-vulnerability-reporting`, + { + observe: "response", + reportProgress: false, + }, + ) + } + reposEnablePrivateVulnerabilityReporting(p: { owner: string repo: string @@ -16384,6 +17315,55 @@ export class ApiClient { ) } + reposGetCustomPropertiesValues(p: { + owner: string + repo: string + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | HttpResponse + > { + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/properties/values`, + { + observe: "response", + reportProgress: false, + }, + ) + } + + reposCreateOrUpdateCustomPropertiesValues(p: { + owner: string + repo: string + requestBody: { + properties: t_custom_property_value[] + } + }): Observable< + | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) + | HttpResponse + > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + + return this.httpClient.request( + "PATCH", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/properties/values`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + pullsList(p: { owner: string repo: string @@ -16655,6 +17635,7 @@ export class ApiClient { | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 304 }) | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 406 }) | (HttpResponse & { status: 500 }) | (HttpResponse<{ code?: string @@ -17834,20 +18815,77 @@ export class ApiClient { target?: "branch" | "tag" } }): Observable< - | (HttpResponse & { status: 201 }) + | (HttpResponse & { status: 201 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 500 }) + | HttpResponse + > { + const headers = this._headers({ "Content-Type": "application/json" }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/repos/${p["owner"]}/${p["repo"]}/rulesets`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + reposGetRepoRuleSuites(p: { + owner: string + repo: string + ref?: string + timePeriod?: "hour" | "day" | "week" | "month" + actorName?: string + ruleSuiteResult?: "pass" | "fail" | "bypass" | "all" + perPage?: number + page?: number + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 500 }) + | HttpResponse + > { + const params = this._queryParams({ + ref: p["ref"], + time_period: p["timePeriod"], + actor_name: p["actorName"], + rule_suite_result: p["ruleSuiteResult"], + per_page: p["perPage"], + page: p["page"], + }) + + return this.httpClient.request( + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/rulesets/rule-suites`, + { + params, + observe: "response", + reportProgress: false, + }, + ) + } + + reposGetRepoRuleSuite(p: { + owner: string + repo: string + ruleSuiteId: number + }): Observable< + | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) | (HttpResponse & { status: 500 }) | HttpResponse > { - const headers = this._headers({ "Content-Type": "application/json" }) - const body = p["requestBody"] - return this.httpClient.request( - "POST", - this.config.basePath + `/repos/${p["owner"]}/${p["repo"]}/rulesets`, + "GET", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/rulesets/rule-suites/${p["ruleSuiteId"]}`, { - headers, - body, observe: "response", reportProgress: false, }, @@ -17946,6 +18984,7 @@ export class ApiClient { perPage?: number before?: string after?: string + validity?: string }): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: 404 }) @@ -17966,6 +19005,7 @@ export class ApiClient { per_page: p["perPage"], before: p["before"], after: p["after"], + validity: p["validity"], }) return this.httpClient.request( @@ -18240,6 +19280,29 @@ export class ApiClient { ) } + securityAdvisoriesCreateFork(p: { + owner: string + repo: string + ghsaId: string + }): Observable< + | (HttpResponse & { status: 202 }) + | (HttpResponse & { status: 400 }) + | (HttpResponse & { status: 403 }) + | (HttpResponse & { status: 404 }) + | (HttpResponse & { status: 422 }) + | HttpResponse + > { + return this.httpClient.request( + "POST", + this.config.basePath + + `/repos/${p["owner"]}/${p["repo"]}/security-advisories/${p["ghsaId"]}/forks`, + { + observe: "response", + reportProgress: false, + }, + ) + } + activityListStargazersForRepo(p: { owner: string repo: string @@ -18275,6 +19338,7 @@ export class ApiClient { [key: string]: unknown | undefined }> & { status: 202 }) | (HttpResponse & { status: 204 }) + | (HttpResponse & { status: 422 }) | HttpResponse > { return this.httpClient.request( @@ -18865,7 +19929,7 @@ export class ApiClient { private?: boolean } }): Observable< - (HttpResponse & { status: 201 }) | HttpResponse + (HttpResponse & { status: 201 }) | HttpResponse > { const headers = this._headers({ "Content-Type": "application/json" }) const body = p["requestBody"] @@ -18906,236 +19970,6 @@ export class ApiClient { ) } - actionsListEnvironmentSecrets(p: { - repositoryId: number - environmentName: string - perPage?: number - page?: number - }): Observable< - | (HttpResponse<{ - secrets: t_actions_secret[] - total_count: number - }> & { status: 200 }) - | HttpResponse - > { - const params = this._queryParams({ - per_page: p["perPage"], - page: p["page"], - }) - - return this.httpClient.request( - "GET", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets`, - { - params, - observe: "response", - reportProgress: false, - }, - ) - } - - actionsGetEnvironmentPublicKey(p: { - repositoryId: number - environmentName: string - }): Observable< - | (HttpResponse & { status: 200 }) - | HttpResponse - > { - return this.httpClient.request( - "GET", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/public-key`, - { - observe: "response", - reportProgress: false, - }, - ) - } - - actionsGetEnvironmentSecret(p: { - repositoryId: number - environmentName: string - secretName: string - }): Observable< - (HttpResponse & { status: 200 }) | HttpResponse - > { - return this.httpClient.request( - "GET", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}`, - { - observe: "response", - reportProgress: false, - }, - ) - } - - actionsCreateOrUpdateEnvironmentSecret(p: { - repositoryId: number - environmentName: string - secretName: string - requestBody: { - encrypted_value: string - key_id: string - } - }): Observable< - | (HttpResponse & { status: 201 }) - | (HttpResponse & { status: 204 }) - | HttpResponse - > { - const headers = this._headers({ "Content-Type": "application/json" }) - const body = p["requestBody"] - - return this.httpClient.request( - "PUT", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}`, - { - headers, - body, - observe: "response", - reportProgress: false, - }, - ) - } - - actionsDeleteEnvironmentSecret(p: { - repositoryId: number - environmentName: string - secretName: string - }): Observable< - (HttpResponse & { status: 204 }) | HttpResponse - > { - return this.httpClient.request( - "DELETE", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}`, - { - observe: "response", - reportProgress: false, - }, - ) - } - - actionsListEnvironmentVariables(p: { - repositoryId: number - environmentName: string - perPage?: number - page?: number - }): Observable< - | (HttpResponse<{ - total_count: number - variables: t_actions_variable[] - }> & { status: 200 }) - | HttpResponse - > { - const params = this._queryParams({ - per_page: p["perPage"], - page: p["page"], - }) - - return this.httpClient.request( - "GET", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables`, - { - params, - observe: "response", - reportProgress: false, - }, - ) - } - - actionsCreateEnvironmentVariable(p: { - repositoryId: number - environmentName: string - requestBody: { - name: string - value: string - } - }): Observable< - (HttpResponse & { status: 201 }) | HttpResponse - > { - const headers = this._headers({ "Content-Type": "application/json" }) - const body = p["requestBody"] - - return this.httpClient.request( - "POST", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables`, - { - headers, - body, - observe: "response", - reportProgress: false, - }, - ) - } - - actionsGetEnvironmentVariable(p: { - repositoryId: number - environmentName: string - name: string - }): Observable< - (HttpResponse & { status: 200 }) | HttpResponse - > { - return this.httpClient.request( - "GET", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables/${p["name"]}`, - { - observe: "response", - reportProgress: false, - }, - ) - } - - actionsUpdateEnvironmentVariable(p: { - repositoryId: number - name: string - environmentName: string - requestBody: { - name?: string - value?: string - } - }): Observable< - (HttpResponse & { status: 204 }) | HttpResponse - > { - const headers = this._headers({ "Content-Type": "application/json" }) - const body = p["requestBody"] - - return this.httpClient.request( - "PATCH", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables/${p["name"]}`, - { - headers, - body, - observe: "response", - reportProgress: false, - }, - ) - } - - actionsDeleteEnvironmentVariable(p: { - repositoryId: number - name: string - environmentName: string - }): Observable< - (HttpResponse & { status: 204 }) | HttpResponse - > { - return this.httpClient.request( - "DELETE", - this.config.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables/${p["name"]}`, - { - observe: "response", - reportProgress: false, - }, - ) - } - searchCode(p: { q: string sort?: "indexed" @@ -22168,7 +23002,7 @@ export class ApiClient { team_id?: number } }): Observable< - | (HttpResponse & { status: 201 }) + | (HttpResponse & { status: 201 }) | (HttpResponse & { status: 304 }) | (HttpResponse & { status: 400 }) | (HttpResponse & { status: 401 }) diff --git a/integration-tests/typescript-angular/src/generated/api.github.com.yaml/models.ts b/integration-tests/typescript-angular/src/generated/api.github.com.yaml/models.ts index 850136f4..0eda0d0f 100644 --- a/integration-tests/typescript-angular/src/generated/api.github.com.yaml/models.ts +++ b/integration-tests/typescript-angular/src/generated/api.github.com.yaml/models.ts @@ -177,6 +177,7 @@ export type t_api_overview = { api?: string[] dependabot?: string[] domains?: { + actions?: string[] codespaces?: string[] copilot?: string[] packages?: string[] @@ -203,15 +204,26 @@ export type t_app_permissions = { actions?: "read" | "write" administration?: "read" | "write" checks?: "read" | "write" + codespaces?: "read" | "write" contents?: "read" | "write" + dependabot_secrets?: "read" | "write" deployments?: "read" | "write" + email_addresses?: "read" | "write" environments?: "read" | "write" + followers?: "read" | "write" + git_ssh_keys?: "read" | "write" + gpg_keys?: "read" | "write" + interaction_limits?: "read" | "write" issues?: "read" | "write" members?: "read" | "write" metadata?: "read" | "write" organization_administration?: "read" | "write" organization_announcement_banners?: "read" | "write" + organization_copilot_seat_management?: "write" + organization_custom_org_roles?: "read" | "write" + organization_custom_properties?: "read" | "write" | "admin" organization_custom_roles?: "read" | "write" + organization_events?: "read" organization_hooks?: "read" | "write" organization_packages?: "read" | "write" organization_personal_access_token_requests?: "read" | "write" @@ -223,13 +235,16 @@ export type t_app_permissions = { organization_user_blocking?: "read" | "write" packages?: "read" | "write" pages?: "read" | "write" + profile?: "write" pull_requests?: "read" | "write" + repository_custom_properties?: "read" | "write" repository_hooks?: "read" | "write" repository_projects?: "read" | "write" | "admin" secret_scanning_alerts?: "read" | "write" secrets?: "read" | "write" security_events?: "read" | "write" single_file?: "read" | "write" + starring?: "read" | "write" statuses?: "read" | "write" team_discussions?: "read" | "write" vulnerability_alerts?: "read" | "write" @@ -569,7 +584,13 @@ export type t_check_run = { } pull_requests: t_pull_request_minimal[] started_at: string | null - status: "queued" | "in_progress" | "completed" + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" url: string } @@ -600,7 +621,14 @@ export type t_check_suite = { repository: t_minimal_repository rerequestable?: boolean runs_rerequestable?: boolean - status: "queued" | "in_progress" | "completed" | null + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" + | null updated_at: string | null url: string | null } @@ -785,6 +813,7 @@ export type t_code_scanning_alert_rule_summary = { description?: string id?: string | null name?: string + security_severity_level?: "low" | "medium" | "high" | "critical" | null severity?: "none" | "note" | "warning" | "error" | null tags?: string[] | null } @@ -860,6 +889,7 @@ export type t_code_scanning_analysis_tool_version = string | null export type t_code_scanning_analysis_url = string export type t_code_scanning_codeql_database = { + commit_oid?: string | null content_type: string created_at: string id: number @@ -902,7 +932,7 @@ export type t_code_scanning_default_setup_update = { | "swift" )[] query_suite?: "default" | "extended" - state: "configured" | "not-configured" + state?: "configured" | "not-configured" } export type t_code_scanning_default_setup_update_response = { @@ -922,7 +952,7 @@ export type t_code_scanning_organization_alert_items = { most_recent_instance: t_code_scanning_alert_instance number: t_alert_number repository: t_simple_repository - rule: t_code_scanning_alert_rule + rule: t_code_scanning_alert_rule_summary state: t_code_scanning_alert_state tool: t_code_scanning_analysis_tool updated_at?: t_alert_updated_at @@ -931,6 +961,8 @@ export type t_code_scanning_organization_alert_items = { export type t_code_scanning_ref = string +export type t_code_scanning_ref_full = string + export type t_code_scanning_sarifs_receipt = { id?: t_code_scanning_analysis_sarif_id readonly url?: string @@ -1117,6 +1149,10 @@ export type t_codespaces_org_secret = { visibility: "all" | "private" | "selected" } +export type t_codespaces_permissions_check_for_devcontainer = { + accepted: boolean +} + export type t_codespaces_public_key = { created_at?: string id?: number @@ -1447,6 +1483,9 @@ export type t_converted_note_to_issue_issue_event = { } export type t_copilot_organization_details = { + cli?: "enabled" | "disabled" | "unconfigured" + ide_chat?: "enabled" | "disabled" | "unconfigured" + platform_chat?: "enabled" | "disabled" | "unconfigured" public_code_suggestions: "allow" | "block" | "unconfigured" | "unknown" seat_breakdown: t_copilot_seat_breakdown seat_management_setting: @@ -1467,9 +1506,7 @@ export type t_copilot_seat_breakdown = { } export type t_copilot_seat_details = { - assignee: { - [key: string]: unknown | undefined - } + assignee: t_simple_user | t_team | t_organization assigning_team?: t_team | null created_at: string last_activity_at?: string | null @@ -1485,6 +1522,11 @@ export type t_custom_deployment_rule_app = { slug: string } +export type t_custom_property_value = { + property_name: string + value: string | string[] | null +} + export type t_demilestoned_issue_event = { actor: t_simple_user commit_id: string | null @@ -1706,12 +1748,18 @@ export type t_deployment_branch_policy = { id?: number name?: string node_id?: string + type?: "branch" | "tag" } export type t_deployment_branch_policy_name_pattern = { name: string } +export type t_deployment_branch_policy_name_pattern_with_type = { + name: string + type?: "branch" | "tag" +} + export type t_deployment_branch_policy_settings = { custom_branch_policies: boolean protected_branches: boolean @@ -1830,6 +1878,7 @@ export type t_environment = { | { id: number node_id: string + prevent_self_review?: boolean reviewers?: { reviewer?: t_simple_user | t_team type?: t_deployment_reviewer_type @@ -1986,6 +2035,9 @@ export type t_full_repository = { contents_url: string contributors_url: string created_at: string + custom_properties?: { + [key: string]: unknown | undefined + } default_branch: string delete_branch_on_merge?: boolean deployments_url: string @@ -2003,7 +2055,7 @@ export type t_full_repository = { git_tags_url: string git_url: string has_discussions: boolean - has_downloads: boolean + has_downloads?: boolean has_issues: boolean has_pages: boolean has_projects: boolean @@ -2360,18 +2412,7 @@ export type t_gpg_key = { export type t_hook = { active: boolean - config: { - content_type?: t_webhook_config_content_type - digest?: string - email?: string - insecure_ssl?: t_webhook_config_insecure_ssl - password?: string - room?: string - secret?: t_webhook_config_secret - subdomain?: string - token?: string - url?: t_webhook_config_url - } + config: t_webhook_config created_at: string deliveries_url?: string events: string[] @@ -2802,7 +2843,13 @@ export type t_job = { runner_id: number | null runner_name: string | null started_at: string - status: "queued" | "in_progress" | "completed" + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" steps?: { completed_at?: string | null conclusion: string | null @@ -3524,12 +3571,10 @@ export type t_nullable_repository = { milestones_url: string mirror_url: string | null name: string - network_count?: number node_id: string notifications_url: string open_issues: number open_issues_count: number - organization?: t_nullable_simple_user owner: t_simple_user permissions?: { admin: boolean @@ -3550,127 +3595,12 @@ export type t_nullable_repository = { stargazers_url: string starred_at?: string statuses_url: string - subscribers_count?: number subscribers_url: string subscription_url: string svn_url: string tags_url: string teams_url: string temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK" - merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" - squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - use_squash_pr_title_as_default?: boolean - visibility?: string - watchers_count?: number - } | null topics?: string[] trees_url: string updated_at: string | null @@ -3756,6 +3686,16 @@ export type t_oidc_custom_sub_repo = { use_default: boolean } +export type t_org_custom_property = { + allowed_values?: string[] | null + default_value?: string | string[] | null + description?: string | null + property_name: string + required?: boolean + value_type: "string" | "single_select" + values_editable_by?: "org_actors" | "org_and_repo_actors" | null +} + export type t_org_hook = { active: boolean config: { @@ -3787,11 +3727,58 @@ export type t_org_membership = { user: t_nullable_simple_user } +export type t_org_repo_custom_property_values = { + properties: t_custom_property_value[] + repository_full_name: string + repository_id: number + repository_name: string +} + export type t_org_ruleset_conditions = | (t_repository_ruleset_conditions & t_repository_ruleset_conditions_repository_name_target) | (t_repository_ruleset_conditions & t_repository_ruleset_conditions_repository_id_target) + | (t_repository_ruleset_conditions & + t_repository_ruleset_conditions_repository_property_target) + +export type t_organization = { + avatar_url: string + blog?: string + company?: string + created_at: string + description: string | null + email?: string + events_url: string + followers: number + following: number + has_organization_projects: boolean + has_repository_projects: boolean + hooks_url: string + html_url: string + id: number + is_verified?: boolean + issues_url: string + location?: string + login: string + members_url: string + name?: string + node_id: string + plan?: { + filled_seats?: number + name?: string + private_repos?: number + seats?: number + space?: number + } + public_gists: number + public_members_url: string + public_repos: number + repos_url: string + type: string + updated_at: string + url: string +} export type t_organization_actions_secret = { created_at: string @@ -3818,6 +3805,11 @@ export type t_organization_dependabot_secret = { visibility: "all" | "private" | "selected" } +export type t_organization_fine_grained_permission = { + description: string + name: string +} + export type t_organization_full = { advanced_security_enabled_for_new_repositories?: boolean archived_at: string | null @@ -3944,6 +3936,16 @@ export type t_organization_programmatic_access_grant_request = { token_last_used_at: string | null } +export type t_organization_role = { + created_at: string + description?: string | null + id: number + name: string + organization: t_nullable_simple_user + permissions: string[] + updated_at: string +} + export type t_organization_secret_scanning_alert = { created_at?: t_alert_created_at html_url?: t_alert_html_url @@ -3963,6 +3965,7 @@ export type t_organization_secret_scanning_alert = { state?: t_secret_scanning_alert_state updated_at?: t_nullable_alert_updated_at url?: t_alert_url + validity?: "active" | "inactive" | "unknown" } export type t_organization_simple = { @@ -4062,11 +4065,27 @@ export type t_page_build_status = { } export type t_page_deployment = { + id: number | string page_url: string preview_url?: string status_url: string } +export type t_pages_deployment_status = { + status?: + | "deployment_in_progress" + | "syncing_files" + | "finished_file_sync" + | "updating_pages" + | "purging_cdn" + | "deployment_cancelled" + | "deployment_failed" + | "deployment_content_failed" + | "deployment_attempt_error" + | "deployment_lost" + | "succeed" +} + export type t_pages_health_check = { alt_domain?: { caa_error?: string | null @@ -4193,6 +4212,8 @@ export type t_porter_large_file = { size: number } +export type t_prevent_self_review = boolean + export type t_private_user = { avatar_url: string bio: string | null @@ -4248,6 +4269,7 @@ export type t_private_vulnerability_report_create = { cwe_ids?: string[] | null description: string severity?: "critical" | "high" | "medium" | "low" | null + start_private_fork?: boolean summary: string vulnerabilities?: | { @@ -5280,12 +5302,10 @@ export type t_repository = { milestones_url: string mirror_url: string | null name: string - network_count?: number node_id: string notifications_url: string open_issues: number open_issues_count: number - organization?: t_nullable_simple_user owner: t_simple_user permissions?: { admin: boolean @@ -5306,127 +5326,12 @@ export type t_repository = { stargazers_url: string starred_at?: string statuses_url: string - subscribers_count?: number subscribers_url: string subscription_url: string svn_url: string tags_url: string teams_url: string temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK" - merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" - squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - use_squash_pr_title_as_default?: boolean - visibility?: string - watchers_count?: number - } | null topics?: string[] trees_url: string updated_at: string | null @@ -5480,7 +5385,7 @@ export type t_repository_advisory = { } | null summary: string readonly updated_at: string | null - url: string + readonly url: string vulnerabilities: t_repository_advisory_vulnerability[] | null readonly withdrawn_at: string | null } @@ -5497,6 +5402,7 @@ export type t_repository_advisory_create = { cwe_ids?: string[] | null description: string severity?: "critical" | "high" | "medium" | "low" | null + start_private_fork?: boolean summary: string vulnerabilities: { package: { @@ -5586,6 +5492,7 @@ export type t_repository_rule = | t_repository_rule_committer_email_pattern | t_repository_rule_branch_name_pattern | t_repository_rule_tag_name_pattern + | t_repository_rule_workflows export type t_repository_rule_branch_name_pattern = { parameters?: { @@ -5651,6 +5558,7 @@ export type t_repository_rule_detailed = | (t_repository_rule_committer_email_pattern & t_repository_rule_ruleset_info) | (t_repository_rule_branch_name_pattern & t_repository_rule_ruleset_info) | (t_repository_rule_tag_name_pattern & t_repository_rule_ruleset_info) + | (t_repository_rule_workflows & t_repository_rule_ruleset_info) export type t_repository_rule_enforcement = "disabled" | "active" | "evaluate" @@ -5663,6 +5571,13 @@ export type t_repository_rule_params_status_check_configuration = { integration_id?: number } +export type t_repository_rule_params_workflow_file_reference = { + path: string + ref?: string + repository_id: number + sha?: string +} + export type t_repository_rule_pull_request = { parameters?: { dismiss_stale_reviews_on_push: boolean @@ -5720,6 +5635,13 @@ export type t_repository_rule_update = { type: "update" } +export type t_repository_rule_workflows = { + parameters?: { + workflows: t_repository_rule_params_workflow_file_reference[] + } + type: "workflows" +} + export type t_repository_ruleset = { _links?: { html?: { @@ -5730,7 +5652,7 @@ export type t_repository_ruleset = { } } bypass_actors?: t_repository_ruleset_bypass_actor[] - conditions?: t_repository_ruleset_conditions | t_org_ruleset_conditions + conditions?: t_repository_ruleset_conditions | t_org_ruleset_conditions | null created_at?: string current_user_can_bypass?: "always" | "pull_requests_only" | "never" enforcement: t_repository_rule_enforcement @@ -5771,6 +5693,18 @@ export type t_repository_ruleset_conditions_repository_name_target = { } } +export type t_repository_ruleset_conditions_repository_property_spec = { + name: string + property_values: string[] +} + +export type t_repository_ruleset_conditions_repository_property_target = { + repository_property: { + exclude?: t_repository_ruleset_conditions_repository_property_spec[] + include?: t_repository_ruleset_conditions_repository_property_spec[] + } +} + export type t_repository_subscription = { created_at: string ignored: boolean @@ -5888,7 +5822,7 @@ export type t_root = { followers_url: string following_url: string gists_url: string - hub_url: string + hub_url?: string issue_search_url: string issues_url: string keys_url: string @@ -5910,6 +5844,45 @@ export type t_root = { user_url: string } +export type t_rule_suite = { + actor_id?: number | null + actor_name?: string | null + after_sha?: string + before_sha?: string + evaluation_result?: "pass" | "fail" + id?: number + pushed_at?: string + ref?: string + repository_id?: number + repository_name?: string + result?: "pass" | "fail" | "bypass" + rule_evaluations?: { + details?: string + enforcement?: "active" | "evaluate" | "deleted ruleset" + result?: "pass" | "fail" + rule_source?: { + id?: number | null + name?: string | null + type?: string + } + rule_type?: string + }[] +} + +export type t_rule_suites = { + actor_id?: number + actor_name?: string + after_sha?: string + before_sha?: string + evaluation_result?: "pass" | "fail" + id?: number + pushed_at?: string + ref?: string + repository_id?: number + repository_name?: string + result?: "pass" | "fail" | "bypass" +}[] + export type t_runner = { busy: boolean id: number @@ -5973,6 +5946,7 @@ export type t_secret_scanning_alert = { state?: t_secret_scanning_alert_state updated_at?: t_nullable_alert_updated_at url?: t_alert_url + validity?: "active" | "inactive" | "unknown" } export type t_secret_scanning_alert_resolution = @@ -5987,12 +5961,34 @@ export type t_secret_scanning_alert_resolution_comment = string | null export type t_secret_scanning_alert_state = "open" | "resolved" export type t_secret_scanning_location = { - details: + details?: | t_secret_scanning_location_commit + | t_secret_scanning_location_wiki_commit | t_secret_scanning_location_issue_title | t_secret_scanning_location_issue_body | t_secret_scanning_location_issue_comment - type: "commit" | "issue_title" | "issue_body" | "issue_comment" + | t_secret_scanning_location_discussion_title + | t_secret_scanning_location_discussion_body + | t_secret_scanning_location_discussion_comment + | t_secret_scanning_location_pull_request_title + | t_secret_scanning_location_pull_request_body + | t_secret_scanning_location_pull_request_comment + | t_secret_scanning_location_pull_request_review + | t_secret_scanning_location_pull_request_review_comment + type?: + | "commit" + | "wiki_commit" + | "issue_title" + | "issue_body" + | "issue_comment" + | "discussion_title" + | "discussion_body" + | "discussion_comment" + | "pull_request_title" + | "pull_request_body" + | "pull_request_comment" + | "pull_request_review" + | "pull_request_review_comment" } export type t_secret_scanning_location_commit = { @@ -6007,6 +6003,18 @@ export type t_secret_scanning_location_commit = { start_line: number } +export type t_secret_scanning_location_discussion_body = { + discussion_body_url: string +} + +export type t_secret_scanning_location_discussion_comment = { + discussion_comment_url: string +} + +export type t_secret_scanning_location_discussion_title = { + discussion_title_url: string +} + export type t_secret_scanning_location_issue_body = { issue_body_url: string } @@ -6019,6 +6027,38 @@ export type t_secret_scanning_location_issue_title = { issue_title_url: string } +export type t_secret_scanning_location_pull_request_body = { + pull_request_body_url: string +} + +export type t_secret_scanning_location_pull_request_comment = { + pull_request_comment_url: string +} + +export type t_secret_scanning_location_pull_request_review = { + pull_request_review_url: string +} + +export type t_secret_scanning_location_pull_request_review_comment = { + pull_request_review_comment_url: string +} + +export type t_secret_scanning_location_pull_request_title = { + pull_request_title_url: string +} + +export type t_secret_scanning_location_wiki_commit = { + blob_sha: string + commit_sha: string + commit_url: string + end_column: number + end_line: number + page_url: string + path: string + start_column: number + start_line: number +} + export type t_security_advisory_credit_types = | "analyst" | "finder" @@ -6597,7 +6637,6 @@ export type t_team_repository = { tags_url: string teams_url: string temp_clone_token?: string - template_repository?: t_nullable_repository topics?: string[] trees_url: string updated_at: string | null diff --git a/integration-tests/typescript-angular/src/generated/stripe.yaml/client.service.ts b/integration-tests/typescript-angular/src/generated/stripe.yaml/client.service.ts index 9f0366a3..ad670add 100644 --- a/integration-tests/typescript-angular/src/generated/stripe.yaml/client.service.ts +++ b/integration-tests/typescript-angular/src/generated/stripe.yaml/client.service.ts @@ -13,6 +13,10 @@ import { t_balance, t_balance_transaction, t_bank_account, + t_billing_meter, + t_billing_meter_event, + t_billing_meter_event_adjustment, + t_billing_meter_event_summary, t_billing_portal_configuration, t_billing_portal_session, t_capability, @@ -20,6 +24,10 @@ import { t_cash_balance, t_charge, t_checkout_session, + t_climate_order, + t_climate_product, + t_climate_supplier, + t_confirmation_token, t_country_spec, t_coupon, t_credit_note, @@ -27,6 +35,7 @@ import { t_customer, t_customer_balance_transaction, t_customer_cash_balance_transaction, + t_customer_session, t_deleted_account, t_deleted_apple_pay_domain, t_deleted_coupon, @@ -61,6 +70,8 @@ import { t_financial_connections_account, t_financial_connections_account_owner, t_financial_connections_session, + t_financial_connections_transaction, + t_forwarding_request, t_funding_instructions, t_identity_verification_report, t_identity_verification_session, @@ -70,7 +81,10 @@ import { t_issuing_card, t_issuing_cardholder, t_issuing_dispute, + t_issuing_personalization_design, + t_issuing_physical_bundle, t_issuing_settlement, + t_issuing_token, t_issuing_transaction, t_item, t_line_item, @@ -111,6 +125,7 @@ import { t_tax_code, t_tax_id, t_tax_rate, + t_tax_registration, t_tax_settings, t_tax_transaction, t_tax_transaction_line_item, @@ -254,6 +269,10 @@ export class ApiClient { requestBody: { account: string collect?: "currently_due" | "eventually_due" + collection_options?: { + fields: "currently_due" | "eventually_due" + future_requirements?: "include" | "omit" + } expand?: string[] refresh_url?: string return_url?: string @@ -287,6 +306,37 @@ export class ApiClient { components: { account_onboarding?: { enabled: boolean + features?: EmptyObject + } + documents?: { + enabled: boolean + features?: EmptyObject + } + payment_details?: { + enabled: boolean + features?: { + capture_payments?: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management?: boolean + refund_management?: boolean + } + } + payments?: { + enabled: boolean + features?: { + capture_payments?: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management?: boolean + refund_management?: boolean + } + } + payouts?: { + enabled: boolean + features?: { + edit_payout_schedule?: boolean + instant_payouts?: boolean + standard_payouts?: boolean + } } } expand?: string[] @@ -386,6 +436,12 @@ export class ApiClient { } | string business_profile?: { + annual_revenue?: { + amount: number + currency: string + fiscal_year_end: string + } + estimated_worker_count?: number mcc?: string monthly_estimated_revenue?: { amount: number @@ -421,6 +477,9 @@ export class ApiClient { afterpay_clearpay_payments?: { requested?: boolean } + amazon_pay_payments?: { + requested?: boolean + } au_becs_debit_payments?: { requested?: boolean } @@ -484,6 +543,9 @@ export class ApiClient { link_payments?: { requested?: boolean } + mobilepay_payments?: { + requested?: boolean + } oxxo_payments?: { requested?: boolean } @@ -496,12 +558,18 @@ export class ApiClient { promptpay_payments?: { requested?: boolean } + revolut_pay_payments?: { + requested?: boolean + } sepa_debit_payments?: { requested?: boolean } sofort_payments?: { requested?: boolean } + swish_payments?: { + requested?: boolean + } tax_reporting_us_1099_k?: { requested?: boolean } @@ -580,6 +648,7 @@ export class ApiClient { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -686,6 +755,13 @@ export class ApiClient { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -704,6 +780,9 @@ export class ApiClient { } | "" settings?: { + bacs_debit_payments?: { + display_name?: string + } branding?: { icon?: string logo?: string @@ -845,6 +924,12 @@ export class ApiClient { requestBody?: { account_token?: string business_profile?: { + annual_revenue?: { + amount: number + currency: string + fiscal_year_end: string + } + estimated_worker_count?: number mcc?: string monthly_estimated_revenue?: { amount: number @@ -880,6 +965,9 @@ export class ApiClient { afterpay_clearpay_payments?: { requested?: boolean } + amazon_pay_payments?: { + requested?: boolean + } au_becs_debit_payments?: { requested?: boolean } @@ -943,6 +1031,9 @@ export class ApiClient { link_payments?: { requested?: boolean } + mobilepay_payments?: { + requested?: boolean + } oxxo_payments?: { requested?: boolean } @@ -955,12 +1046,18 @@ export class ApiClient { promptpay_payments?: { requested?: boolean } + revolut_pay_payments?: { + requested?: boolean + } sepa_debit_payments?: { requested?: boolean } sofort_payments?: { requested?: boolean } + swish_payments?: { + requested?: boolean + } tax_reporting_us_1099_k?: { requested?: boolean } @@ -1039,6 +1136,7 @@ export class ApiClient { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -1144,6 +1242,13 @@ export class ApiClient { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -1162,6 +1267,9 @@ export class ApiClient { } | "" settings?: { + bacs_debit_payments?: { + display_name?: string + } branding?: { icon?: string logo?: string @@ -1184,6 +1292,9 @@ export class ApiClient { statement_descriptor_prefix_kana?: string | "" statement_descriptor_prefix_kanji?: string | "" } + invoices?: { + default_account_tax_ids?: string[] | "" + } payments?: { statement_descriptor?: string statement_descriptor_kana?: string @@ -1499,6 +1610,7 @@ export class ApiClient { endingBefore?: string expand?: string[] limit?: number + object?: "bank_account" | "card" startingAfter?: string requestBody?: EmptyObject }): Observable< @@ -1518,6 +1630,7 @@ export class ApiClient { ending_before: p["endingBefore"], expand: p["expand"], limit: p["limit"], + object: p["object"], starting_after: p["startingAfter"], }) const body = p["requestBody"] @@ -1728,6 +1841,7 @@ export class ApiClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean representative?: boolean } @@ -1771,6 +1885,13 @@ export class ApiClient { postAccountsAccountPeople(p: { account: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -1848,6 +1969,7 @@ export class ApiClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -1948,6 +2070,13 @@ export class ApiClient { account: string person: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -2025,6 +2154,7 @@ export class ApiClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -2073,6 +2203,7 @@ export class ApiClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean representative?: boolean } @@ -2116,6 +2247,13 @@ export class ApiClient { postAccountsAccountPersons(p: { account: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -2193,6 +2331,7 @@ export class ApiClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -2293,6 +2432,13 @@ export class ApiClient { account: string person: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -2370,6 +2516,7 @@ export class ApiClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -3156,6 +3303,311 @@ export class ApiClient { ) } + postBillingMeterEventAdjustments(p: { + requestBody: { + cancel: { + identifier: string + } + event_name: string + expand?: string[] + type?: "cancel" + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/billing/meter_event_adjustments`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postBillingMeterEvents(p: { + requestBody: { + event_name: string + expand?: string[] + identifier?: string + payload: { + [key: string]: string | undefined + } + timestamp: number + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/billing/meter_events`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getBillingMeters( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "inactive" + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse<{ + data: t_billing_meter[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/billing/meters`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postBillingMeters(p: { + requestBody: { + customer_mapping?: { + event_payload_key: string + type: "by_id" + } + default_aggregation: { + formula: "count" | "sum" + } + display_name: string + event_name: string + event_time_window?: "day" | "hour" + expand?: string[] + value_settings?: { + event_payload_key: string + } + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/billing/meters`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getBillingMetersId(p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/billing/meters/${p["id"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postBillingMetersId(p: { + id: string + requestBody?: { + display_name?: string + expand?: string[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/billing/meters/${p["id"]}`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postBillingMetersIdDeactivate(p: { + id: string + requestBody?: { + expand?: string[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/billing/meters/${p["id"]}/deactivate`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getBillingMetersIdEventSummaries(p: { + customer: string + endTime: number + endingBefore?: string + expand?: string[] + id: string + limit?: number + startTime: number + startingAfter?: string + valueGroupingWindow?: "hour" + requestBody?: EmptyObject + }): Observable< + | (HttpResponse<{ + data: t_billing_meter_event_summary[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + customer: p["customer"], + end_time: p["endTime"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + start_time: p["startTime"], + starting_after: p["startingAfter"], + value_grouping_window: p["valueGroupingWindow"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/billing/meters/${p["id"]}/event_summaries`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postBillingMetersIdReactivate(p: { + id: string + requestBody?: { + expand?: string[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/billing/meters/${p["id"]}/reactivate`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + getBillingPortalConfigurations( p: { active?: boolean @@ -3244,9 +3696,6 @@ export class ApiClient { mode?: "at_period_end" | "immediately" proration_behavior?: "always_invoice" | "create_prorations" | "none" } - subscription_pause?: { - enabled?: boolean - } subscription_update?: { default_allowed_updates: | ("price" | "promotion_code" | "quantity")[] @@ -3363,9 +3812,6 @@ export class ApiClient { mode?: "at_period_end" | "immediately" proration_behavior?: "always_invoice" | "create_prorations" | "none" } - subscription_pause?: { - enabled?: boolean - } subscription_update?: { default_allowed_updates?: | ("price" | "promotion_code" | "quantity")[] @@ -4142,6 +4588,14 @@ export class ApiClient { getCheckoutSessions( p: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string customerDetails?: { email: string @@ -4152,6 +4606,7 @@ export class ApiClient { paymentIntent?: string paymentLink?: string startingAfter?: string + status?: "complete" | "expired" | "open" subscription?: string requestBody?: EmptyObject } = {}, @@ -4169,6 +4624,7 @@ export class ApiClient { "Content-Type": "application/x-www-form-urlencoded", }) const params = this._queryParams({ + created: p["created"], customer: p["customer"], customer_details: p["customerDetails"], ending_before: p["endingBefore"], @@ -4177,6 +4633,7 @@ export class ApiClient { payment_intent: p["paymentIntent"], payment_link: p["paymentLink"], starting_after: p["startingAfter"], + status: p["status"], subscription: p["subscription"], }) const body = p["requestBody"] @@ -4194,725 +4651,761 @@ export class ApiClient { ) } - postCheckoutSessions(p: { - requestBody: { - after_expiration?: { - recovery?: { - allow_promotion_codes?: boolean - enabled: boolean - } - } - allow_promotion_codes?: boolean - automatic_tax?: { - enabled: boolean - } - billing_address_collection?: "auto" | "required" - cancel_url?: string - client_reference_id?: string - consent_collection?: { - promotions?: "auto" | "none" - terms_of_service?: "none" | "required" - } - currency?: string - custom_fields?: { - dropdown?: { - options: { - label: string - value: string - }[] - } - key: string - label: { - custom: string - type: "custom" + postCheckoutSessions( + p: { + requestBody?: { + after_expiration?: { + recovery?: { + allow_promotion_codes?: boolean + enabled: boolean + } } - numeric?: { - maximum_length?: number - minimum_length?: number + allow_promotion_codes?: boolean + automatic_tax?: { + enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } - optional?: boolean - text?: { - maximum_length?: number - minimum_length?: number + billing_address_collection?: "auto" | "required" + cancel_url?: string + client_reference_id?: string + consent_collection?: { + payment_method_reuse_agreement?: { + position: "auto" | "hidden" + } + promotions?: "auto" | "none" + terms_of_service?: "none" | "required" } - type: "dropdown" | "numeric" | "text" - }[] - custom_text?: { - shipping_address?: - | { - message: string - } - | "" - submit?: - | { - message: string - } - | "" - terms_of_service_acceptance?: - | { - message: string - } - | "" - } - customer?: string - customer_creation?: "always" | "if_required" - customer_email?: string - customer_update?: { - address?: "auto" | "never" - name?: "auto" | "never" - shipping?: "auto" | "never" - } - discounts?: { - coupon?: string - promotion_code?: string - }[] - expand?: string[] - expires_at?: number - invoice_creation?: { - enabled: boolean - invoice_data?: { - account_tax_ids?: string[] | "" - custom_fields?: + currency?: string + custom_fields?: { + dropdown?: { + options: { + label: string + value: string + }[] + } + key: string + label: { + custom: string + type: "custom" + } + numeric?: { + maximum_length?: number + minimum_length?: number + } + optional?: boolean + text?: { + maximum_length?: number + minimum_length?: number + } + type: "dropdown" | "numeric" | "text" + }[] + custom_text?: { + after_submit?: | { - name: string - value: string - }[] + message: string + } | "" - description?: string - footer?: string - metadata?: { - [key: string]: string | undefined - } - rendering_options?: + shipping_address?: | { - amount_tax_display?: - | "" - | "exclude_tax" - | "include_inclusive_tax" + message: string + } + | "" + submit?: + | { + message: string + } + | "" + terms_of_service_acceptance?: + | { + message: string } | "" } - } - line_items?: { - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number + customer?: string + customer_creation?: "always" | "if_required" + customer_email?: string + customer_update?: { + address?: "auto" | "never" + name?: "auto" | "never" + shipping?: "auto" | "never" } - dynamic_tax_rates?: string[] - price?: string - price_data?: { - currency: string - product?: string - product_data?: { + discounts?: { + coupon?: string + promotion_code?: string + }[] + expand?: string[] + expires_at?: number + invoice_creation?: { + enabled: boolean + invoice_data?: { + account_tax_ids?: string[] | "" + custom_fields?: + | { + name: string + value: string + }[] + | "" description?: string - images?: string[] + footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: { [key: string]: string | undefined } - name: string - tax_code?: string - } - recurring?: { - interval: "day" | "month" | "week" | "year" - interval_count?: number + rendering_options?: + | { + amount_tax_display?: + | "" + | "exclude_tax" + | "include_inclusive_tax" + } + | "" } - tax_behavior?: "exclusive" | "inclusive" | "unspecified" - unit_amount?: number - unit_amount_decimal?: string } - quantity?: number - tax_rates?: string[] - }[] - locale?: - | "auto" - | "bg" - | "cs" - | "da" - | "de" - | "el" - | "en" - | "en-GB" - | "es" - | "es-419" - | "et" - | "fi" - | "fil" - | "fr" - | "fr-CA" - | "hr" - | "hu" - | "id" - | "it" - | "ja" - | "ko" - | "lt" - | "lv" - | "ms" - | "mt" - | "nb" - | "nl" - | "pl" - | "pt" - | "pt-BR" - | "ro" - | "ru" - | "sk" - | "sl" - | "sv" - | "th" - | "tr" - | "vi" - | "zh" - | "zh-HK" - | "zh-TW" - metadata?: { - [key: string]: string | undefined - } - mode?: "payment" | "setup" | "subscription" - payment_intent_data?: { - application_fee_amount?: number - capture_method?: "automatic" | "automatic_async" | "manual" - description?: string + line_items?: { + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + dynamic_tax_rates?: string[] + price?: string + price_data?: { + currency: string + product?: string + product_data?: { + description?: string + images?: string[] + metadata?: { + [key: string]: string | undefined + } + name: string + tax_code?: string + } + recurring?: { + interval: "day" | "month" | "week" | "year" + interval_count?: number + } + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + unit_amount?: number + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] + }[] + locale?: + | "auto" + | "bg" + | "cs" + | "da" + | "de" + | "el" + | "en" + | "en-GB" + | "es" + | "es-419" + | "et" + | "fi" + | "fil" + | "fr" + | "fr-CA" + | "hr" + | "hu" + | "id" + | "it" + | "ja" + | "ko" + | "lt" + | "lv" + | "ms" + | "mt" + | "nb" + | "nl" + | "pl" + | "pt" + | "pt-BR" + | "ro" + | "ru" + | "sk" + | "sl" + | "sv" + | "th" + | "tr" + | "vi" + | "zh" + | "zh-HK" + | "zh-TW" metadata?: { [key: string]: string | undefined } - on_behalf_of?: string - receipt_email?: string - setup_future_usage?: "off_session" | "on_session" - shipping?: { - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string + mode?: "payment" | "setup" | "subscription" + payment_intent_data?: { + application_fee_amount?: number + capture_method?: "automatic" | "automatic_async" | "manual" + description?: string + metadata?: { + [key: string]: string | undefined } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - statement_descriptor?: string - statement_descriptor_suffix?: string - transfer_data?: { - amount?: number - destination: string - } - transfer_group?: string - } - payment_method_collection?: "always" | "if_required" - payment_method_configuration?: string - payment_method_options?: { - acss_debit?: { - currency?: "cad" | "usd" - mandate_options?: { - custom_mandate_url?: string | "" - default_for?: ("invoice" | "subscription")[] - interval_description?: string - payment_schedule?: "combined" | "interval" | "sporadic" - transaction_type?: "business" | "personal" + on_behalf_of?: string + receipt_email?: string + setup_future_usage?: "off_session" | "on_session" + shipping?: { + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string } - setup_future_usage?: "none" | "off_session" | "on_session" - verification_method?: "automatic" | "instant" | "microdeposits" - } - affirm?: { - setup_future_usage?: "none" - } - afterpay_clearpay?: { - setup_future_usage?: "none" - } - alipay?: { - setup_future_usage?: "none" - } - au_becs_debit?: { - setup_future_usage?: "none" - } - bacs_debit?: { - setup_future_usage?: "none" | "off_session" | "on_session" - } - bancontact?: { - setup_future_usage?: "none" - } - boleto?: { - expires_after_days?: number - setup_future_usage?: "none" | "off_session" | "on_session" - } - card?: { - installments?: { - enabled?: boolean + statement_descriptor?: string + statement_descriptor_suffix?: string + transfer_data?: { + amount?: number + destination: string } - setup_future_usage?: "off_session" | "on_session" - statement_descriptor_suffix_kana?: string - statement_descriptor_suffix_kanji?: string - } - cashapp?: { - setup_future_usage?: "none" | "off_session" | "on_session" + transfer_group?: string } - customer_balance?: { - bank_transfer?: { - eu_bank_transfer?: { - country: string + payment_method_collection?: "always" | "if_required" + payment_method_configuration?: string + payment_method_options?: { + acss_debit?: { + currency?: "cad" | "usd" + mandate_options?: { + custom_mandate_url?: string | "" + default_for?: ("invoice" | "subscription")[] + interval_description?: string + payment_schedule?: "combined" | "interval" | "sporadic" + transaction_type?: "business" | "personal" } - requested_address_types?: ( - | "aba" - | "iban" - | "sepa" - | "sort_code" - | "spei" - | "swift" - | "zengin" - )[] - type: - | "eu_bank_transfer" - | "gb_bank_transfer" - | "jp_bank_transfer" - | "mx_bank_transfer" - | "us_bank_transfer" + setup_future_usage?: "none" | "off_session" | "on_session" + verification_method?: "automatic" | "instant" | "microdeposits" + } + affirm?: { + setup_future_usage?: "none" + } + afterpay_clearpay?: { + setup_future_usage?: "none" + } + alipay?: { + setup_future_usage?: "none" + } + au_becs_debit?: { + setup_future_usage?: "none" + } + bacs_debit?: { + setup_future_usage?: "none" | "off_session" | "on_session" + } + bancontact?: { + setup_future_usage?: "none" + } + boleto?: { + expires_after_days?: number + setup_future_usage?: "none" | "off_session" | "on_session" + } + card?: { + installments?: { + enabled?: boolean + } + request_three_d_secure?: "any" | "automatic" | "challenge" + setup_future_usage?: "off_session" | "on_session" + statement_descriptor_suffix_kana?: string + statement_descriptor_suffix_kanji?: string + } + cashapp?: { + setup_future_usage?: "none" | "off_session" | "on_session" + } + customer_balance?: { + bank_transfer?: { + eu_bank_transfer?: { + country: string + } + requested_address_types?: ( + | "aba" + | "iban" + | "sepa" + | "sort_code" + | "spei" + | "swift" + | "zengin" + )[] + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer" + | "us_bank_transfer" + } + funding_type?: "bank_transfer" + setup_future_usage?: "none" + } + eps?: { + setup_future_usage?: "none" + } + fpx?: { + setup_future_usage?: "none" + } + giropay?: { + setup_future_usage?: "none" + } + grabpay?: { + setup_future_usage?: "none" + } + ideal?: { + setup_future_usage?: "none" + } + klarna?: { + setup_future_usage?: "none" + } + konbini?: { + expires_after_days?: number + setup_future_usage?: "none" + } + link?: { + setup_future_usage?: "none" | "off_session" + } + oxxo?: { + expires_after_days?: number + setup_future_usage?: "none" + } + p24?: { + setup_future_usage?: "none" + tos_shown_and_accepted?: boolean + } + paynow?: { + setup_future_usage?: "none" + } + paypal?: { + capture_method?: "" | "manual" + preferred_locale?: + | "cs-CZ" + | "da-DK" + | "de-AT" + | "de-DE" + | "de-LU" + | "el-GR" + | "en-GB" + | "en-US" + | "es-ES" + | "fi-FI" + | "fr-BE" + | "fr-FR" + | "fr-LU" + | "hu-HU" + | "it-IT" + | "nl-BE" + | "nl-NL" + | "pl-PL" + | "pt-PT" + | "sk-SK" + | "sv-SE" + reference?: string + risk_correlation_id?: string + setup_future_usage?: "" | "none" | "off_session" + } + pix?: { + expires_after_seconds?: number + } + revolut_pay?: { + setup_future_usage?: "none" | "off_session" + } + sepa_debit?: { + setup_future_usage?: "none" | "off_session" | "on_session" + } + sofort?: { + setup_future_usage?: "none" + } + swish?: { + reference?: string + } + us_bank_account?: { + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[] + prefetch?: ("balances" | "transactions")[] + } + setup_future_usage?: "none" | "off_session" | "on_session" + verification_method?: "automatic" | "instant" + } + wechat_pay?: { + app_id?: string + client: "android" | "ios" | "web" + setup_future_usage?: "none" } - funding_type?: "bank_transfer" - setup_future_usage?: "none" - } - eps?: { - setup_future_usage?: "none" - } - fpx?: { - setup_future_usage?: "none" - } - giropay?: { - setup_future_usage?: "none" - } - grabpay?: { - setup_future_usage?: "none" - } - ideal?: { - setup_future_usage?: "none" - } - klarna?: { - setup_future_usage?: "none" - } - konbini?: { - expires_after_days?: number - setup_future_usage?: "none" - } - link?: { - setup_future_usage?: "none" | "off_session" - } - oxxo?: { - expires_after_days?: number - setup_future_usage?: "none" - } - p24?: { - setup_future_usage?: "none" - tos_shown_and_accepted?: boolean - } - paynow?: { - setup_future_usage?: "none" - } - paypal?: { - capture_method?: "" | "manual" - preferred_locale?: - | "cs-CZ" - | "da-DK" - | "de-AT" - | "de-DE" - | "de-LU" - | "el-GR" - | "en-GB" - | "en-US" - | "es-ES" - | "fi-FI" - | "fr-BE" - | "fr-FR" - | "fr-LU" - | "hu-HU" - | "it-IT" - | "nl-BE" - | "nl-NL" - | "pl-PL" - | "pt-PT" - | "sk-SK" - | "sv-SE" - reference?: string - risk_correlation_id?: string - setup_future_usage?: "" | "none" | "off_session" - } - pix?: { - expires_after_seconds?: number - } - sepa_debit?: { - setup_future_usage?: "none" | "off_session" | "on_session" } - sofort?: { - setup_future_usage?: "none" + payment_method_types?: ( + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "card" + | "cashapp" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "link" + | "oxxo" + | "p24" + | "paynow" + | "paypal" + | "pix" + | "promptpay" + | "revolut_pay" + | "sepa_debit" + | "sofort" + | "swish" + | "us_bank_account" + | "wechat_pay" + | "zip" + )[] + phone_number_collection?: { + enabled: boolean } - us_bank_account?: { - financial_connections?: { - permissions?: ( - | "balances" - | "ownership" - | "payment_method" - | "transactions" - )[] - prefetch?: "balances"[] + redirect_on_completion?: "always" | "if_required" | "never" + return_url?: string + setup_intent_data?: { + description?: string + metadata?: { + [key: string]: string | undefined } - setup_future_usage?: "none" | "off_session" | "on_session" - verification_method?: "automatic" | "instant" - } - wechat_pay?: { - app_id?: string - client: "android" | "ios" | "web" - setup_future_usage?: "none" + on_behalf_of?: string } - } - payment_method_types?: ( - | "acss_debit" - | "affirm" - | "afterpay_clearpay" - | "alipay" - | "au_becs_debit" - | "bacs_debit" - | "bancontact" - | "blik" - | "boleto" - | "card" - | "cashapp" - | "customer_balance" - | "eps" - | "fpx" - | "giropay" - | "grabpay" - | "ideal" - | "klarna" - | "konbini" - | "link" - | "oxxo" - | "p24" - | "paynow" - | "paypal" - | "pix" - | "promptpay" - | "sepa_debit" - | "sofort" - | "us_bank_account" - | "wechat_pay" - | "zip" - )[] - phone_number_collection?: { - enabled: boolean - } - setup_intent_data?: { - description?: string - metadata?: { - [key: string]: string | undefined + 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" + )[] } - on_behalf_of?: string - } - 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" - )[] - } - shipping_options?: { - shipping_rate?: string - shipping_rate_data?: { - delivery_estimate?: { - maximum?: { - unit: "business_day" | "day" | "hour" | "month" | "week" - value: number + shipping_options?: { + shipping_rate?: string + shipping_rate_data?: { + delivery_estimate?: { + maximum?: { + unit: "business_day" | "day" | "hour" | "month" | "week" + value: number + } + minimum?: { + unit: "business_day" | "day" | "hour" | "month" | "week" + value: number + } } - minimum?: { - unit: "business_day" | "day" | "hour" | "month" | "week" - value: number + display_name: string + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: + | { + amount: number + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + } + | undefined + } } + metadata?: { + [key: string]: string | undefined + } + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + tax_code?: string + type?: "fixed_amount" } - display_name: string - fixed_amount?: { - amount: number - currency: string - currency_options?: { - [key: string]: - | { - amount: number - tax_behavior?: "exclusive" | "inclusive" | "unspecified" - } - | undefined + }[] + submit_type?: "auto" | "book" | "donate" | "pay" + subscription_data?: { + application_fee_percent?: number + billing_cycle_anchor?: number + default_tax_rates?: string[] + description?: string + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" } } metadata?: { [key: string]: string | undefined } - tax_behavior?: "exclusive" | "inclusive" | "unspecified" - tax_code?: string - type?: "fixed_amount" - } - }[] - submit_type?: "auto" | "book" | "donate" | "pay" - subscription_data?: { - application_fee_percent?: number - billing_cycle_anchor?: number - default_tax_rates?: string[] - description?: string - metadata?: { - [key: string]: string | undefined - } - on_behalf_of?: string - proration_behavior?: "create_prorations" | "none" - transfer_data?: { - amount_percent?: number - destination: string - } - trial_end?: number - trial_period_days?: number - trial_settings?: { - end_behavior: { - missing_payment_method: "cancel" | "create_invoice" | "pause" + on_behalf_of?: string + proration_behavior?: "create_prorations" | "none" + transfer_data?: { + amount_percent?: number + destination: string + } + trial_end?: number + trial_period_days?: number + trial_settings?: { + end_behavior: { + missing_payment_method: "cancel" | "create_invoice" | "pause" + } } } + success_url?: string + tax_id_collection?: { + enabled: boolean + } + ui_mode?: "embedded" | "hosted" } - success_url: string - tax_id_collection?: { - enabled: boolean - } - } - }): Observable< + } = {}, + ): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: StatusCode }) | HttpResponse @@ -5030,6 +5523,343 @@ export class ApiClient { ) } + getClimateOrders( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse<{ + data: t_climate_order[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/climate/orders`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postClimateOrders(p: { + requestBody: { + amount?: number + beneficiary?: { + public_name: string + } + currency?: string + expand?: string[] + metadata?: { + [key: string]: string | undefined + } + metric_tons?: string + product: string + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/climate/orders`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getClimateOrdersOrder(p: { + expand?: string[] + order: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/climate/orders/${p["order"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postClimateOrdersOrder(p: { + order: string + requestBody?: { + beneficiary?: + | { + public_name: string | "" + } + | "" + expand?: string[] + metadata?: { + [key: string]: string | undefined + } + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/climate/orders/${p["order"]}`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postClimateOrdersOrderCancel(p: { + order: string + requestBody?: { + expand?: string[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/climate/orders/${p["order"]}/cancel`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getClimateProducts( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse<{ + data: t_climate_product[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/climate/products`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getClimateProductsProduct(p: { + expand?: string[] + product: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/climate/products/${p["product"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getClimateSuppliers( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse<{ + data: t_climate_supplier[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/climate/suppliers`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getClimateSuppliersSupplier(p: { + expand?: string[] + supplier: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/climate/suppliers/${p["supplier"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getConfirmationTokensConfirmationToken(p: { + confirmationToken: string + expand?: string[] + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + + `/v1/confirmation_tokens/${p["confirmationToken"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + getCountrySpecs( p: { endingBefore?: string @@ -5298,6 +6128,14 @@ export class ApiClient { getCreditNotes( p: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string endingBefore?: string expand?: string[] @@ -5320,6 +6158,7 @@ export class ApiClient { "Content-Type": "application/x-www-form-urlencoded", }) const params = this._queryParams({ + created: p["created"], customer: p["customer"], ending_before: p["endingBefore"], expand: p["expand"], @@ -5354,6 +6193,13 @@ export class ApiClient { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -5408,6 +6254,13 @@ export class ApiClient { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -5480,6 +6333,13 @@ export class ApiClient { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -5675,6 +6535,41 @@ export class ApiClient { ) } + postCustomerSessions(p: { + requestBody: { + components: { + buy_button?: { + enabled: boolean + } + pricing_table?: { + enabled: boolean + } + } + customer: string + expand?: string[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/customer_sessions`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + getCustomers( p: { created?: @@ -5800,6 +6695,7 @@ export class ApiClient { source?: string tax?: { ip_address?: string | "" + validate_location?: "deferred" | "immediately" } tax_exempt?: "" | "exempt" | "none" | "reverse" tax_id_data?: { @@ -5849,6 +6745,7 @@ export class ApiClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -6092,6 +6989,7 @@ export class ApiClient { source?: string tax?: { ip_address?: string | "" + validate_location?: "deferred" | "immediately" } tax_exempt?: "" | "exempt" | "none" | "reverse" } @@ -6983,14 +7881,17 @@ export class ApiClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -7359,6 +8260,11 @@ export class ApiClient { customer: string requestBody?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -7370,9 +8276,13 @@ export class ApiClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } backdate_start_date?: number billing_cycle_anchor?: number @@ -7391,13 +8301,34 @@ export class ApiClient { default_payment_method?: string default_source?: string default_tax_rates?: string[] | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -7461,7 +8392,7 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -7476,6 +8407,7 @@ export class ApiClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -7485,7 +8417,7 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -7503,12 +8435,14 @@ export class ApiClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -7629,6 +8563,11 @@ export class ApiClient { subscriptionExposedId: string requestBody?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -7640,9 +8579,13 @@ export class ApiClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "now" | "unchanged" billing_thresholds?: @@ -7672,7 +8615,21 @@ export class ApiClient { default_payment_method?: string default_source?: string | "" default_tax_rates?: string[] | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { @@ -7681,6 +8638,13 @@ export class ApiClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -7753,7 +8717,7 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -7768,6 +8732,7 @@ export class ApiClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -7777,7 +8742,7 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -7795,12 +8760,14 @@ export class ApiClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -8006,6 +8973,7 @@ export class ApiClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -8938,7 +9906,7 @@ export class ApiClient { account: string requestBody: { expand?: string[] - features: ("balance" | "ownership")[] + features: ("balance" | "ownership" | "transactions")[] } }): Observable< | (HttpResponse & { status: 200 }) @@ -8963,6 +9931,64 @@ export class ApiClient { ) } + postFinancialConnectionsAccountsAccountSubscribe(p: { + account: string + requestBody: { + expand?: string[] + features: "transactions"[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + + `/v1/financial_connections/accounts/${p["account"]}/subscribe`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postFinancialConnectionsAccountsAccountUnsubscribe(p: { + account: string + requestBody: { + expand?: string[] + features: "transactions"[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + + `/v1/financial_connections/accounts/${p["account"]}/unsubscribe`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + postFinancialConnectionsSessions(p: { requestBody: { account_holder: { @@ -8980,7 +10006,7 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: ("balances" | "ownership")[] + prefetch?: ("balances" | "ownership" | "transactions")[] return_url?: string } }): Observable< @@ -9034,8 +10060,212 @@ export class ApiClient { ) } + getFinancialConnectionsTransactions(p: { + account: string + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + transactedAt?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + transactionRefresh?: { + after: string + } + requestBody?: EmptyObject + }): Observable< + | (HttpResponse<{ + data: t_financial_connections_transaction[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + account: p["account"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + transacted_at: p["transactedAt"], + transaction_refresh: p["transactionRefresh"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/financial_connections/transactions`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getFinancialConnectionsTransactionsTransaction(p: { + expand?: string[] + transaction: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + + `/v1/financial_connections/transactions/${p["transaction"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getForwardingRequests( + p: { + created?: { + gt?: number + gte?: number + lt?: number + lte?: number + } + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse<{ + data: t_forwarding_request[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + created: p["created"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/forwarding/requests`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postForwardingRequests(p: { + requestBody: { + config: string + expand?: string[] + payment_method: string + replacements: ( + | "card_cvc" + | "card_expiry" + | "card_number" + | "cardholder_name" + )[] + request?: { + body?: string + headers?: { + name: string + value: string + }[] + } + url: string + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/forwarding/requests`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getForwardingRequestsId(p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/forwarding/requests/${p["id"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + getIdentityVerificationReports( p: { + clientReferenceId?: string created?: | { gt?: number @@ -9066,6 +10296,7 @@ export class ApiClient { "Content-Type": "application/x-www-form-urlencoded", }) const params = this._queryParams({ + client_reference_id: p["clientReferenceId"], created: p["created"], ending_before: p["endingBefore"], expand: p["expand"], @@ -9119,6 +10350,7 @@ export class ApiClient { getIdentityVerificationSessions( p: { + clientReferenceId?: string created?: | { gt?: number @@ -9148,6 +10380,7 @@ export class ApiClient { "Content-Type": "application/x-www-form-urlencoded", }) const params = this._queryParams({ + client_reference_id: p["clientReferenceId"], created: p["created"], ending_before: p["endingBefore"], expand: p["expand"], @@ -9170,26 +10403,44 @@ export class ApiClient { ) } - postIdentityVerificationSessions(p: { - requestBody: { - expand?: string[] - metadata?: { - [key: string]: string | undefined - } - options?: { - document?: - | { - allowed_types?: ("driving_license" | "id_card" | "passport")[] - require_id_number?: boolean - require_live_capture?: boolean - require_matching_selfie?: boolean - } - | "" + postIdentityVerificationSessions( + p: { + requestBody?: { + client_reference_id?: string + expand?: string[] + metadata?: { + [key: string]: string | undefined + } + options?: { + document?: + | { + allowed_types?: ("driving_license" | "id_card" | "passport")[] + require_id_number?: boolean + require_live_capture?: boolean + require_matching_selfie?: boolean + } + | "" + email?: + | { + require_verification?: boolean + } + | "" + phone?: + | { + require_verification?: boolean + } + | "" + } + provided_details?: { + email?: string + phone?: string + } + return_url?: string + type?: "document" | "id_number" + verification_flow?: string } - return_url?: string - type: "document" | "id_number" - } - }): Observable< + } = {}, + ): Observable< | (HttpResponse & { status: 200 }) | (HttpResponse & { status: StatusCode }) | HttpResponse @@ -9256,6 +10507,20 @@ export class ApiClient { require_matching_selfie?: boolean } | "" + email?: + | { + require_verification?: boolean + } + | "" + phone?: + | { + require_verification?: boolean + } + | "" + } + provided_details?: { + email?: string + phone?: string } type?: "document" | "id_number" } @@ -9406,6 +10671,7 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -9520,6 +10786,7 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -9645,6 +10912,10 @@ export class ApiClient { auto_advance?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" currency?: string @@ -9664,6 +10935,7 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" due_date?: number @@ -9674,11 +10946,16 @@ export class ApiClient { action: "revision" invoice: string } + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined } | "" + number?: string on_behalf_of?: string payment_settings?: { default_mandate?: string | "" @@ -9711,7 +10988,7 @@ export class ApiClient { } | "" } - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -9726,6 +11003,7 @@ export class ApiClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -9735,7 +11013,7 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -9756,12 +11034,14 @@ export class ApiClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -9772,21 +11052,13 @@ export class ApiClient { )[] | "" } - pending_invoice_items_behavior?: - | "exclude" - | "include" - | "include_and_require" + pending_invoice_items_behavior?: "exclude" | "include" rendering?: { amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" pdf?: { page_size?: "a4" | "auto" | "letter" } } - rendering_options?: - | { - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" - } - | "" shipping_cost?: { shipping_rate?: string shipping_rate_data?: { @@ -9909,6 +11181,10 @@ export class ApiClient { p: { automaticTax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } coupon?: string currency?: string @@ -9989,6 +11265,7 @@ export class ApiClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -10017,6 +11294,7 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -10029,6 +11307,7 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" invoiceitem?: string @@ -10056,6 +11335,11 @@ export class ApiClient { unit_amount?: number unit_amount_decimal?: string }[] + issuer?: { + account?: string + type: "account" | "self" + } + onBehalfOf?: string | "" schedule?: string subscription?: string subscriptionBillingCycleAnchor?: "now" | "unchanged" | number @@ -10071,6 +11355,13 @@ export class ApiClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -10120,6 +11411,8 @@ export class ApiClient { discounts: p["discounts"], expand: p["expand"], invoice_items: p["invoiceItems"], + issuer: p["issuer"], + on_behalf_of: p["onBehalfOf"], schedule: p["schedule"], subscription: p["subscription"], subscription_billing_cycle_anchor: p["subscriptionBillingCycleAnchor"], @@ -10154,6 +11447,10 @@ export class ApiClient { p: { automaticTax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } coupon?: string currency?: string @@ -10234,6 +11531,7 @@ export class ApiClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -10262,6 +11560,7 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" endingBefore?: string @@ -10275,6 +11574,7 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" invoiceitem?: string @@ -10302,7 +11602,12 @@ export class ApiClient { unit_amount?: number unit_amount_decimal?: string }[] + issuer?: { + account?: string + type: "account" | "self" + } limit?: number + onBehalfOf?: string | "" schedule?: string startingAfter?: string subscription?: string @@ -10319,6 +11624,13 @@ export class ApiClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -10374,7 +11686,9 @@ export class ApiClient { ending_before: p["endingBefore"], expand: p["expand"], invoice_items: p["invoiceItems"], + issuer: p["issuer"], limit: p["limit"], + on_behalf_of: p["onBehalfOf"], schedule: p["schedule"], starting_after: p["startingAfter"], subscription: p["subscription"], @@ -10467,6 +11781,10 @@ export class ApiClient { auto_advance?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" custom_fields?: @@ -10484,17 +11802,23 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" due_date?: number effective_at?: number | "" expand?: string[] footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined } | "" + number?: string | "" on_behalf_of?: string | "" payment_settings?: { default_mandate?: string | "" @@ -10524,7 +11848,7 @@ export class ApiClient { } | "" } - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -10539,6 +11863,7 @@ export class ApiClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -10548,7 +11873,7 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -10566,12 +11891,14 @@ export class ApiClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -10588,11 +11915,6 @@ export class ApiClient { page_size?: "a4" | "auto" | "letter" } } - rendering_options?: - | { - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" - } - | "" shipping_cost?: | { shipping_rate?: string @@ -10742,6 +12064,101 @@ export class ApiClient { ) } + postInvoicesInvoiceLinesLineItemId(p: { + invoice: string + lineItemId: string + requestBody?: { + amount?: number + description?: string + discountable?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" + expand?: string[] + metadata?: + | { + [key: string]: string | undefined + } + | "" + period?: { + end: number + start: number + } + price?: string + price_data?: { + currency: string + product?: string + product_data?: { + description?: string + images?: string[] + metadata?: { + [key: string]: string | undefined + } + name: string + tax_code?: string + } + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + unit_amount?: number + unit_amount_decimal?: string + } + quantity?: number + tax_amounts?: + | { + amount: number + tax_rate_data: { + country?: string + description?: string + display_name: string + inclusive: boolean + jurisdiction?: string + percentage: number + state?: string + tax_type?: + | "amusement_tax" + | "communications_tax" + | "gst" + | "hst" + | "igst" + | "jct" + | "lease_tax" + | "pst" + | "qst" + | "rst" + | "sales_tax" + | "vat" + } + taxable_amount: number + }[] + | "" + tax_rates?: string[] | "" + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + + `/v1/invoices/${p["invoice"]}/lines/${p["lineItemId"]}`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + postInvoicesInvoiceMarkUncollectible(p: { invoice: string requestBody?: { @@ -11442,6 +12859,7 @@ export class ApiClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -11739,6 +13157,7 @@ export class ApiClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -12444,6 +13863,7 @@ export class ApiClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -12741,6 +14161,7 @@ export class ApiClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -13091,6 +14512,7 @@ export class ApiClient { expand?: string[] last4?: string limit?: number + personalizationDesign?: string startingAfter?: string status?: "active" | "canceled" | "inactive" type?: "physical" | "virtual" @@ -13118,6 +14540,7 @@ export class ApiClient { expand: p["expand"], last4: p["last4"], limit: p["limit"], + personalization_design: p["personalizationDesign"], starting_after: p["startingAfter"], status: p["status"], type: p["type"], @@ -13146,8 +14569,13 @@ export class ApiClient { metadata?: { [key: string]: string | undefined } + personalization_design?: string + pin?: { + encrypted_number?: string + } replacement_for?: string replacement_reason?: "damaged" | "expired" | "lost" | "stolen" + second_line?: string | "" shipping?: { address: { city: string @@ -13464,6 +14892,7 @@ export class ApiClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -13761,6 +15190,7 @@ export class ApiClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -14132,6 +15562,7 @@ export class ApiClient { [key: string]: string | undefined } | "" + personalization_design?: string pin?: { encrypted_number?: string } @@ -14433,6 +15864,7 @@ export class ApiClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -14730,6 +16162,7 @@ export class ApiClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -15398,6 +16831,251 @@ export class ApiClient { ) } + getIssuingPersonalizationDesigns( + p: { + endingBefore?: string + expand?: string[] + limit?: number + lookupKeys?: string[] + preferences?: { + is_default?: boolean + is_platform_default?: boolean + } + startingAfter?: string + status?: "active" | "inactive" | "rejected" | "review" + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse<{ + data: t_issuing_personalization_design[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + lookup_keys: p["lookupKeys"], + preferences: p["preferences"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/issuing/personalization_designs`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postIssuingPersonalizationDesigns(p: { + requestBody: { + card_logo?: string + carrier_text?: { + footer_body?: string | "" + footer_title?: string | "" + header_body?: string | "" + header_title?: string | "" + } + expand?: string[] + lookup_key?: string + metadata?: { + [key: string]: string | undefined + } + name?: string + physical_bundle: string + preferences?: { + is_default: boolean + } + transfer_lookup_key?: boolean + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/issuing/personalization_designs`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getIssuingPersonalizationDesignsPersonalizationDesign(p: { + expand?: string[] + personalizationDesign: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + + `/v1/issuing/personalization_designs/${p["personalizationDesign"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postIssuingPersonalizationDesignsPersonalizationDesign(p: { + personalizationDesign: string + requestBody?: { + card_logo?: string | "" + carrier_text?: + | { + footer_body?: string | "" + footer_title?: string | "" + header_body?: string | "" + header_title?: string | "" + } + | "" + expand?: string[] + lookup_key?: string | "" + metadata?: { + [key: string]: string | undefined + } + name?: string | "" + physical_bundle?: string + preferences?: { + is_default: boolean + } + transfer_lookup_key?: boolean + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + + `/v1/issuing/personalization_designs/${p["personalizationDesign"]}`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getIssuingPhysicalBundles( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "inactive" | "review" + type?: "custom" | "standard" + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse<{ + data: t_issuing_physical_bundle[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + type: p["type"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/issuing/physical_bundles`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getIssuingPhysicalBundlesPhysicalBundle(p: { + expand?: string[] + physicalBundle: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + + `/v1/issuing/physical_bundles/${p["physicalBundle"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + getIssuingSettlements( p: { created?: @@ -15507,6 +17185,115 @@ export class ApiClient { ) } + getIssuingTokens(p: { + card: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "deleted" | "requested" | "suspended" + requestBody?: EmptyObject + }): Observable< + | (HttpResponse<{ + data: t_issuing_token[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + card: p["card"], + created: p["created"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/issuing/tokens`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getIssuingTokensToken(p: { + expand?: string[] + token: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/issuing/tokens/${p["token"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postIssuingTokensToken(p: { + token: string + requestBody: { + expand?: string[] + status: "active" | "deleted" | "suspended" + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/issuing/tokens/${p["token"]}`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + getIssuingTransactions( p: { card?: string @@ -15641,7 +17428,7 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: ("balances" | "ownership")[] + prefetch?: ("balances" | "ownership" | "transactions")[] return_url?: string } }): Observable< @@ -15845,7 +17632,7 @@ export class ApiClient { account: string requestBody: { expand?: string[] - features: ("balance" | "ownership")[] + features: ("balance" | "ownership" | "transactions")[] } }): Observable< | (HttpResponse & { status: 200 }) @@ -15961,6 +17748,7 @@ export class ApiClient { capture_method?: "automatic" | "automatic_async" | "manual" confirm?: boolean confirmation_method?: "automatic" | "manual" + confirmation_token?: string currency: string customer?: string description?: string @@ -16094,6 +17882,7 @@ export class ApiClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -16115,6 +17904,7 @@ export class ApiClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -16142,6 +17932,7 @@ export class ApiClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -16151,12 +17942,14 @@ export class ApiClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -16177,14 +17970,17 @@ export class ApiClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -16249,6 +18045,7 @@ export class ApiClient { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -16294,10 +18091,31 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -16430,6 +18248,12 @@ export class ApiClient { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -16489,6 +18313,11 @@ export class ApiClient { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -16509,6 +18338,12 @@ export class ApiClient { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -16518,9 +18353,12 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -16792,6 +18630,7 @@ export class ApiClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -16813,6 +18652,7 @@ export class ApiClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -16840,6 +18680,7 @@ export class ApiClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -16849,12 +18690,14 @@ export class ApiClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -16875,14 +18718,17 @@ export class ApiClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -16947,6 +18793,7 @@ export class ApiClient { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -16992,10 +18839,31 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -17128,6 +18996,12 @@ export class ApiClient { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -17187,6 +19061,11 @@ export class ApiClient { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -17207,6 +19086,12 @@ export class ApiClient { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -17216,9 +19101,12 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -17356,6 +19244,7 @@ export class ApiClient { amount_to_capture?: number application_fee_amount?: number expand?: string[] + final_capture?: boolean metadata?: | { [key: string]: string | undefined @@ -17394,6 +19283,7 @@ export class ApiClient { requestBody?: { capture_method?: "automatic" | "automatic_async" | "manual" client_secret?: string + confirmation_token?: string error_on_requires_action?: boolean expand?: string[] mandate?: string @@ -17528,6 +19418,7 @@ export class ApiClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -17549,6 +19440,7 @@ export class ApiClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -17576,6 +19468,7 @@ export class ApiClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -17585,12 +19478,14 @@ export class ApiClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -17611,14 +19506,17 @@ export class ApiClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -17683,6 +19581,7 @@ export class ApiClient { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -17728,10 +19627,31 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -17864,6 +19784,12 @@ export class ApiClient { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -17923,6 +19849,11 @@ export class ApiClient { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -17943,6 +19874,12 @@ export class ApiClient { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -17952,9 +19889,12 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -18152,9 +20092,16 @@ export class ApiClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" consent_collection?: { + payment_method_reuse_agreement?: { + position: "auto" | "hidden" + } promotions?: "auto" | "none" terms_of_service?: "none" | "required" } @@ -18183,6 +20130,11 @@ export class ApiClient { type: "dropdown" | "numeric" | "text" }[] custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -18201,6 +20153,7 @@ export class ApiClient { } customer_creation?: "always" | "if_required" expand?: string[] + inactive_message?: string invoice_creation?: { enabled: boolean invoice_data?: { @@ -18213,6 +20166,10 @@ export class ApiClient { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined @@ -18243,7 +20200,14 @@ export class ApiClient { on_behalf_of?: string payment_intent_data?: { capture_method?: "automatic" | "automatic_async" | "manual" + description?: string + metadata?: { + [key: string]: string | undefined + } setup_future_usage?: "off_session" | "on_session" + statement_descriptor?: string + statement_descriptor_suffix?: string + transfer_group?: string } payment_method_collection?: "always" | "if_required" payment_method_types?: ( @@ -18273,12 +20237,18 @@ export class ApiClient { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] phone_number_collection?: { enabled: boolean } + restrictions?: { + completed_sessions: { + limit: number + } + } shipping_address_collection?: { allowed_countries: ( | "AC" @@ -18526,7 +20496,21 @@ export class ApiClient { submit_type?: "auto" | "book" | "donate" | "pay" subscription_data?: { description?: string + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number + trial_settings?: { + end_behavior: { + missing_payment_method: "cancel" | "create_invoice" | "pause" + } + } } tax_id_collection?: { enabled: boolean @@ -18602,6 +20586,10 @@ export class ApiClient { allow_promotion_codes?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" custom_fields?: @@ -18630,6 +20618,11 @@ export class ApiClient { }[] | "" custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -18648,6 +20641,7 @@ export class ApiClient { } customer_creation?: "always" | "if_required" expand?: string[] + inactive_message?: string | "" invoice_creation?: { enabled: boolean invoice_data?: { @@ -18660,6 +20654,10 @@ export class ApiClient { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined @@ -18687,6 +20685,17 @@ export class ApiClient { metadata?: { [key: string]: string | undefined } + payment_intent_data?: { + description?: string | "" + metadata?: + | { + [key: string]: string | undefined + } + | "" + statement_descriptor?: string | "" + statement_descriptor_suffix?: string | "" + transfer_group?: string | "" + } payment_method_collection?: "always" | "if_required" payment_method_types?: | ( @@ -18716,10 +20725,18 @@ export class ApiClient { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] | "" + restrictions?: + | { + completed_sessions: { + limit: number + } + } + | "" shipping_address_collection?: | { allowed_countries: ( @@ -18963,6 +20980,26 @@ export class ApiClient { )[] } | "" + subscription_data?: { + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } + metadata?: + | { + [key: string]: string | undefined + } + | "" + trial_settings?: + | { + end_behavior: { + missing_payment_method: "cancel" | "create_invoice" | "pause" + } + } + | "" + } } }): Observable< | (HttpResponse & { status: 200 }) @@ -19138,6 +21175,11 @@ export class ApiClient { preference?: "none" | "off" | "on" } } + customer_balance?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } eps?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19216,6 +21258,11 @@ export class ApiClient { preference?: "none" | "off" | "on" } } + revolut_pay?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } sepa_debit?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19236,6 +21283,11 @@ export class ApiClient { preference?: "none" | "off" | "on" } } + zip?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } } } = {}, ): Observable< @@ -19363,6 +21415,11 @@ export class ApiClient { preference?: "none" | "off" | "on" } } + customer_balance?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } eps?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19440,6 +21497,11 @@ export class ApiClient { preference?: "none" | "off" | "on" } } + revolut_pay?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } sepa_debit?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19460,6 +21522,11 @@ export class ApiClient { preference?: "none" | "off" | "on" } } + zip?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } } }): Observable< | (HttpResponse & { status: 200 }) @@ -19672,14 +21739,17 @@ export class ApiClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -19765,6 +21835,9 @@ export class ApiClient { cvc?: string exp_month: number exp_year: number + networks?: { + preferred?: "cartes_bancaires" | "mastercard" | "visa" + } number: string } | { @@ -19842,6 +21915,7 @@ export class ApiClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -19863,6 +21937,7 @@ export class ApiClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -19890,6 +21965,7 @@ export class ApiClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } payment_method?: string @@ -19900,12 +21976,14 @@ export class ApiClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type?: | "acss_debit" | "affirm" @@ -19927,14 +22005,17 @@ export class ApiClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -20020,6 +22101,9 @@ export class ApiClient { card?: { exp_month?: number exp_year?: number + networks?: { + preferred?: "" | "cartes_bancaires" | "mastercard" | "visa" + } } expand?: string[] link?: EmptyObject @@ -20030,6 +22114,7 @@ export class ApiClient { | "" us_bank_account?: { account_holder_type?: "company" | "individual" + account_type?: "checking" | "savings" } } }): Observable< @@ -20398,6 +22483,7 @@ export class ApiClient { [key: string]: string | undefined } | "" + meter?: string nickname?: string product?: | { @@ -20557,6 +22643,7 @@ export class ApiClient { product?: string recurring?: { interval?: "day" | "month" | "week" | "year" + meter?: string usage_type?: "licensed" | "metered" } startingAfter?: string @@ -20659,6 +22746,7 @@ export class ApiClient { aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" interval: "day" | "month" | "week" | "year" interval_count?: number + meter?: string usage_type?: "licensed" | "metered" } tax_behavior?: "exclusive" | "inclusive" | "unspecified" @@ -21351,6 +23439,10 @@ export class ApiClient { application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" customer?: string @@ -21360,6 +23452,7 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -21372,8 +23465,19 @@ export class ApiClient { header?: string | "" invoice_settings?: { days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } line_items?: { + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" price?: string price_data?: { currency: string @@ -21396,6 +23500,9 @@ export class ApiClient { subscription_data?: { description?: string effective_date?: "current_period_end" | number | "" + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number | "" } test_clock?: string @@ -21465,6 +23572,10 @@ export class ApiClient { application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" customer?: string @@ -21474,6 +23585,7 @@ export class ApiClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -21482,8 +23594,19 @@ export class ApiClient { header?: string | "" invoice_settings?: { days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } line_items?: { + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string price?: string price_data?: { @@ -21507,6 +23630,9 @@ export class ApiClient { subscription_data?: { description?: string | "" effective_date?: "current_period_end" | number | "" + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number | "" } transfer_data?: @@ -21735,6 +23861,14 @@ export class ApiClient { getRadarEarlyFraudWarnings( p: { charge?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number endingBefore?: string expand?: string[] limit?: number @@ -21757,6 +23891,7 @@ export class ApiClient { }) const params = this._queryParams({ charge: p["charge"], + created: p["created"], ending_before: p["endingBefore"], expand: p["expand"], limit: p["limit"], @@ -22375,6 +24510,8 @@ export class ApiClient { | "anticipation_repayment" | "charge" | "charge_failure" + | "climate_order_purchase" + | "climate_order_refund" | "connect_collection_transfer" | "connect_reserved_funds" | "contribution" @@ -22390,7 +24527,6 @@ export class ApiClient { | "issuing_dispute" | "issuing_transaction" | "network_cost" - | "obligation" | "other_adjustment" | "partial_capture_reversal" | "payout" @@ -22405,6 +24541,7 @@ export class ApiClient { | "topup_reversal" | "transfer" | "transfer_reversal" + | "unreconciled_customer_funds" timezone?: | "Africa/Abidjan" | "Africa/Accra" @@ -23342,6 +25479,7 @@ export class ApiClient { enabled: boolean } confirm?: boolean + confirmation_token?: string customer?: string description?: string expand?: string[] @@ -23472,6 +25610,7 @@ export class ApiClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23493,6 +25632,7 @@ export class ApiClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -23520,6 +25660,7 @@ export class ApiClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -23529,12 +25670,14 @@ export class ApiClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -23555,14 +25698,17 @@ export class ApiClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -23613,8 +25759,24 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -23630,9 +25792,12 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -23825,6 +25990,7 @@ export class ApiClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23846,6 +26012,7 @@ export class ApiClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -23873,6 +26040,7 @@ export class ApiClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -23882,12 +26050,14 @@ export class ApiClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -23908,14 +26078,17 @@ export class ApiClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -23966,8 +26139,24 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -23983,9 +26172,12 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -24048,6 +26240,7 @@ export class ApiClient { intent: string requestBody?: { client_secret?: string + confirmation_token?: string expand?: string[] mandate_data?: | { @@ -24179,6 +26372,7 @@ export class ApiClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -24200,6 +26394,7 @@ export class ApiClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -24227,6 +26422,7 @@ export class ApiClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -24236,12 +26432,14 @@ export class ApiClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -24262,14 +26460,17 @@ export class ApiClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -24320,8 +26521,24 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -24337,9 +26554,12 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -25070,6 +27290,13 @@ export class ApiClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] metadata?: { [key: string]: string | undefined @@ -25184,6 +27411,13 @@ export class ApiClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] metadata?: | { @@ -25398,6 +27632,10 @@ export class ApiClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25410,7 +27648,12 @@ export class ApiClient { default_payment_method?: string description?: string | "" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } on_behalf_of?: string | "" transfer_data?: @@ -25430,6 +27673,11 @@ export class ApiClient { | "" phases?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25444,6 +27692,10 @@ export class ApiClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25458,9 +27710,21 @@ export class ApiClient { default_payment_method?: string default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" end_date?: number invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } items: { billing_thresholds?: @@ -25468,6 +27732,13 @@ export class ApiClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -25559,6 +27830,10 @@ export class ApiClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25571,7 +27846,12 @@ export class ApiClient { default_payment_method?: string description?: string | "" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } on_behalf_of?: string | "" transfer_data?: @@ -25590,6 +27870,11 @@ export class ApiClient { | "" phases?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25604,6 +27889,10 @@ export class ApiClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25617,9 +27906,21 @@ export class ApiClient { default_payment_method?: string default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" end_date?: number | "now" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } items: { billing_thresholds?: @@ -25627,6 +27928,13 @@ export class ApiClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -25838,6 +28146,11 @@ export class ApiClient { postSubscriptions(p: { requestBody: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25849,12 +28162,23 @@ export class ApiClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } backdate_start_date?: number billing_cycle_anchor?: number + billing_cycle_anchor_config?: { + day_of_month: number + hour?: number + minute?: number + month?: number + second?: number + } billing_thresholds?: | { amount_gte?: number @@ -25872,13 +28196,34 @@ export class ApiClient { default_source?: string default_tax_rates?: string[] | "" description?: string + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -25943,7 +28288,7 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -25958,6 +28303,7 @@ export class ApiClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -25967,7 +28313,7 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -25985,12 +28331,14 @@ export class ApiClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -26161,6 +28509,11 @@ export class ApiClient { subscriptionExposedId: string requestBody?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -26172,9 +28525,13 @@ export class ApiClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "now" | "unchanged" billing_thresholds?: @@ -26205,7 +28562,21 @@ export class ApiClient { default_source?: string | "" default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { @@ -26214,6 +28585,13 @@ export class ApiClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -26287,7 +28665,7 @@ export class ApiClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -26302,6 +28680,7 @@ export class ApiClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -26311,7 +28690,7 @@ export class ApiClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -26329,12 +28708,14 @@ export class ApiClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -26509,6 +28890,7 @@ export class ApiClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -26604,7 +28986,600 @@ export class ApiClient { return this.httpClient.request( "GET", this.config.basePath + - `/v1/tax/calculations/${p["calculation"]}/line_items`, + `/v1/tax/calculations/${p["calculation"]}/line_items`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getTaxRegistrations( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "all" | "expired" | "scheduled" + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse<{ + data: t_tax_registration[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/tax/registrations`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postTaxRegistrations(p: { + requestBody: { + active_from: "now" | number + country: string + country_options: { + ae?: { + type: "standard" + } + at?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + au?: { + type: "standard" + } + be?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + bg?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ca?: { + province_standard?: { + province: string + } + type: "province_standard" | "simplified" | "standard" + } + ch?: { + type: "standard" + } + cl?: { + type: "simplified" + } + co?: { + type: "simplified" + } + cy?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + cz?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + de?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + dk?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ee?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + es?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + fi?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + fr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + gb?: { + type: "standard" + } + gr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + hr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + hu?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + id?: { + type: "simplified" + } + ie?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + is?: { + type: "standard" + } + it?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + jp?: { + type: "standard" + } + kr?: { + type: "simplified" + } + lt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + lu?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + lv?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + mt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + mx?: { + type: "simplified" + } + my?: { + type: "simplified" + } + nl?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + no?: { + type: "standard" + } + nz?: { + type: "standard" + } + pl?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + pt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ro?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sa?: { + type: "simplified" + } + se?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sg?: { + type: "standard" + } + si?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sk?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + th?: { + type: "simplified" + } + tr?: { + type: "simplified" + } + us?: { + local_amusement_tax?: { + jurisdiction: string + } + local_lease_tax?: { + jurisdiction: string + } + state: string + type: + | "local_amusement_tax" + | "local_lease_tax" + | "state_communications_tax" + | "state_sales_tax" + } + vn?: { + type: "simplified" + } + za?: { + type: "standard" + } + } + expand?: string[] + expires_at?: number + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/tax/registrations`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getTaxRegistrationsId(p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/tax/registrations/${p["id"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postTaxRegistrationsId(p: { + id: string + requestBody?: { + active_from?: "now" | number + expand?: string[] + expires_at?: "now" | number | "" + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/tax/registrations/${p["id"]}`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getTaxSettings( + p: { + expand?: string[] + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/tax/settings`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postTaxSettings( + p: { + requestBody?: { + defaults?: { + tax_behavior?: "exclusive" | "inclusive" | "inferred_by_currency" + tax_code?: string + } + expand?: string[] + head_office?: { + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + } + } + } = {}, + ): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/tax/settings`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postTaxTransactionsCreateFromCalculation(p: { + requestBody: { + calculation: string + expand?: string[] + metadata?: { + [key: string]: string | undefined + } + reference: string + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/tax/transactions/create_from_calculation`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postTaxTransactionsCreateReversal(p: { + requestBody: { + expand?: string[] + flat_amount?: number + line_items?: { + amount: number + amount_tax: number + metadata?: { + [key: string]: string | undefined + } + original_line_item: string + quantity?: number + reference: string + }[] + metadata?: { + [key: string]: string | undefined + } + mode: "full" | "partial" + original_transaction: string + reference: string + shipping_cost?: { + amount: number + amount_tax: number + } + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/tax/transactions/create_reversal`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getTaxTransactionsTransaction(p: { + expand?: string[] + transaction: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ expand: p["expand"] }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + `/v1/tax/transactions/${p["transaction"]}`, + { + params, + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + getTaxTransactionsTransactionLineItems(p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + transaction: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse<{ + data: t_tax_transaction_line_item[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = p["requestBody"] + + return this.httpClient.request( + "GET", + this.config.basePath + + `/v1/tax/transactions/${p["transaction"]}/line_items`, { params, headers, @@ -26615,25 +29590,38 @@ export class ApiClient { ) } - getTaxSettings( + getTaxCodes( p: { + endingBefore?: string expand?: string[] + limit?: number + startingAfter?: string requestBody?: EmptyObject } = {}, ): Observable< - | (HttpResponse & { status: 200 }) + | (HttpResponse<{ + data: t_tax_code[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) | (HttpResponse & { status: StatusCode }) | HttpResponse > { const headers = this._headers({ "Content-Type": "application/x-www-form-urlencoded", }) - const params = this._queryParams({ expand: p["expand"] }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) const body = p["requestBody"] return this.httpClient.request( "GET", - this.config.basePath + `/v1/tax/settings`, + this.config.basePath + `/v1/tax_codes`, { params, headers, @@ -26644,40 +29632,26 @@ export class ApiClient { ) } - postTaxSettings( - p: { - requestBody?: { - defaults?: { - tax_behavior?: "exclusive" | "inclusive" | "inferred_by_currency" - tax_code?: string - } - expand?: string[] - head_office?: { - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - } - } - } = {}, - ): Observable< - | (HttpResponse & { status: 200 }) + getTaxCodesId(p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }): Observable< + | (HttpResponse & { status: 200 }) | (HttpResponse & { status: StatusCode }) | HttpResponse > { const headers = this._headers({ "Content-Type": "application/x-www-form-urlencoded", }) + const params = this._queryParams({ expand: p["expand"] }) const body = p["requestBody"] return this.httpClient.request( - "POST", - this.config.basePath + `/v1/tax/settings`, + "GET", + this.config.basePath + `/v1/tax_codes/${p["id"]}`, { + params, headers, body, observe: "response", @@ -26686,29 +29660,46 @@ export class ApiClient { ) } - postTaxTransactionsCreateFromCalculation(p: { - requestBody: { - calculation: string + getTaxIds( + p: { + endingBefore?: string expand?: string[] - metadata?: { - [key: string]: string | undefined + limit?: number + owner?: { + account?: string + customer?: string + type: "account" | "application" | "customer" | "self" } - reference: string - } - }): Observable< - | (HttpResponse & { status: 200 }) + startingAfter?: string + requestBody?: EmptyObject + } = {}, + ): Observable< + | (HttpResponse<{ + data: t_tax_id[] + has_more: boolean + object: "list" + url: string + }> & { status: 200 }) | (HttpResponse & { status: StatusCode }) | HttpResponse > { const headers = this._headers({ "Content-Type": "application/x-www-form-urlencoded", }) + const params = this._queryParams({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + owner: p["owner"], + starting_after: p["startingAfter"], + }) const body = p["requestBody"] return this.httpClient.request( - "POST", - this.config.basePath + `/v1/tax/transactions/create_from_calculation`, + "GET", + this.config.basePath + `/v1/tax_ids`, { + params, headers, body, observe: "response", @@ -26717,33 +29708,86 @@ export class ApiClient { ) } - postTaxTransactionsCreateReversal(p: { + postTaxIds(p: { requestBody: { expand?: string[] - flat_amount?: number - line_items?: { - amount: number - amount_tax: number - metadata?: { - [key: string]: string | undefined - } - original_line_item: string - quantity?: number - reference: string - }[] - metadata?: { - [key: string]: string | undefined - } - mode: "full" | "partial" - original_transaction: string - reference: string - shipping_cost?: { - amount: number - amount_tax: number + owner?: { + account?: string + customer?: string + type: "account" | "application" | "customer" | "self" } + type: + | "ad_nrt" + | "ae_trn" + | "ar_cuit" + | "au_abn" + | "au_arn" + | "bg_uic" + | "bo_tin" + | "br_cnpj" + | "br_cpf" + | "ca_bn" + | "ca_gst_hst" + | "ca_pst_bc" + | "ca_pst_mb" + | "ca_pst_sk" + | "ca_qst" + | "ch_vat" + | "cl_tin" + | "cn_tin" + | "co_nit" + | "cr_tin" + | "do_rcn" + | "ec_ruc" + | "eg_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" + | "jp_trn" + | "ke_pin" + | "kr_brn" + | "li_uid" + | "mx_rfc" + | "my_frp" + | "my_itn" + | "my_sst" + | "no_vat" + | "no_voec" + | "nz_gst" + | "pe_ruc" + | "ph_tin" + | "ro_tin" + | "rs_pib" + | "ru_inn" + | "ru_kpp" + | "sa_vat" + | "sg_gst" + | "sg_uen" + | "si_tin" + | "sv_nit" + | "th_vat" + | "tr_tin" + | "tw_vat" + | "ua_vat" + | "us_ein" + | "uy_ruc" + | "ve_rif" + | "vn_tin" + | "za_vat" + value: string } }): Observable< - | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 200 }) | (HttpResponse & { status: StatusCode }) | HttpResponse > { @@ -26754,7 +29798,7 @@ export class ApiClient { return this.httpClient.request( "POST", - this.config.basePath + `/v1/tax/transactions/create_reversal`, + this.config.basePath + `/v1/tax_ids`, { headers, body, @@ -26764,110 +29808,23 @@ export class ApiClient { ) } - getTaxTransactionsTransaction(p: { - expand?: string[] - transaction: string - requestBody?: EmptyObject - }): Observable< - | (HttpResponse & { status: 200 }) - | (HttpResponse & { status: StatusCode }) - | HttpResponse - > { - const headers = this._headers({ - "Content-Type": "application/x-www-form-urlencoded", - }) - const params = this._queryParams({ expand: p["expand"] }) - const body = p["requestBody"] - - return this.httpClient.request( - "GET", - this.config.basePath + `/v1/tax/transactions/${p["transaction"]}`, - { - params, - headers, - body, - observe: "response", - reportProgress: false, - }, - ) - } - - getTaxTransactionsTransactionLineItems(p: { - endingBefore?: string - expand?: string[] - limit?: number - startingAfter?: string - transaction: string + deleteTaxIdsId(p: { + id: string requestBody?: EmptyObject }): Observable< - | (HttpResponse<{ - data: t_tax_transaction_line_item[] - has_more: boolean - object: "list" - url: string - }> & { status: 200 }) - | (HttpResponse & { status: StatusCode }) - | HttpResponse - > { - const headers = this._headers({ - "Content-Type": "application/x-www-form-urlencoded", - }) - const params = this._queryParams({ - ending_before: p["endingBefore"], - expand: p["expand"], - limit: p["limit"], - starting_after: p["startingAfter"], - }) - const body = p["requestBody"] - - return this.httpClient.request( - "GET", - this.config.basePath + - `/v1/tax/transactions/${p["transaction"]}/line_items`, - { - params, - headers, - body, - observe: "response", - reportProgress: false, - }, - ) - } - - getTaxCodes( - p: { - endingBefore?: string - expand?: string[] - limit?: number - startingAfter?: string - requestBody?: EmptyObject - } = {}, - ): Observable< - | (HttpResponse<{ - data: t_tax_code[] - has_more: boolean - object: "list" - url: string - }> & { status: 200 }) + | (HttpResponse & { status: 200 }) | (HttpResponse & { status: StatusCode }) | HttpResponse > { const headers = this._headers({ "Content-Type": "application/x-www-form-urlencoded", }) - const params = this._queryParams({ - ending_before: p["endingBefore"], - expand: p["expand"], - limit: p["limit"], - starting_after: p["startingAfter"], - }) const body = p["requestBody"] return this.httpClient.request( - "GET", - this.config.basePath + `/v1/tax_codes`, + "DELETE", + this.config.basePath + `/v1/tax_ids/${p["id"]}`, { - params, headers, body, observe: "response", @@ -26876,12 +29833,12 @@ export class ApiClient { ) } - getTaxCodesId(p: { + getTaxIdsId(p: { expand?: string[] id: string requestBody?: EmptyObject }): Observable< - | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: 200 }) | (HttpResponse & { status: StatusCode }) | HttpResponse > { @@ -26893,7 +29850,7 @@ export class ApiClient { return this.httpClient.request( "GET", - this.config.basePath + `/v1/tax_codes/${p["id"]}`, + this.config.basePath + `/v1/tax_ids/${p["id"]}`, { params, headers, @@ -26985,7 +29942,6 @@ export class ApiClient { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" } }): Observable< @@ -27065,7 +30021,6 @@ export class ApiClient { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" } }): Observable< @@ -27141,6 +30096,12 @@ export class ApiClient { splashscreen?: string | "" } expand?: string[] + name?: string + offline?: + | { + enabled: boolean + } + | "" tipping?: | { aud?: { @@ -27308,6 +30269,12 @@ export class ApiClient { } | "" expand?: string[] + name?: string + offline?: + | { + enabled: boolean + } + | "" tipping?: | { aud?: { @@ -27630,6 +30597,7 @@ export class ApiClient { | "bbpos_chipper2x" | "bbpos_wisepad3" | "bbpos_wisepos_e" + | "mobile_phone_reader" | "simulated_wisepos_e" | "stripe_m2" | "verifone_P400" @@ -27838,6 +30806,7 @@ export class ApiClient { expand?: string[] payment_intent: string process_config?: { + enable_customer_cancellation?: boolean skip_tipping?: boolean tipping?: { amount_eligible?: number @@ -27872,7 +30841,9 @@ export class ApiClient { requestBody: { customer_consent_collected: boolean expand?: string[] - process_config?: EmptyObject + process_config?: { + enable_customer_cancellation?: boolean + } setup_intent: string } }): Observable< @@ -27909,6 +30880,9 @@ export class ApiClient { } payment_intent?: string refund_application_fee?: boolean + refund_payment_config?: { + enable_customer_cancellation?: boolean + } reverse_transfer?: boolean } }): Observable< @@ -27973,6 +30947,268 @@ export class ApiClient { ) } + postTestHelpersConfirmationTokens( + p: { + requestBody?: { + expand?: string[] + payment_method?: string + payment_method_data?: { + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + affirm?: EmptyObject + afterpay_clearpay?: EmptyObject + alipay?: EmptyObject + au_becs_debit?: { + account_number: string + bsb_number: string + } + bacs_debit?: { + account_number?: string + sort_code?: string + } + bancontact?: EmptyObject + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | "" + email?: string | "" + name?: string | "" + phone?: string | "" + } + blik?: EmptyObject + boleto?: { + tax_id: string + } + cashapp?: EmptyObject + customer_balance?: EmptyObject + eps?: { + 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" + } + fpx?: { + bank: + | "affin_bank" + | "agrobank" + | "alliance_bank" + | "ambank" + | "bank_islam" + | "bank_muamalat" + | "bank_of_china" + | "bank_rakyat" + | "bsn" + | "cimb" + | "deutsche_bank" + | "hong_leong_bank" + | "hsbc" + | "kfh" + | "maybank2e" + | "maybank2u" + | "ocbc" + | "pb_enterprise" + | "public_bank" + | "rhb" + | "standard_chartered" + | "uob" + } + giropay?: EmptyObject + grabpay?: EmptyObject + ideal?: { + bank?: + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "n26" + | "nn" + | "rabobank" + | "regiobank" + | "revolut" + | "sns_bank" + | "triodos_bank" + | "van_lanschot" + | "yoursafe" + } + interac_present?: EmptyObject + klarna?: { + dob?: { + day: number + month: number + year: number + } + } + konbini?: EmptyObject + link?: EmptyObject + metadata?: { + [key: string]: string | undefined + } + mobilepay?: EmptyObject + oxxo?: EmptyObject + p24?: { + 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" + | "velobank" + | "volkswagen_bank" + } + paynow?: EmptyObject + paypal?: EmptyObject + pix?: EmptyObject + promptpay?: EmptyObject + radar_options?: { + session?: string + } + revolut_pay?: EmptyObject + sepa_debit?: { + iban: string + } + sofort?: { + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" + } + swish?: EmptyObject + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "cashapp" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "link" + | "mobilepay" + | "oxxo" + | "p24" + | "paynow" + | "paypal" + | "pix" + | "promptpay" + | "revolut_pay" + | "sepa_debit" + | "sofort" + | "swish" + | "us_bank_account" + | "wechat_pay" + | "zip" + us_bank_account?: { + account_holder_type?: "company" | "individual" + account_number?: string + account_type?: "checking" | "savings" + financial_connections_account?: string + routing_number?: string + } + wechat_pay?: EmptyObject + zip?: EmptyObject + } + return_url?: string + setup_future_usage?: "off_session" | "on_session" + shipping?: { + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string | "" + } + } + } = {}, + ): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + `/v1/test_helpers/confirmation_tokens`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + postTestHelpersCustomersCustomerFundCashBalance(p: { customer: string requestBody: { @@ -28324,6 +31560,7 @@ export class ApiClient { postal_code?: string state?: string terminal_id?: string + url?: string } network_data?: { acquiring_institution_id?: string @@ -28331,8 +31568,22 @@ export class ApiClient { verification_data?: { address_line1_check?: "match" | "mismatch" | "not_provided" address_postal_code_check?: "match" | "mismatch" | "not_provided" + authentication_exemption?: { + claimed_by: "acquirer" | "issuer" + type: + | "low_value_transaction" + | "transaction_risk_analysis" + | "unknown" + } cvc_check?: "match" | "mismatch" | "not_provided" expiry_check?: "match" | "mismatch" | "not_provided" + three_d_secure?: { + result: + | "attempt_acknowledged" + | "authenticated" + | "failed" + | "required" + } } wallet?: "apple_pay" | "google_pay" | "samsung_pay" } @@ -28625,6 +31876,111 @@ export class ApiClient { ) } + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate(p: { + personalizationDesign: string + requestBody?: { + expand?: string[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + + `/v1/test_helpers/issuing/personalization_designs/${p["personalizationDesign"]}/activate`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate(p: { + personalizationDesign: string + requestBody?: { + expand?: string[] + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + + `/v1/test_helpers/issuing/personalization_designs/${p["personalizationDesign"]}/deactivate`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject(p: { + personalizationDesign: string + requestBody: { + expand?: string[] + rejection_reasons: { + card_logo?: ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_binary_image" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + carrier_text?: ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + } + } + }): Observable< + | (HttpResponse & { status: 200 }) + | (HttpResponse & { status: StatusCode }) + | HttpResponse + > { + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = p["requestBody"] + + return this.httpClient.request( + "POST", + this.config.basePath + + `/v1/test_helpers/issuing/personalization_designs/${p["personalizationDesign"]}/reject`, + { + headers, + body, + observe: "response", + reportProgress: false, + }, + ) + } + postTestHelpersIssuingTransactionsCreateForceCapture(p: { requestBody: { amount: number @@ -28934,6 +32290,7 @@ export class ApiClient { postal_code?: string state?: string terminal_id?: string + url?: string } purchase_details?: { flight?: { @@ -29306,6 +32663,7 @@ export class ApiClient { postal_code?: string state?: string terminal_id?: string + url?: string } purchase_details?: { flight?: { @@ -30054,6 +33412,7 @@ export class ApiClient { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -30132,6 +33491,13 @@ export class ApiClient { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -30153,6 +33519,7 @@ export class ApiClient { account_type?: "checking" | "futsu" | "savings" | "toza" country: string currency?: string + payment_method?: string routing_number?: string } card?: @@ -30168,6 +33535,9 @@ export class ApiClient { exp_month: string exp_year: string name?: string + networks?: { + preferred?: "cartes_bancaires" | "mastercard" | "visa" + } number: string } | string @@ -30177,6 +33547,13 @@ export class ApiClient { } expand?: string[] person?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -30252,6 +33629,7 @@ export class ApiClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -31466,6 +34844,14 @@ export class ApiClient { } getTreasuryOutboundPayments(p: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string endingBefore?: string expand?: string[] @@ -31488,6 +34874,7 @@ export class ApiClient { "Content-Type": "application/x-www-form-urlencoded", }) const params = this._queryParams({ + created: p["created"], customer: p["customer"], ending_before: p["endingBefore"], expand: p["expand"], @@ -32267,6 +35654,8 @@ export class ApiClient { | "2022-08-01" | "2022-11-15" | "2023-08-16" + | "2023-10-16" + | "2024-04-10" connect?: boolean description?: string | "" enabled_events: ( @@ -32303,6 +35692,13 @@ export class ApiClient { | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" + | "climate.order.canceled" + | "climate.order.created" + | "climate.order.delayed" + | "climate.order.delivered" + | "climate.order.product_substituted" + | "climate.product.created" + | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" @@ -32337,6 +35733,8 @@ export class ApiClient { | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" + | "financial_connections.account.refreshed_ownership" + | "financial_connections.account.refreshed_transactions" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -32370,6 +35768,8 @@ export class ApiClient { | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" + | "issuing_token.created" + | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" @@ -32609,6 +36009,13 @@ export class ApiClient { | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" + | "climate.order.canceled" + | "climate.order.created" + | "climate.order.delayed" + | "climate.order.delivered" + | "climate.order.product_substituted" + | "climate.product.created" + | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" @@ -32643,6 +36050,8 @@ export class ApiClient { | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" + | "financial_connections.account.refreshed_ownership" + | "financial_connections.account.refreshed_transactions" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -32676,6 +36085,8 @@ export class ApiClient { | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" + | "issuing_token.created" + | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" diff --git a/integration-tests/typescript-angular/src/generated/stripe.yaml/models.ts b/integration-tests/typescript-angular/src/generated/stripe.yaml/models.ts index 3b2495ad..ee8de2ba 100644 --- a/integration-tests/typescript-angular/src/generated/stripe.yaml/models.ts +++ b/integration-tests/typescript-angular/src/generated/stripe.yaml/models.ts @@ -41,8 +41,15 @@ export type t_account = { type?: "custom" | "express" | "standard" } +export type t_account_annual_revenue = { + amount?: number | null + currency?: string | null + fiscal_year_end?: string | null +} + export type t_account_bacs_debit_payments_settings = { - display_name?: string + display_name?: string | null + service_user_number?: string | null } export type t_account_branding_settings = { @@ -53,6 +60,8 @@ export type t_account_branding_settings = { } export type t_account_business_profile = { + annual_revenue?: t_account_annual_revenue | null + estimated_worker_count?: number | null mcc?: string | null monthly_estimated_revenue?: t_account_monthly_estimated_revenue name?: string | null @@ -68,6 +77,7 @@ export type t_account_capabilities = { acss_debit_payments?: "active" | "inactive" | "pending" affirm_payments?: "active" | "inactive" | "pending" afterpay_clearpay_payments?: "active" | "inactive" | "pending" + amazon_pay_payments?: "active" | "inactive" | "pending" au_becs_debit_payments?: "active" | "inactive" | "pending" bacs_debit_payments?: "active" | "inactive" | "pending" bancontact_payments?: "active" | "inactive" | "pending" @@ -89,12 +99,15 @@ export type t_account_capabilities = { konbini_payments?: "active" | "inactive" | "pending" legacy_payments?: "active" | "inactive" | "pending" link_payments?: "active" | "inactive" | "pending" + mobilepay_payments?: "active" | "inactive" | "pending" oxxo_payments?: "active" | "inactive" | "pending" p24_payments?: "active" | "inactive" | "pending" paynow_payments?: "active" | "inactive" | "pending" promptpay_payments?: "active" | "inactive" | "pending" + revolut_pay_payments?: "active" | "inactive" | "pending" sepa_debit_payments?: "active" | "inactive" | "pending" sofort_payments?: "active" | "inactive" | "pending" + swish_payments?: "active" | "inactive" | "pending" tax_reporting_us_1099_k?: "active" | "inactive" | "pending" tax_reporting_us_1099_misc?: "active" | "inactive" | "pending" transfers?: "active" | "inactive" | "pending" @@ -157,6 +170,10 @@ export type t_account_future_requirements = { pending_verification?: string[] | null } +export type t_account_invoices_settings = { + default_account_tax_ids?: (string | t_tax_id)[] | null +} + export type t_account_link = { created: number expires_at: number @@ -202,10 +219,43 @@ export type t_account_requirements_alternative = { export type t_account_requirements_error = { code: | "invalid_address_city_state_postal_code" + | "invalid_address_highway_contract_box" + | "invalid_address_private_mailbox" + | "invalid_business_profile_name" + | "invalid_business_profile_name_denylisted" + | "invalid_company_name_denylisted" + | "invalid_dob_age_over_maximum" | "invalid_dob_age_under_18" + | "invalid_dob_age_under_minimum" + | "invalid_product_description_length" + | "invalid_product_description_url_match" | "invalid_representative_country" + | "invalid_statement_descriptor_business_mismatch" + | "invalid_statement_descriptor_denylisted" + | "invalid_statement_descriptor_length" + | "invalid_statement_descriptor_prefix_denylisted" + | "invalid_statement_descriptor_prefix_mismatch" | "invalid_street_address" + | "invalid_tax_id" + | "invalid_tax_id_format" | "invalid_tos_acceptance" + | "invalid_url_denylisted" + | "invalid_url_format" + | "invalid_url_web_presence_detected" + | "invalid_url_website_business_information_mismatch" + | "invalid_url_website_empty" + | "invalid_url_website_inaccessible" + | "invalid_url_website_inaccessible_geoblocked" + | "invalid_url_website_inaccessible_password_protected" + | "invalid_url_website_incomplete" + | "invalid_url_website_incomplete_cancellation_policy" + | "invalid_url_website_incomplete_customer_service_details" + | "invalid_url_website_incomplete_legal_restrictions" + | "invalid_url_website_incomplete_refund_policy" + | "invalid_url_website_incomplete_return_policy" + | "invalid_url_website_incomplete_terms_and_conditions" + | "invalid_url_website_incomplete_under_construction" + | "invalid_url_website_other" | "invalid_value_other" | "verification_directors_mismatch" | "verification_document_address_mismatch" @@ -247,6 +297,7 @@ export type t_account_requirements_error = { | "verification_failed_keyed_match" | "verification_failed_name_match" | "verification_failed_other" + | "verification_failed_representative_authority" | "verification_failed_residential_address" | "verification_failed_tax_id_match" | "verification_failed_tax_id_not_issued" @@ -277,6 +328,7 @@ export type t_account_settings = { card_issuing?: t_account_card_issuing_settings card_payments: t_account_card_payments_settings dashboard: t_account_dashboard_settings + invoices?: t_account_invoices_settings payments: t_account_payments_settings payouts?: t_account_payout_settings sepa_debit_payments?: t_account_sepa_debit_payments_settings @@ -384,13 +436,14 @@ export type t_apps_secret = { export type t_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } export type t_balance = { available: t_balance_amount[] connect_reserved?: t_balance_amount[] - instant_available?: t_balance_amount[] + instant_available?: t_balance_amount_net[] issuing?: t_balance_detail livemode: boolean object: "balance" @@ -409,6 +462,12 @@ export type t_balance_amount_by_source_type = { fpx?: number } +export type t_balance_amount_net = { + amount: number + currency: string + source_types?: t_balance_amount_by_source_type +} + export type t_balance_detail = { available: t_balance_amount[] } @@ -455,22 +514,23 @@ export type t_balance_transaction = { | "application_fee" | "application_fee_refund" | "charge" + | "climate_order_purchase" + | "climate_order_refund" | "connect_collection_transfer" | "contribution" | "issuing_authorization_hold" | "issuing_authorization_release" | "issuing_dispute" | "issuing_transaction" - | "obligation_inbound" | "obligation_outbound" - | "obligation_payout" - | "obligation_payout_failure" | "obligation_reversal_inbound" - | "obligation_reversal_outbound" | "payment" | "payment_failure_refund" + | "payment_network_reserve_hold" + | "payment_network_reserve_release" | "payment_refund" | "payment_reversal" + | "payment_unreconciled" | "payout" | "payout_cancel" | "payout_failure" @@ -543,6 +603,7 @@ export type t_bank_connections_resource_balance_api_resource_credit_balance = { export type t_bank_connections_resource_balance_refresh = { last_attempted_at: number + next_refresh_available_at?: number | null status: "failed" | "pending" | "succeeded" } @@ -555,6 +616,66 @@ export type t_bank_connections_resource_ownership_refresh = { status: "failed" | "pending" | "succeeded" } +export type t_bank_connections_resource_transaction_refresh = { + id: string + last_attempted_at: number + next_refresh_available_at?: number | null + status: "failed" | "pending" | "succeeded" +} + +export type t_bank_connections_resource_transaction_resource_status_transitions = + { + posted_at?: number | null + void_at?: number | null + } + +export type t_billing_meter = { + created: number + customer_mapping: t_billing_meter_resource_customer_mapping_settings + default_aggregation: t_billing_meter_resource_aggregation_settings + display_name: string + event_name: string + event_time_window?: "day" | "hour" | null + id: string + livemode: boolean + object: "billing.meter" + status: "active" | "inactive" + status_transitions: t_billing_meter_resource_billing_meter_status_transitions + updated: number + value_settings: t_billing_meter_resource_billing_meter_value +} + +export type t_billing_meter_event = { + created: number + event_name: string + identifier: string + livemode: boolean + object: "billing.meter_event" + payload: { + [key: string]: string | undefined + } + timestamp: number +} + +export type t_billing_meter_event_adjustment = { + cancel: t_billing_meter_resource_billing_meter_event_adjustment_cancel + event_name: string + livemode: boolean + object: "billing.meter_event_adjustment" + status: "complete" | "pending" + type: "cancel" +} + +export type t_billing_meter_event_summary = { + aggregated_value: number + end_time: number + id: string + livemode: boolean + meter: string + object: "billing.meter_event_summary" + start_time: number +} + export type t_billing_details = { address?: t_address | null email?: string | null @@ -562,6 +683,27 @@ export type t_billing_details = { phone?: string | null } +export type t_billing_meter_resource_aggregation_settings = { + formula: "count" | "sum" +} + +export type t_billing_meter_resource_billing_meter_event_adjustment_cancel = { + identifier: string +} + +export type t_billing_meter_resource_billing_meter_status_transitions = { + deactivated_at?: number | null +} + +export type t_billing_meter_resource_billing_meter_value = { + event_payload_key: string +} + +export type t_billing_meter_resource_customer_mapping_settings = { + event_payload_key: string + type: "by_id" +} + export type t_billing_portal_configuration = { active: boolean application?: string | t_application | t_deleted_application | null @@ -700,6 +842,7 @@ export type t_card = { [key: string]: string | undefined } | null name?: string | null + networks?: t_token_card_networks object: "card" status?: string | null tokenization_method?: string | null @@ -812,6 +955,7 @@ export type t_checkout_session = { billing_address_collection?: "auto" | "required" | null cancel_url?: string | null client_reference_id?: string | null + client_secret?: string | null consent?: t_payment_pages_checkout_session_consent | null consent_collection?: t_payment_pages_checkout_session_consent_collection | null created: number @@ -891,6 +1035,8 @@ export type t_checkout_session = { payment_status: "no_payment_required" | "paid" | "unpaid" phone_number_collection?: t_payment_pages_checkout_session_phone_number_collection recovered_from?: string | null + redirect_on_completion?: "always" | "if_required" | "never" + return_url?: string setup_intent?: string | t_setup_intent | null shipping_address_collection?: t_payment_pages_checkout_session_shipping_address_collection | null shipping_cost?: t_payment_pages_checkout_session_shipping_cost | null @@ -902,6 +1048,7 @@ export type t_checkout_session = { success_url?: string | null tax_id_collection?: t_payment_pages_checkout_session_tax_id_collection total_details?: t_payment_pages_checkout_session_total_details | null + ui_mode?: "embedded" | "hosted" | null url?: string | null } @@ -955,6 +1102,7 @@ export type t_checkout_card_installments_options = { export type t_checkout_card_payment_method_options = { installments?: t_checkout_card_installments_options + request_three_d_secure: "any" | "automatic" | "challenge" setup_future_usage?: "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -1036,10 +1184,19 @@ export type t_checkout_paynow_payment_method_options = { setup_future_usage?: "none" } +export type t_checkout_paypal_payment_method_options = { + capture_method?: "manual" + preferred_locale?: string | null + reference?: string | null + setup_future_usage?: "none" | "off_session" +} + export type t_checkout_pix_payment_method_options = { expires_after_seconds?: number | null } +export type t_checkout_revolut_pay_payment_method_options = EmptyObject + export type t_checkout_sepa_debit_payment_method_options = { setup_future_usage?: "none" | "off_session" | "on_session" } @@ -1067,9 +1224,12 @@ export type t_checkout_session_payment_method_options = { oxxo?: t_checkout_oxxo_payment_method_options p24?: t_checkout_p24_payment_method_options paynow?: t_checkout_paynow_payment_method_options + paypal?: t_checkout_paypal_payment_method_options pix?: t_checkout_pix_payment_method_options + revolut_pay?: t_checkout_revolut_pay_payment_method_options sepa_debit?: t_checkout_sepa_debit_payment_method_options sofort?: t_checkout_sofort_payment_method_options + swish?: t_checkout_swish_payment_method_options us_bank_account?: t_checkout_us_bank_account_payment_method_options } @@ -1077,12 +1237,216 @@ export type t_checkout_sofort_payment_method_options = { setup_future_usage?: "none" } +export type t_checkout_swish_payment_method_options = { + reference?: string | null +} + export type t_checkout_us_bank_account_payment_method_options = { financial_connections?: t_linked_account_options_us_bank_account setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" } +export type t_climate_order = { + amount_fees: number + amount_subtotal: number + amount_total: number + beneficiary?: t_climate_removals_beneficiary + canceled_at?: number | null + cancellation_reason?: "expired" | "product_unavailable" | "requested" | null + certificate?: string | null + confirmed_at?: number | null + created: number + currency: string + delayed_at?: number | null + delivered_at?: number | null + delivery_details: t_climate_removals_order_deliveries[] + expected_delivery_year: number + id: string + livemode: boolean + metadata: { + [key: string]: string | undefined + } + metric_tons: string + object: "climate.order" + product: string | t_climate_product + product_substituted_at?: number | null + status: "awaiting_funds" | "canceled" | "confirmed" | "delivered" | "open" +} + +export type t_climate_product = { + created: number + current_prices_per_metric_ton: { + [key: string]: t_climate_removals_products_price | undefined + } + delivery_year?: number | null + id: string + livemode: boolean + metric_tons_available: string + name: string + object: "climate.product" + suppliers: t_climate_supplier[] +} + +export type t_climate_supplier = { + id: string + info_url: string + livemode: boolean + locations: t_climate_removals_location[] + name: string + object: "climate.supplier" + removal_pathway: + | "biomass_carbon_removal_and_storage" + | "direct_air_capture" + | "enhanced_weathering" +} + +export type t_climate_removals_beneficiary = { + public_name: string +} + +export type t_climate_removals_location = { + city?: string | null + country: string + latitude?: number | null + longitude?: number | null + region?: string | null +} + +export type t_climate_removals_order_deliveries = { + delivered_at: number + location?: t_climate_removals_location | null + metric_tons: string + registry_url?: string | null + supplier: t_climate_supplier +} + +export type t_climate_removals_products_price = { + amount_fees: number + amount_subtotal: number + amount_total: number +} + +export type t_confirmation_token = { + created: number + expires_at?: number | null + id: string + livemode: boolean + mandate_data?: t_confirmation_tokens_resource_mandate_data | null + object: "confirmation_token" + payment_intent?: string | null + payment_method_preview?: t_confirmation_tokens_resource_payment_method_preview | null + return_url?: string | null + setup_future_usage?: "off_session" | "on_session" | null + setup_intent?: string | null + shipping?: t_confirmation_tokens_resource_shipping | null + use_stripe_sdk: boolean +} + +export type t_confirmation_tokens_resource_mandate_data = { + customer_acceptance: t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance +} + +export type t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance = + { + online?: t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online | null + type: string + } + +export type t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online = + { + ip_address?: string | null + user_agent?: string | null + } + +export type t_confirmation_tokens_resource_payment_method_preview = { + acss_debit?: t_payment_method_acss_debit + affirm?: t_payment_method_affirm + afterpay_clearpay?: t_payment_method_afterpay_clearpay + alipay?: t_payment_flows_private_payment_methods_alipay + au_becs_debit?: t_payment_method_au_becs_debit + bacs_debit?: t_payment_method_bacs_debit + bancontact?: t_payment_method_bancontact + billing_details: t_billing_details + blik?: t_payment_method_blik + boleto?: t_payment_method_boleto + card?: t_payment_method_card + card_present?: t_payment_method_card_present + cashapp?: t_payment_method_cashapp + customer_balance?: t_payment_method_customer_balance + eps?: t_payment_method_eps + fpx?: t_payment_method_fpx + giropay?: t_payment_method_giropay + grabpay?: t_payment_method_grabpay + ideal?: t_payment_method_ideal + interac_present?: t_payment_method_interac_present + klarna?: t_payment_method_klarna + konbini?: t_payment_method_konbini + link?: t_payment_method_link + mobilepay?: t_payment_method_mobilepay + oxxo?: t_payment_method_oxxo + p24?: t_payment_method_p24 + paynow?: t_payment_method_paynow + paypal?: t_payment_method_paypal + pix?: t_payment_method_pix + promptpay?: t_payment_method_promptpay + revolut_pay?: t_payment_method_revolut_pay + sepa_debit?: t_payment_method_sepa_debit + sofort?: t_payment_method_sofort + swish?: t_payment_method_swish + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "card" + | "card_present" + | "cashapp" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "interac_present" + | "klarna" + | "konbini" + | "link" + | "mobilepay" + | "oxxo" + | "p24" + | "paynow" + | "paypal" + | "pix" + | "promptpay" + | "revolut_pay" + | "sepa_debit" + | "sofort" + | "swish" + | "us_bank_account" + | "wechat_pay" + | "zip" + us_bank_account?: t_payment_method_us_bank_account + wechat_pay?: t_payment_method_wechat_pay + zip?: t_payment_method_zip +} + +export type t_confirmation_tokens_resource_shipping = { + address: t_address + name: string + phone?: string | null +} + +export type t_connect_account_reference = { + account?: string | t_account + type: "account" | "self" +} + export type t_connect_collection_transfer = { amount: number currency: string @@ -1092,12 +1456,49 @@ export type t_connect_collection_transfer = { object: "connect_collection_transfer" } +export type t_connect_embedded_account_config = { + enabled: boolean + features: t_connect_embedded_account_features +} + +export type t_connect_embedded_account_features = EmptyObject + export type t_connect_embedded_account_session_create_components = { - account_onboarding: t_connect_embedded_base_config_claim + account_onboarding: t_connect_embedded_account_config + documents: t_connect_embedded_base_config_claim + payment_details: t_connect_embedded_payments_config + payments: t_connect_embedded_payments_config + payouts: t_connect_embedded_payouts_config } export type t_connect_embedded_base_config_claim = { enabled: boolean + features: t_connect_embedded_base_features +} + +export type t_connect_embedded_base_features = EmptyObject + +export type t_connect_embedded_payments_config = { + enabled: boolean + features: t_connect_embedded_payments_features +} + +export type t_connect_embedded_payments_features = { + capture_payments: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management: boolean + refund_management: boolean +} + +export type t_connect_embedded_payouts_config = { + enabled: boolean + features: t_connect_embedded_payouts_features +} + +export type t_connect_embedded_payouts_features = { + edit_payout_schedule: boolean + instant_payouts: boolean + standard_payouts: boolean } export type t_country_spec = { @@ -1189,7 +1590,7 @@ export type t_credit_note = { | "product_unsatisfactory" | null refund?: string | t_refund | null - shipping_cost?: t_invoices_shipping_cost | null + shipping_cost?: t_invoices_resource_shipping_cost | null status: "issued" | "void" subtotal: number subtotal_excluding_tax?: number | null @@ -1382,6 +1783,11 @@ export type t_customer_balance_resource_cash_balance_transaction_resource_refund refund: string | t_refund } +export type t_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance = + { + balance_transaction: string | t_balance_transaction + } + export type t_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction = { payment_intent: string | t_payment_intent @@ -1428,6 +1834,7 @@ export type t_customer_cash_balance_transaction = { net_amount: number object: "customer_cash_balance_transaction" refunded_from_payment?: t_customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction + transferred_to_balance?: t_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance type: | "adjusted_for_overdraft" | "applied_to_payment" @@ -1436,10 +1843,34 @@ export type t_customer_cash_balance_transaction = { | "refunded_from_payment" | "return_canceled" | "return_initiated" + | "transferred_to_balance" | "unapplied_from_payment" unapplied_from_payment?: t_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction } +export type t_customer_session = { + client_secret: string + components?: t_customer_session_resource_components + created: number + customer: string | t_customer + expires_at: number + livemode: boolean + object: "customer_session" +} + +export type t_customer_session_resource_components = { + buy_button: t_customer_session_resource_components_resource_buy_button + pricing_table: t_customer_session_resource_components_resource_pricing_table +} + +export type t_customer_session_resource_components_resource_buy_button = { + enabled: boolean +} + +export type t_customer_session_resource_components_resource_pricing_table = { + enabled: boolean +} + export type t_customer_tax = { automatic_tax: | "failed" @@ -1517,6 +1948,7 @@ export type t_deleted_discount = { promotion_code?: string | t_promotion_code | null start: number subscription?: string | null + subscription_item?: string | null } export type t_deleted_external_account = t_deleted_bank_account | t_deleted_card @@ -1613,6 +2045,8 @@ export type t_deleted_webhook_endpoint = { object: "webhook_endpoint" } +export type t_destination_details_unimplemented = EmptyObject + export type t_discount = { checkout_session?: string | null coupon: t_coupon @@ -1625,6 +2059,7 @@ export type t_discount = { promotion_code?: string | t_promotion_code | null start: number subscription?: string | null + subscription_item?: string | null } export type t_discounts_resource_discount_amount = { @@ -1632,6 +2067,12 @@ export type t_discounts_resource_discount_amount = { discount: string | t_discount | t_deleted_discount } +export type t_discounts_resource_stackable_discount = { + coupon?: string | t_coupon | null + discount?: string | t_discount | null + promotion_code?: string | t_promotion_code | null +} + export type t_dispute = { amount: number balance_transactions: t_balance_transaction[] @@ -1849,7 +2290,9 @@ export type t_financial_connections_account = { | "mortgage" | "other" | "savings" + subscriptions?: "transactions"[] | null supported_payment_method_types: ("link" | "us_bank_account")[] + transaction_refresh?: t_bank_connections_resource_transaction_refresh | null } export type t_financial_connections_account_owner = { @@ -1889,10 +2332,25 @@ export type t_financial_connections_session = { livemode: boolean object: "financial_connections.session" permissions: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: ("balances" | "ownership")[] | null + prefetch?: ("balances" | "ownership" | "transactions")[] | null return_url?: string } +export type t_financial_connections_transaction = { + account: string + amount: number + currency: string + description: string + id: string + livemode: boolean + object: "financial_connections.transaction" + status: "pending" | "posted" | "void" + status_transitions: t_bank_connections_resource_transaction_resource_status_transitions + transacted_at: number + transaction_refresh: string + updated: number +} + export type t_financial_reporting_finance_report_run_run_parameters = { columns?: string[] connected_account?: string @@ -1904,6 +2362,47 @@ export type t_financial_reporting_finance_report_run_run_parameters = { timezone?: string } +export type t_forwarded_request_context = { + destination_duration: number + destination_ip_address: string +} + +export type t_forwarded_request_details = { + body: string + headers: t_forwarded_request_header[] + http_method: "POST" +} + +export type t_forwarded_request_header = { + name: string + value: string +} + +export type t_forwarded_response_details = { + body: string + headers: t_forwarded_request_header[] + status: number +} + +export type t_forwarding_request = { + config: string + created: number + id: string + livemode: boolean + object: "forwarding.request" + payment_method: string + replacements: ( + | "card_cvc" + | "card_expiry" + | "card_number" + | "cardholder_name" + )[] + request_context?: t_forwarded_request_context | null + request_details?: t_forwarded_request_details | null + response_details?: t_forwarded_response_details | null + url?: string | null +} + export type t_funding_instructions = { bank_transfer: t_funding_instructions_bank_transfer currency: string @@ -1918,12 +2417,29 @@ export type t_funding_instructions_bank_transfer = { type: "eu_bank_transfer" | "jp_bank_transfer" } +export type t_funding_instructions_bank_transfer_aba_record = { + account_number: string + bank_name: string + routing_number: string +} + export type t_funding_instructions_bank_transfer_financial_address = { + aba?: t_funding_instructions_bank_transfer_aba_record iban?: t_funding_instructions_bank_transfer_iban_record sort_code?: t_funding_instructions_bank_transfer_sort_code_record spei?: t_funding_instructions_bank_transfer_spei_record - supported_networks?: ("bacs" | "fps" | "sepa" | "spei" | "zengin")[] - type: "iban" | "sort_code" | "spei" | "zengin" + supported_networks?: ( + | "ach" + | "bacs" + | "domestic_wire_us" + | "fps" + | "sepa" + | "spei" + | "swift" + | "zengin" + )[] + swift?: t_funding_instructions_bank_transfer_swift_record + type: "aba" | "iban" | "sort_code" | "spei" | "swift" | "zengin" zengin?: t_funding_instructions_bank_transfer_zengin_record } @@ -1946,6 +2462,12 @@ export type t_funding_instructions_bank_transfer_spei_record = { clabe: string } +export type t_funding_instructions_bank_transfer_swift_record = { + account_number: string + bank_name: string + swift_code: string +} + export type t_funding_instructions_bank_transfer_zengin_record = { account_holder_name?: string | null account_number?: string | null @@ -2010,6 +2532,17 @@ export type t_gelato_document_report_error = { reason?: string | null } +export type t_gelato_email_report = { + email?: string | null + error?: t_gelato_email_report_error | null + status: "unverified" | "verified" +} + +export type t_gelato_email_report_error = { + code?: "email_unverified_other" | "email_verification_declined" | null + reason?: string | null +} + export type t_gelato_id_number_report = { dob?: t_gelato_data_id_number_report_date | null error?: t_gelato_id_number_report_error | null @@ -2029,6 +2562,22 @@ export type t_gelato_id_number_report_error = { reason?: string | null } +export type t_gelato_phone_report = { + error?: t_gelato_phone_report_error | null + phone?: string | null + status: "unverified" | "verified" +} + +export type t_gelato_phone_report_error = { + code?: "phone_unverified_other" | "phone_verification_declined" | null + reason?: string | null +} + +export type t_gelato_provided_details = { + email?: string + phone?: string +} + export type t_gelato_report_document_options = { allowed_types?: ("driving_license" | "id_card" | "passport")[] require_id_number?: boolean @@ -2062,6 +2611,10 @@ export type t_gelato_session_document_options = { require_matching_selfie?: boolean } +export type t_gelato_session_email_options = { + require_verification?: boolean +} + export type t_gelato_session_id_number_options = EmptyObject export type t_gelato_session_last_error = { @@ -2073,9 +2626,13 @@ export type t_gelato_session_last_error = { | "document_expired" | "document_type_not_supported" | "document_unverified_other" + | "email_unverified_other" + | "email_verification_declined" | "id_number_insufficient_document_data" | "id_number_mismatch" | "id_number_unverified_other" + | "phone_unverified_other" + | "phone_verification_declined" | "selfie_document_missing_photo" | "selfie_face_mismatch" | "selfie_manipulated" @@ -2085,6 +2642,10 @@ export type t_gelato_session_last_error = { reason?: string | null } +export type t_gelato_session_phone_options = { + require_verification?: boolean +} + export type t_gelato_verification_report_options = { document?: t_gelato_report_document_options id_number?: t_gelato_report_id_number_options @@ -2092,32 +2653,41 @@ export type t_gelato_verification_report_options = { export type t_gelato_verification_session_options = { document?: t_gelato_session_document_options + email?: t_gelato_session_email_options id_number?: t_gelato_session_id_number_options + phone?: t_gelato_session_phone_options } export type t_gelato_verified_outputs = { address?: t_address | null dob?: t_gelato_data_verified_outputs_date | null + email?: string | null first_name?: string | null id_number?: string | null id_number_type?: "br_cpf" | "sg_nric" | "us_ssn" | null last_name?: string | null + phone?: string | null } export type t_identity_verification_report = { + client_reference_id?: string | null created: number document?: t_gelato_document_report + email?: t_gelato_email_report id: string id_number?: t_gelato_id_number_report livemode: boolean object: "identity.verification_report" options?: t_gelato_verification_report_options + phone?: t_gelato_phone_report selfie?: t_gelato_selfie_report - type?: "document" | "id_number" + type: "document" | "id_number" | "verification_flow" + verification_flow?: string verification_session?: string | null } export type t_identity_verification_session = { + client_reference_id?: string | null client_secret?: string | null created: number id: string @@ -2129,10 +2699,12 @@ export type t_identity_verification_session = { } object: "identity.verification_session" options?: t_gelato_verification_session_options | null + provided_details?: t_gelato_provided_details | null redaction?: t_verification_session_redaction | null status: "canceled" | "processing" | "requires_input" | "verified" - type?: "document" | "id_number" | null + type: "document" | "id_number" | "verification_flow" url?: string | null + verification_flow?: string verified_outputs?: t_gelato_verified_outputs | null } @@ -2148,10 +2720,19 @@ export type t_inbound_transfers_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" routing_number?: string | null } +export type t_internal_card = { + brand?: string | null + country?: string | null + exp_month?: number | null + exp_year?: number | null + last4?: string | null +} + export type t_invoice = { account_country?: string | null account_name?: string | null @@ -2195,15 +2776,16 @@ export type t_invoice = { default_tax_rates: t_tax_rate[] description?: string | null discount?: t_discount | null - discounts?: (string | t_discount | t_deleted_discount)[] | null + discounts: (string | t_discount | t_deleted_discount)[] due_date?: number | null effective_at?: number | null ending_balance?: number | null footer?: string | null - from_invoice?: t_invoices_from_invoice | null + from_invoice?: t_invoices_resource_from_invoice | null hosted_invoice_url?: string | null id?: string invoice_pdf?: string | null + issuer: t_connect_account_reference last_finalization_error?: t_api_errors | null latest_revision?: string | t_invoice | null lines: { @@ -2230,14 +2812,13 @@ export type t_invoice = { pre_payment_credit_notes_amount: number quote?: string | t_quote | null receipt_number?: string | null - rendering?: t_invoices_invoice_rendering | null - rendering_options?: t_invoice_setting_rendering_options | null - shipping_cost?: t_invoices_shipping_cost | null + rendering?: t_invoices_resource_invoice_rendering | null + shipping_cost?: t_invoices_resource_shipping_cost | null shipping_details?: t_shipping | null starting_balance: number statement_descriptor?: string | null status?: "draft" | "open" | "paid" | "uncollectible" | "void" | null - status_transitions: t_invoices_status_transitions + status_transitions: t_invoices_resource_status_transitions subscription?: string | t_subscription | null subscription_details?: t_subscription_details_data | null subscription_proration_date?: number @@ -2289,7 +2870,7 @@ export type t_invoice_payment_method_options_bancontact = { export type t_invoice_payment_method_options_card = { installments?: t_invoice_installments_card - request_three_d_secure?: "any" | "automatic" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_invoice_payment_method_options_customer_balance = { @@ -2309,6 +2890,8 @@ export type t_invoice_payment_method_options_customer_balance_bank_transfer_eu_b export type t_invoice_payment_method_options_konbini = EmptyObject +export type t_invoice_payment_method_options_sepa_debit = EmptyObject + export type t_invoice_payment_method_options_us_bank_account = { financial_connections?: t_invoice_payment_method_options_us_bank_account_linked_account_options verification_method?: "automatic" | "instant" | "microdeposits" @@ -2317,7 +2900,7 @@ export type t_invoice_payment_method_options_us_bank_account = { export type t_invoice_payment_method_options_us_bank_account_linked_account_options = { permissions?: ("balances" | "payment_method" | "transactions")[] - prefetch?: "balances"[] | null + prefetch?: ("balances" | "transactions")[] | null } export type t_invoice_rendering_pdf = { @@ -2338,6 +2921,7 @@ export type t_invoice_setting_customer_setting = { export type t_invoice_setting_quote_setting = { days_until_due?: number | null + issuer: t_connect_account_reference } export type t_invoice_setting_rendering_options = { @@ -2345,11 +2929,15 @@ export type t_invoice_setting_rendering_options = { } export type t_invoice_setting_subscription_schedule_phase_setting = { + account_tax_ids?: (string | t_tax_id | t_deleted_tax_id)[] | null days_until_due?: number | null + issuer?: t_connect_account_reference | null } export type t_invoice_setting_subscription_schedule_setting = { + account_tax_ids?: (string | t_tax_id | t_deleted_tax_id)[] | null days_until_due?: number | null + issuer: t_connect_account_reference } export type t_invoice_tax_amount = { @@ -2413,22 +3001,13 @@ export type t_invoiceitem = { unit_amount_decimal?: string | null } -export type t_invoices_from_invoice = { - action: string - invoice: string | t_invoice -} - -export type t_invoices_invoice_rendering = { - amount_tax_display?: string | null - pdf?: t_invoice_rendering_pdf | null -} - export type t_invoices_payment_method_options = { acss_debit?: t_invoice_payment_method_options_acss_debit | null bancontact?: t_invoice_payment_method_options_bancontact | null card?: t_invoice_payment_method_options_card | null customer_balance?: t_invoice_payment_method_options_customer_balance | null konbini?: t_invoice_payment_method_options_konbini | null + sepa_debit?: t_invoice_payment_method_options_sepa_debit | null us_bank_account?: t_invoice_payment_method_options_us_bank_account | null } @@ -2447,12 +3026,14 @@ export type t_invoices_payment_settings = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -2464,6 +3045,16 @@ export type t_invoices_payment_settings = { | null } +export type t_invoices_resource_from_invoice = { + action: string + invoice: string | t_invoice +} + +export type t_invoices_resource_invoice_rendering = { + amount_tax_display?: string | null + pdf?: t_invoice_rendering_pdf | null +} + export type t_invoices_resource_invoice_tax_id = { type: | "ad_nrt" @@ -2511,6 +3102,7 @@ export type t_invoices_resource_invoice_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -2545,7 +3137,7 @@ export type t_invoices_resource_line_items_proration_details = { credited_items?: t_invoices_resource_line_items_credited_items | null } -export type t_invoices_shipping_cost = { +export type t_invoices_resource_shipping_cost = { amount_subtotal: number amount_tax: number amount_total: number @@ -2553,7 +3145,7 @@ export type t_invoices_shipping_cost = { taxes?: t_line_items_tax_amount[] } -export type t_invoices_status_transitions = { +export type t_invoices_resource_status_transitions = { finalized_at?: number | null marked_uncollectible_at?: number | null paid_at?: number | null @@ -2583,6 +3175,7 @@ export type t_issuing_authorization = { pending_request?: t_issuing_authorization_pending_request | null request_history: t_issuing_authorization_request[] status: "closed" | "pending" | "reversed" + token?: string | t_issuing_token | null transactions: t_issuing_transaction[] treasury?: t_issuing_authorization_treasury | null verification_data: t_issuing_authorization_verification_data @@ -2607,6 +3200,7 @@ export type t_issuing_card = { } number?: string object: "issuing.card" + personalization_design?: string | t_issuing_personalization_design | null replaced_by?: string | t_issuing_card | null replacement_for?: string | t_issuing_card | null replacement_reason?: "damaged" | "expired" | "lost" | "stolen" | null @@ -2655,6 +3249,34 @@ export type t_issuing_dispute = { treasury?: t_issuing_dispute_treasury | null } +export type t_issuing_personalization_design = { + card_logo?: string | t_file | null + carrier_text?: t_issuing_personalization_design_carrier_text | null + created: number + id: string + livemode: boolean + lookup_key?: string | null + metadata: { + [key: string]: string | undefined + } + name?: string | null + object: "issuing.personalization_design" + physical_bundle: string | t_issuing_physical_bundle + preferences: t_issuing_personalization_design_preferences + rejection_reasons: t_issuing_personalization_design_rejection_reasons + status: "active" | "inactive" | "rejected" | "review" +} + +export type t_issuing_physical_bundle = { + features?: t_issuing_physical_bundle_features + id: string + livemode: boolean + name: string + object: "issuing.physical_bundle" + status: "active" | "inactive" | "review" + type: "custom" | "standard" +} + export type t_issuing_settlement = { bin: string clearing_date: number @@ -2676,6 +3298,21 @@ export type t_issuing_settlement = { transaction_volume: number } +export type t_issuing_token = { + card: string | t_issuing_card + created: number + device_fingerprint?: string | null + id: string + last4?: string + livemode: boolean + network: "mastercard" | "visa" + network_data?: t_issuing_network_token_network_data + network_updated_at: number + object: "issuing.token" + status: "active" | "deleted" | "requested" | "suspended" + wallet_provider?: "apple_pay" | "google_pay" | "samsung_pay" +} + export type t_issuing_transaction = { amount: number amount_details?: t_issuing_transaction_amount_details | null @@ -2694,8 +3331,10 @@ export type t_issuing_transaction = { metadata: { [key: string]: string | undefined } + network_data?: t_issuing_transaction_network_data | null object: "issuing.transaction" purchase_details?: t_issuing_transaction_purchase_details | null + token?: string | t_issuing_token | null treasury?: t_issuing_transaction_treasury | null type: "capture" | "refund" wallet?: "apple_pay" | "google_pay" | "samsung_pay" | null @@ -2706,6 +3345,11 @@ export type t_issuing_authorization_amount_details = { cashback_amount?: number | null } +export type t_issuing_authorization_authentication_exemption = { + claimed_by: "acquirer" | "issuer" + type: "low_value_transaction" | "transaction_risk_analysis" | "unknown" +} + export type t_issuing_authorization_merchant_data = { category: string category_code: string @@ -2716,10 +3360,13 @@ export type t_issuing_authorization_merchant_data = { postal_code?: string | null state?: string | null terminal_id?: string | null + url?: string | null } export type t_issuing_authorization_network_data = { acquiring_institution_id?: string | null + system_trace_audit_number?: string | null + transaction_id?: string | null } export type t_issuing_authorization_pending_request = { @@ -2729,16 +3376,19 @@ export type t_issuing_authorization_pending_request = { is_amount_controllable: boolean merchant_amount: number merchant_currency: string + network_risk_score?: number | null } export type t_issuing_authorization_request = { amount: number amount_details?: t_issuing_authorization_amount_details | null approved: boolean + authorization_code?: string | null created: number currency: string merchant_amount: number merchant_currency: string + network_risk_score?: number | null reason: | "account_disabled" | "card_active" @@ -2755,6 +3405,11 @@ export type t_issuing_authorization_request = { | "webhook_error" | "webhook_timeout" reason_message?: string | null + requested_at?: number | null +} + +export type t_issuing_authorization_three_d_secure = { + result: "attempt_acknowledged" | "authenticated" | "failed" | "required" } export type t_issuing_authorization_treasury = { @@ -2766,8 +3421,11 @@ export type t_issuing_authorization_treasury = { export type t_issuing_authorization_verification_data = { address_line1_check: "match" | "mismatch" | "not_provided" address_postal_code_check: "match" | "mismatch" | "not_provided" + authentication_exemption?: t_issuing_authorization_authentication_exemption | null cvc_check: "match" | "mismatch" | "not_provided" expiry_check: "match" | "mismatch" | "not_provided" + postal_code?: string | null + three_d_secure?: t_issuing_authorization_three_d_secure | null } export type t_issuing_card_apple_pay = { @@ -3079,6 +3737,7 @@ export type t_issuing_card_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + allowed_merchant_countries?: string[] | null blocked_categories?: | ( | "ac_refrigeration_repair" @@ -3378,6 +4037,7 @@ export type t_issuing_card_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + blocked_merchant_countries?: string[] | null spending_limits?: t_issuing_card_spending_limit[] | null spending_limits_currency?: string | null } @@ -4037,6 +4697,7 @@ export type t_issuing_cardholder_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + allowed_merchant_countries?: string[] | null blocked_categories?: | ( | "ac_refrigeration_repair" @@ -4336,6 +4997,7 @@ export type t_issuing_cardholder_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + blocked_merchant_countries?: string[] | null spending_limits?: t_issuing_cardholder_spending_limit[] | null spending_limits_currency?: string | null } @@ -4791,6 +5453,128 @@ export type t_issuing_dispute_treasury = { received_debit: string } +export type t_issuing_network_token_address = { + line1: string + postal_code: string +} + +export type t_issuing_network_token_device = { + device_fingerprint?: string + ip_address?: string + location?: string + name?: string + phone_number?: string + type?: "other" | "phone" | "watch" +} + +export type t_issuing_network_token_mastercard = { + card_reference_id?: string + token_reference_id: string + token_requestor_id: string + token_requestor_name?: string +} + +export type t_issuing_network_token_network_data = { + device?: t_issuing_network_token_device + mastercard?: t_issuing_network_token_mastercard + type: "mastercard" | "visa" + visa?: t_issuing_network_token_visa + wallet_provider?: t_issuing_network_token_wallet_provider +} + +export type t_issuing_network_token_visa = { + card_reference_id: string + token_reference_id: string + token_requestor_id: string + token_risk_score?: string +} + +export type t_issuing_network_token_wallet_provider = { + account_id?: string + account_trust_score?: number + card_number_source?: "app" | "manual" | "on_file" | "other" + cardholder_address?: t_issuing_network_token_address + cardholder_name?: string + device_trust_score?: number + hashed_account_email_address?: string + reason_codes?: ( + | "account_card_too_new" + | "account_recently_changed" + | "account_too_new" + | "account_too_new_since_launch" + | "additional_device" + | "data_expired" + | "defer_id_v_decision" + | "device_recently_lost" + | "good_activity_history" + | "has_suspended_tokens" + | "high_risk" + | "inactive_account" + | "long_account_tenure" + | "low_account_score" + | "low_device_score" + | "low_phone_number_score" + | "network_service_error" + | "outside_home_territory" + | "provisioning_cardholder_mismatch" + | "provisioning_device_and_cardholder_mismatch" + | "provisioning_device_mismatch" + | "same_device_no_prior_authentication" + | "same_device_successful_prior_authentication" + | "software_update" + | "suspicious_activity" + | "too_many_different_cardholders" + | "too_many_recent_attempts" + | "too_many_recent_tokens" + )[] + suggested_decision?: "approve" | "decline" | "require_auth" + suggested_decision_version?: string +} + +export type t_issuing_personalization_design_carrier_text = { + footer_body?: string | null + footer_title?: string | null + header_body?: string | null + header_title?: string | null +} + +export type t_issuing_personalization_design_preferences = { + is_default: boolean + is_platform_default?: boolean | null +} + +export type t_issuing_personalization_design_rejection_reasons = { + card_logo?: + | ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_binary_image" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + | null + carrier_text?: + | ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + | null +} + +export type t_issuing_physical_bundle_features = { + card_logo: "optional" | "required" | "unsupported" + carrier_text: "optional" | "required" | "unsupported" + second_line: "optional" | "required" | "unsupported" +} + export type t_issuing_transaction_amount_details = { atm_fee?: number | null cashback_amount?: number | null @@ -4825,6 +5609,12 @@ export type t_issuing_transaction_lodging_data = { nights?: number | null } +export type t_issuing_transaction_network_data = { + authorization_code?: string | null + processing_date?: string | null + transaction_id?: string | null +} + export type t_issuing_transaction_purchase_details = { flight?: t_issuing_transaction_flight_data | null fuel?: t_issuing_transaction_fuel_data | null @@ -4890,6 +5680,7 @@ export type t_legal_entity_company = { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -4958,8 +5749,9 @@ export type t_line_item = { description?: string | null discount_amounts?: t_discounts_resource_discount_amount[] | null discountable: boolean - discounts?: (string | t_discount)[] | null + discounts: (string | t_discount)[] id: string + invoice?: string | null invoice_item?: string | t_invoiceitem livemode: boolean metadata: { @@ -5009,7 +5801,7 @@ export type t_line_items_tax_amount = { export type t_linked_account_options_us_bank_account = { permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: "balances"[] | null + prefetch?: ("balances" | "transactions")[] | null return_url?: string } @@ -5047,6 +5839,13 @@ export type t_mandate_au_becs_debit = { export type t_mandate_bacs_debit = { network_status: "accepted" | "pending" | "refused" | "revoked" reference: string + revocation_reason?: + | "account_closed" + | "bank_account_restricted" + | "bank_ownership_changed" + | "could_not_process" + | "debit_not_authorized" + | null url: string } @@ -5084,7 +5883,9 @@ export type t_mandate_single_use = { currency: string } -export type t_mandate_us_bank_account = EmptyObject +export type t_mandate_us_bank_account = { + collection_method?: "paper" +} export type t_networks = { available: string[] @@ -5126,6 +5927,7 @@ export type t_outbound_payments_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" | "us_domestic_wire" routing_number?: string | null } @@ -5142,6 +5944,7 @@ export type t_outbound_transfers_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" | "us_domestic_wire" routing_number?: string | null } @@ -5184,6 +5987,27 @@ export type t_payment_flows_private_payment_methods_alipay_details = { transaction_id?: string | null } +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization = + { + status: "disabled" | "enabled" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization = + { + status: "available" | "unavailable" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture = + { + maximum_amount_capturable: number + status: "available" | "unavailable" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_multicapture = + { + status: "available" | "unavailable" + } + export type t_payment_flows_private_payment_methods_klarna_dob = { day?: number | null month?: number | null @@ -5265,6 +6089,7 @@ export type t_payment_intent_next_action = { pix_display_qr_code?: t_payment_intent_next_action_pix_display_qr_code promptpay_display_qr_code?: t_payment_intent_next_action_promptpay_display_qr_code redirect_to_url?: t_payment_intent_next_action_redirect_to_url + swish_handle_redirect_or_display_qr_code?: t_payment_intent_next_action_swish_handle_redirect_or_display_qr_code type: string use_stripe_sdk?: EmptyObject verify_with_microdeposits?: t_payment_intent_next_action_verify_with_microdeposits @@ -5385,6 +6210,18 @@ export type t_payment_intent_next_action_redirect_to_url = { url?: string | null } +export type t_payment_intent_next_action_swish_handle_redirect_or_display_qr_code = + { + hosted_instructions_url: string + qr_code: t_payment_intent_next_action_swish_qr_code + } + +export type t_payment_intent_next_action_swish_qr_code = { + data: string + image_url_png: string + image_url_svg: string +} + export type t_payment_intent_next_action_verify_with_microdeposits = { arrival_date: number hosted_verification_url: string @@ -5480,6 +6317,9 @@ export type t_payment_intent_payment_method_options = { link?: | t_payment_intent_payment_method_options_link | t_payment_intent_type_specific_payment_method_options_client + mobilepay?: + | t_payment_intent_payment_method_options_mobilepay + | t_payment_intent_type_specific_payment_method_options_client oxxo?: | t_payment_method_options_oxxo | t_payment_intent_type_specific_payment_method_options_client @@ -5498,12 +6338,18 @@ export type t_payment_intent_payment_method_options = { promptpay?: | t_payment_method_options_promptpay | t_payment_intent_type_specific_payment_method_options_client + revolut_pay?: + | t_payment_method_options_revolut_pay + | t_payment_intent_type_specific_payment_method_options_client sepa_debit?: | t_payment_intent_payment_method_options_sepa_debit | t_payment_intent_type_specific_payment_method_options_client sofort?: | t_payment_method_options_sofort | t_payment_intent_type_specific_payment_method_options_client + swish?: + | t_payment_intent_payment_method_options_swish + | t_payment_intent_type_specific_payment_method_options_client us_bank_account?: | t_payment_intent_payment_method_options_us_bank_account | t_payment_intent_type_specific_payment_method_options_client @@ -5525,7 +6371,9 @@ export type t_payment_intent_payment_method_options_au_becs_debit = { setup_future_usage?: "none" | "off_session" | "on_session" } -export type t_payment_intent_payment_method_options_blik = EmptyObject +export type t_payment_intent_payment_method_options_blik = { + setup_future_usage?: "none" +} export type t_payment_intent_payment_method_options_card = { capture_method?: "manual" @@ -5544,7 +6392,12 @@ export type t_payment_intent_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | "challenge_only" | null + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" | null + require_cvc_recollection?: boolean setup_future_usage?: "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -5570,13 +6423,24 @@ export type t_payment_intent_payment_method_options_mandate_options_acss_debit = export type t_payment_intent_payment_method_options_mandate_options_sepa_debit = EmptyObject +export type t_payment_intent_payment_method_options_mobilepay = { + capture_method?: "manual" + setup_future_usage?: "none" +} + export type t_payment_intent_payment_method_options_sepa_debit = { mandate_options?: t_payment_intent_payment_method_options_mandate_options_sepa_debit setup_future_usage?: "none" | "off_session" | "on_session" } +export type t_payment_intent_payment_method_options_swish = { + reference?: string | null + setup_future_usage?: "none" +} + export type t_payment_intent_payment_method_options_us_bank_account = { financial_connections?: t_linked_account_options_us_bank_account + mandate_options?: t_payment_method_options_us_bank_account_mandate_options preferred_settlement_speed?: "fastest" | "standard" setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" | "microdeposits" @@ -5595,6 +6459,7 @@ export type t_payment_intent_processing_customer_notification = { export type t_payment_intent_type_specific_payment_method_options_client = { capture_method?: "manual" | "manual_preferred" installments?: t_payment_flows_installment_options + require_cvc_recollection?: boolean setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" | "microdeposits" } @@ -5614,6 +6479,7 @@ export type t_payment_link = { custom_text: t_payment_links_resource_custom_text customer_creation: "always" | "if_required" id: string + inactive_message?: string | null invoice_creation?: t_payment_links_resource_invoice_creation | null line_items?: { data: t_item[] @@ -5657,11 +6523,13 @@ export type t_payment_link = { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] | null phone_number_collection: t_payment_links_resource_phone_number_collection + restrictions?: t_payment_links_resource_restrictions | null shipping_address_collection?: t_payment_links_resource_shipping_address_collection | null shipping_options: t_payment_links_resource_shipping_option[] submit_type: "auto" | "book" | "donate" | "pay" @@ -5679,6 +6547,12 @@ export type t_payment_links_resource_after_completion = { export type t_payment_links_resource_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null +} + +export type t_payment_links_resource_completed_sessions = { + count: number + limit: number } export type t_payment_links_resource_completion_behavior_confirmation_page = { @@ -5690,17 +6564,18 @@ export type t_payment_links_resource_completion_behavior_redirect = { } export type t_payment_links_resource_consent_collection = { + payment_method_reuse_agreement?: t_payment_links_resource_payment_method_reuse_agreement | null promotions?: "auto" | "none" | null terms_of_service?: "none" | "required" | null } export type t_payment_links_resource_custom_fields = { - dropdown?: t_payment_links_resource_custom_fields_dropdown | null + dropdown?: t_payment_links_resource_custom_fields_dropdown key: string label: t_payment_links_resource_custom_fields_label - numeric?: t_payment_links_resource_custom_fields_numeric | null + numeric?: t_payment_links_resource_custom_fields_numeric optional: boolean - text?: t_payment_links_resource_custom_fields_text | null + text?: t_payment_links_resource_custom_fields_text type: "dropdown" | "numeric" | "text" } @@ -5729,6 +6604,7 @@ export type t_payment_links_resource_custom_fields_text = { } export type t_payment_links_resource_custom_text = { + after_submit?: t_payment_links_resource_custom_text_position | null shipping_address?: t_payment_links_resource_custom_text_position | null submit?: t_payment_links_resource_custom_text_position | null terms_of_service_acceptance?: t_payment_links_resource_custom_text_position | null @@ -5748,6 +6624,7 @@ export type t_payment_links_resource_invoice_settings = { custom_fields?: t_invoice_setting_custom_field[] | null description?: string | null footer?: string | null + issuer?: t_connect_account_reference | null metadata?: { [key: string]: string | undefined } | null @@ -5756,13 +6633,28 @@ export type t_payment_links_resource_invoice_settings = { export type t_payment_links_resource_payment_intent_data = { capture_method?: "automatic" | "automatic_async" | "manual" | null + description?: string | null + metadata: { + [key: string]: string | undefined + } setup_future_usage?: "off_session" | "on_session" | null + statement_descriptor?: string | null + statement_descriptor_suffix?: string | null + transfer_group?: string | null +} + +export type t_payment_links_resource_payment_method_reuse_agreement = { + position: "auto" | "hidden" } export type t_payment_links_resource_phone_number_collection = { enabled: boolean } +export type t_payment_links_resource_restrictions = { + completed_sessions: t_payment_links_resource_completed_sessions +} + export type t_payment_links_resource_shipping_address_collection = { allowed_countries: ( | "AC" @@ -6012,7 +6904,16 @@ export type t_payment_links_resource_shipping_option = { export type t_payment_links_resource_subscription_data = { description?: string | null + invoice_settings: t_payment_links_resource_subscription_data_invoice_settings + metadata: { + [key: string]: string | undefined + } trial_period_days?: number | null + trial_settings?: t_subscriptions_trials_resource_trial_settings | null +} + +export type t_payment_links_resource_subscription_data_invoice_settings = { + issuer: t_connect_account_reference } export type t_payment_links_resource_tax_id_collection = { @@ -6055,6 +6956,7 @@ export type t_payment_method = { metadata?: { [key: string]: string | undefined } | null + mobilepay?: t_payment_method_mobilepay object: "payment_method" oxxo?: t_payment_method_oxxo p24?: t_payment_method_p24 @@ -6063,8 +6965,10 @@ export type t_payment_method = { pix?: t_payment_method_pix promptpay?: t_payment_method_promptpay radar_options?: t_radar_radar_options + revolut_pay?: t_payment_method_revolut_pay sepa_debit?: t_payment_method_sepa_debit sofort?: t_payment_method_sofort + swish?: t_payment_method_swish type: | "acss_debit" | "affirm" @@ -6088,14 +6992,17 @@ export type t_payment_method = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -6140,6 +7047,7 @@ export type t_payment_method_card = { brand: string checks?: t_payment_method_card_checks | null country?: string | null + display_brand?: string | null exp_month: number exp_year: number fingerprint?: string | null @@ -6267,13 +7175,13 @@ export type t_payment_method_configuration = { card?: t_payment_method_config_resource_payment_method_properties cartes_bancaires?: t_payment_method_config_resource_payment_method_properties cashapp?: t_payment_method_config_resource_payment_method_properties + customer_balance?: t_payment_method_config_resource_payment_method_properties eps?: t_payment_method_config_resource_payment_method_properties fpx?: t_payment_method_config_resource_payment_method_properties giropay?: t_payment_method_config_resource_payment_method_properties google_pay?: t_payment_method_config_resource_payment_method_properties grabpay?: t_payment_method_config_resource_payment_method_properties id: string - id_bank_transfer?: t_payment_method_config_resource_payment_method_properties ideal?: t_payment_method_config_resource_payment_method_properties is_default: boolean jcb?: t_payment_method_config_resource_payment_method_properties @@ -6281,22 +7189,20 @@ export type t_payment_method_configuration = { konbini?: t_payment_method_config_resource_payment_method_properties link?: t_payment_method_config_resource_payment_method_properties livemode: boolean - multibanco?: t_payment_method_config_resource_payment_method_properties name: string - netbanking?: t_payment_method_config_resource_payment_method_properties object: "payment_method_configuration" oxxo?: t_payment_method_config_resource_payment_method_properties p24?: t_payment_method_config_resource_payment_method_properties parent?: string | null - pay_by_bank?: t_payment_method_config_resource_payment_method_properties paynow?: t_payment_method_config_resource_payment_method_properties paypal?: t_payment_method_config_resource_payment_method_properties promptpay?: t_payment_method_config_resource_payment_method_properties + revolut_pay?: t_payment_method_config_resource_payment_method_properties sepa_debit?: t_payment_method_config_resource_payment_method_properties sofort?: t_payment_method_config_resource_payment_method_properties - upi?: t_payment_method_config_resource_payment_method_properties us_bank_account?: t_payment_method_config_resource_payment_method_properties wechat_pay?: t_payment_method_config_resource_payment_method_properties + zip?: t_payment_method_config_resource_payment_method_properties } export type t_payment_method_customer_balance = EmptyObject @@ -6326,6 +7232,7 @@ export type t_payment_method_details = { klarna?: t_payment_method_details_klarna konbini?: t_payment_method_details_konbini link?: t_payment_method_details_link + mobilepay?: t_payment_method_details_mobilepay multibanco?: t_payment_method_details_multibanco oxxo?: t_payment_method_details_oxxo p24?: t_payment_method_details_p24 @@ -6333,9 +7240,11 @@ export type t_payment_method_details = { paypal?: t_payment_method_details_paypal pix?: t_payment_method_details_pix promptpay?: t_payment_method_details_promptpay + revolut_pay?: t_payment_method_details_revolut_pay sepa_debit?: t_payment_method_details_sepa_debit sofort?: t_payment_method_details_sofort stripe_account?: t_payment_method_details_stripe_account + swish?: t_payment_method_details_swish type: string us_bank_account?: t_payment_method_details_us_bank_account wechat?: t_payment_method_details_wechat @@ -6407,18 +7316,24 @@ export type t_payment_method_details_boleto = { } export type t_payment_method_details_card = { + amount_authorized?: number | null brand?: string | null + capture_before?: number checks?: t_payment_method_details_card_checks | null country?: string | null exp_month: number exp_year: number + extended_authorization?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization fingerprint?: string | null funding?: string | null + incremental_authorization?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization installments?: t_payment_method_details_card_installments | null last4?: string | null mandate?: string | null + multicapture?: t_payment_flows_private_payment_methods_card_details_api_resource_multicapture network?: string | null network_token?: t_payment_method_details_card_network_token | null + overcapture?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture three_d_secure?: t_three_d_secure_details_charge | null wallet?: t_payment_method_details_card_wallet | null } @@ -6458,6 +7373,7 @@ export type t_payment_method_details_card_present = { incremental_authorization_supported: boolean last4?: string | null network?: string | null + offline?: t_payment_method_details_card_present_offline | null overcapture_supported: boolean read_method?: | "contact_emv" @@ -6469,6 +7385,10 @@ export type t_payment_method_details_card_present = { receipt?: t_payment_method_details_card_present_receipt | null } +export type t_payment_method_details_card_present_offline = { + stored_at?: number | null +} + export type t_payment_method_details_card_present_receipt = { account_type?: "checking" | "credit" | "prepaid" | "unknown" application_cryptogram?: string | null @@ -6614,6 +7534,7 @@ export type t_payment_method_details_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -6632,6 +7553,7 @@ export type t_payment_method_details_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -6698,6 +7620,10 @@ export type t_payment_method_details_link = { country?: string | null } +export type t_payment_method_details_mobilepay = { + card?: t_internal_card | null +} + export type t_payment_method_details_multibanco = { entity?: string | null reference?: string | null @@ -6733,6 +7659,7 @@ export type t_payment_method_details_p24 = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" | null reference?: string | null @@ -6759,6 +7686,8 @@ export type t_payment_method_details_promptpay = { reference?: string | null } +export type t_payment_method_details_revolut_pay = EmptyObject + export type t_payment_method_details_sepa_debit = { bank_code?: string | null branch_code?: string | null @@ -6782,12 +7711,20 @@ export type t_payment_method_details_sofort = { export type t_payment_method_details_stripe_account = EmptyObject +export type t_payment_method_details_swish = { + fingerprint?: string | null + payment_reference?: string | null + verified_phone_last4?: string | null +} + export type t_payment_method_details_us_bank_account = { account_holder_type?: "company" | "individual" | null account_type?: "checking" | "savings" | null bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate + payment_reference?: string | null routing_number?: string | null } @@ -6895,6 +7832,7 @@ export type t_payment_method_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -6913,6 +7851,7 @@ export type t_payment_method_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -6953,6 +7892,8 @@ export type t_payment_method_link = { email?: string | null } +export type t_payment_method_mobilepay = EmptyObject + export type t_payment_method_options_affirm = { capture_method?: "manual" preferred_locale?: string @@ -7103,11 +8044,17 @@ export type t_payment_method_options_promptpay = { setup_future_usage?: "none" } +export type t_payment_method_options_revolut_pay = EmptyObject + export type t_payment_method_options_sofort = { preferred_language?: "de" | "en" | "es" | "fr" | "it" | "nl" | "pl" | null setup_future_usage?: "none" | "off_session" } +export type t_payment_method_options_us_bank_account_mandate_options = { + collection_method?: "paper" +} + export type t_payment_method_options_wechat_pay = { app_id?: string | null client?: "android" | "ios" | "web" | null @@ -7146,6 +8093,7 @@ export type t_payment_method_p24 = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" | null } @@ -7161,6 +8109,8 @@ export type t_payment_method_pix = EmptyObject export type t_payment_method_promptpay = EmptyObject +export type t_payment_method_revolut_pay = EmptyObject + export type t_payment_method_sepa_debit = { bank_code?: string | null branch_code?: string | null @@ -7174,6 +8124,8 @@ export type t_payment_method_sofort = { country?: string | null } +export type t_payment_method_swish = EmptyObject + export type t_payment_method_us_bank_account = { account_holder_type?: "company" | "individual" | null account_type?: "checking" | "savings" | null @@ -7232,6 +8184,7 @@ export type t_payment_pages_checkout_session_after_expiration_recovery = { export type t_payment_pages_checkout_session_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } @@ -7241,6 +8194,7 @@ export type t_payment_pages_checkout_session_consent = { } export type t_payment_pages_checkout_session_consent_collection = { + payment_method_reuse_agreement?: t_payment_pages_checkout_session_payment_method_reuse_agreement | null promotions?: "auto" | "none" | null terms_of_service?: "none" | "required" | null } @@ -7253,12 +8207,12 @@ export type t_payment_pages_checkout_session_currency_conversion = { } export type t_payment_pages_checkout_session_custom_fields = { - dropdown?: t_payment_pages_checkout_session_custom_fields_dropdown | null + dropdown?: t_payment_pages_checkout_session_custom_fields_dropdown key: string label: t_payment_pages_checkout_session_custom_fields_label - numeric?: t_payment_pages_checkout_session_custom_fields_numeric | null + numeric?: t_payment_pages_checkout_session_custom_fields_numeric optional: boolean - text?: t_payment_pages_checkout_session_custom_fields_text | null + text?: t_payment_pages_checkout_session_custom_fields_text type: "dropdown" | "numeric" | "text" } @@ -7290,6 +8244,7 @@ export type t_payment_pages_checkout_session_custom_fields_text = { } export type t_payment_pages_checkout_session_custom_text = { + after_submit?: t_payment_pages_checkout_session_custom_text_position | null shipping_address?: t_payment_pages_checkout_session_custom_text_position | null submit?: t_payment_pages_checkout_session_custom_text_position | null terms_of_service_acceptance?: t_payment_pages_checkout_session_custom_text_position | null @@ -7318,12 +8273,17 @@ export type t_payment_pages_checkout_session_invoice_settings = { custom_fields?: t_invoice_setting_custom_field[] | null description?: string | null footer?: string | null + issuer?: t_connect_account_reference | null metadata?: { [key: string]: string | undefined } | null rendering_options?: t_invoice_setting_rendering_options | null } +export type t_payment_pages_checkout_session_payment_method_reuse_agreement = { + position: "auto" | "hidden" +} + export type t_payment_pages_checkout_session_phone_number_collection = { enabled: boolean } @@ -7630,6 +8590,7 @@ export type t_payment_pages_checkout_session_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -7720,6 +8681,7 @@ export type t_period = { export type t_person = { account: string + additional_tos_acceptances?: t_person_additional_tos_acceptances address?: t_address address_kana?: t_legal_entity_japan_address | null address_kanji?: t_legal_entity_japan_address | null @@ -7753,6 +8715,16 @@ export type t_person = { verification?: t_legal_entity_person_verification } +export type t_person_additional_tos_acceptance = { + date?: number | null + ip?: string | null + user_agent?: string | null +} + +export type t_person_additional_tos_acceptances = { + account: t_person_additional_tos_acceptance +} + export type t_person_future_requirements = { alternatives?: t_account_requirements_alternative[] | null currently_due: string[] @@ -7765,6 +8737,7 @@ export type t_person_future_requirements = { export type t_person_relationship = { director?: boolean | null executive?: boolean | null + legal_guardian?: boolean | null owner?: boolean | null percent_ownership?: number | null representative?: boolean | null @@ -7795,6 +8768,7 @@ export type t_plan = { metadata?: { [key: string]: string | undefined } | null + meter?: string | null nickname?: string | null object: "plan" product?: string | t_product | t_deleted_product | null @@ -7844,7 +8818,6 @@ export type t_portal_features = { invoice_history: t_portal_invoice_list payment_method_update: t_portal_payment_method_update subscription_cancel: t_portal_subscription_cancel - subscription_pause: t_portal_subscription_pause subscription_update: t_portal_subscription_update } @@ -7943,10 +8916,6 @@ export type t_portal_subscription_cancellation_reason = { )[] } -export type t_portal_subscription_pause = { - enabled: boolean -} - export type t_portal_subscription_update = { default_allowed_updates: ("price" | "promotion_code" | "quantity")[] enabled: boolean @@ -8000,7 +8969,7 @@ export type t_product = { created: number default_price?: string | t_price | null description?: string | null - features: t_product_feature[] + features: t_product_marketing_feature[] id: string images: string[] livemode: boolean @@ -8018,8 +8987,8 @@ export type t_product = { url?: string | null } -export type t_product_feature = { - name: string +export type t_product_marketing_feature = { + name?: string } export type t_promotion_code = { @@ -8074,7 +9043,7 @@ export type t_quote = { header?: string | null id: string invoice?: string | t_invoice | t_deleted_invoice | null - invoice_settings?: t_invoice_setting_quote_setting | null + invoice_settings: t_invoice_setting_quote_setting line_items?: { data: t_item[] has_more: boolean @@ -8100,6 +9069,7 @@ export type t_quote = { export type t_quotes_resource_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } @@ -8130,6 +9100,9 @@ export type t_quotes_resource_status_transitions = { export type t_quotes_resource_subscription_data_subscription_data = { description?: string | null effective_date?: number | null + metadata?: { + [key: string]: string | undefined + } | null trial_period_days?: number | null } @@ -8242,6 +9215,7 @@ export type t_recurring = { aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" | null interval: "day" | "month" | "week" | "year" interval_count: number + meter?: string | null usage_type: "licensed" | "metered" } @@ -8252,6 +9226,7 @@ export type t_refund = { created: number currency: string description?: string + destination_details?: t_refund_destination_details failure_balance_transaction?: string | t_balance_transaction failure_reason?: string id: string @@ -8274,6 +9249,50 @@ export type t_refund = { transfer_reversal?: string | t_transfer_reversal | null } +export type t_refund_destination_details = { + affirm?: t_destination_details_unimplemented + afterpay_clearpay?: t_destination_details_unimplemented + alipay?: t_destination_details_unimplemented + au_bank_transfer?: t_destination_details_unimplemented + blik?: t_refund_destination_details_generic + br_bank_transfer?: t_refund_destination_details_generic + card?: t_refund_destination_details_card + cashapp?: t_destination_details_unimplemented + customer_cash_balance?: t_destination_details_unimplemented + eps?: t_destination_details_unimplemented + eu_bank_transfer?: t_refund_destination_details_generic + gb_bank_transfer?: t_refund_destination_details_generic + giropay?: t_destination_details_unimplemented + grabpay?: t_destination_details_unimplemented + jp_bank_transfer?: t_refund_destination_details_generic + klarna?: t_destination_details_unimplemented + mx_bank_transfer?: t_refund_destination_details_generic + p24?: t_refund_destination_details_generic + paynow?: t_destination_details_unimplemented + paypal?: t_destination_details_unimplemented + pix?: t_destination_details_unimplemented + revolut?: t_destination_details_unimplemented + sofort?: t_destination_details_unimplemented + swish?: t_refund_destination_details_generic + th_bank_transfer?: t_refund_destination_details_generic + type: string + us_bank_transfer?: t_refund_destination_details_generic + wechat_pay?: t_destination_details_unimplemented + zip?: t_destination_details_unimplemented +} + +export type t_refund_destination_details_card = { + reference?: string + reference_status?: string + reference_type?: string + type: "pending" | "refund" | "reversal" +} + +export type t_refund_destination_details_generic = { + reference?: string | null + reference_status?: string | null +} + export type t_refund_next_action = { display_details?: t_refund_next_action_display_details | null type: string @@ -8362,6 +9381,7 @@ export type t_scheduled_query_run = { export type t_schedules_phase_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_secret_service_resource_scope = { @@ -8432,7 +9452,7 @@ export type t_setup_attempt_payment_method_details_boleto = EmptyObject export type t_setup_attempt_payment_method_details_card = { brand?: string | null - checks?: t_payment_method_details_card_checks | null + checks?: t_setup_attempt_payment_method_details_card_checks | null country?: string | null exp_month?: number | null exp_year?: number | null @@ -8444,8 +9464,15 @@ export type t_setup_attempt_payment_method_details_card = { wallet?: t_setup_attempt_payment_method_details_card_wallet | null } +export type t_setup_attempt_payment_method_details_card_checks = { + address_line1_check?: string | null + address_postal_code_check?: string | null + cvc_check?: string | null +} + export type t_setup_attempt_payment_method_details_card_present = { generated_card?: string | t_payment_method | null + offline?: t_payment_method_details_card_present_offline | null } export type t_setup_attempt_payment_method_details_card_wallet = { @@ -8466,6 +9493,7 @@ export type t_setup_attempt_payment_method_details_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -8484,6 +9512,7 @@ export type t_setup_attempt_payment_method_details_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -8583,6 +9612,9 @@ export type t_setup_intent_payment_method_options = { | t_setup_intent_payment_method_options_acss_debit | t_setup_intent_type_specific_payment_method_options_client card?: t_setup_intent_payment_method_options_card + card_present?: + | t_setup_intent_payment_method_options_card_present + | t_setup_intent_type_specific_payment_method_options_client link?: | t_setup_intent_payment_method_options_link | t_setup_intent_type_specific_payment_method_options_client @@ -8618,7 +9650,7 @@ export type t_setup_intent_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | "challenge_only" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_setup_intent_payment_method_options_card_mandate_options = { @@ -8634,6 +9666,8 @@ export type t_setup_intent_payment_method_options_card_mandate_options = { supported_types?: "india"[] | null } +export type t_setup_intent_payment_method_options_card_present = EmptyObject + export type t_setup_intent_payment_method_options_link = EmptyObject export type t_setup_intent_payment_method_options_mandate_options_acss_debit = { @@ -8657,6 +9691,7 @@ export type t_setup_intent_payment_method_options_sepa_debit = { export type t_setup_intent_payment_method_options_us_bank_account = { financial_connections?: t_linked_account_options_us_bank_account + mandate_options?: t_payment_method_options_us_bank_account_mandate_options verification_method?: "automatic" | "instant" | "microdeposits" } @@ -9136,6 +10171,7 @@ export type t_subscription = { application_fee_percent?: number | null automatic_tax: t_subscription_automatic_tax billing_cycle_anchor: number + billing_cycle_anchor_config?: t_subscriptions_resource_billing_cycle_anchor_config | null billing_thresholds?: t_subscription_billing_thresholds | null cancel_at?: number | null cancel_at_period_end: boolean @@ -9153,6 +10189,7 @@ export type t_subscription = { default_tax_rates?: t_tax_rate[] | null description?: string | null discount?: t_discount | null + discounts: (string | t_discount)[] ended_at?: number | null id: string items: { @@ -9194,6 +10231,7 @@ export type t_subscription = { export type t_subscription_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_subscription_billing_thresholds = { @@ -9210,6 +10248,7 @@ export type t_subscription_details_data = { export type t_subscription_item = { billing_thresholds?: t_subscription_item_billing_thresholds | null created: number + discounts: (string | t_discount)[] id: string metadata: { [key: string]: string | undefined @@ -9240,7 +10279,7 @@ export type t_subscription_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_subscription_pending_invoice_item_interval = { @@ -9272,6 +10311,7 @@ export type t_subscription_schedule = { } export type t_subscription_schedule_add_invoice_item = { + discounts: t_discounts_resource_stackable_discount[] price: string | t_price | t_deleted_price quantity?: number | null tax_rates?: t_tax_rate[] | null @@ -9279,6 +10319,7 @@ export type t_subscription_schedule_add_invoice_item = { export type t_subscription_schedule_configuration_item = { billing_thresholds?: t_subscription_item_billing_thresholds | null + discounts: t_discounts_resource_stackable_discount[] metadata?: { [key: string]: string | undefined } | null @@ -9304,6 +10345,7 @@ export type t_subscription_schedule_phase_configuration = { default_payment_method?: string | t_payment_method | null default_tax_rates?: t_tax_rate[] | null description?: string | null + discounts: t_discounts_resource_stackable_discount[] end_date: number invoice_settings?: t_invoice_setting_subscription_schedule_phase_setting | null items: t_subscription_schedule_configuration_item[] @@ -9325,13 +10367,14 @@ export type t_subscription_schedules_resource_default_settings = { collection_method?: "charge_automatically" | "send_invoice" | null default_payment_method?: string | t_payment_method | null description?: string | null - invoice_settings?: t_invoice_setting_subscription_schedule_setting | null + invoice_settings: t_invoice_setting_subscription_schedule_setting on_behalf_of?: string | t_account | null transfer_data?: t_subscription_transfer_data | null } export type t_subscription_schedules_resource_default_settings_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_subscription_transfer_data = { @@ -9339,6 +10382,14 @@ export type t_subscription_transfer_data = { destination: string | t_account } +export type t_subscriptions_resource_billing_cycle_anchor_config = { + day_of_month: number + hour?: number | null + minute?: number | null + month?: number | null + second?: number | null +} + export type t_subscriptions_resource_pause_collection = { behavior: "keep_as_draft" | "mark_uncollectible" | "void" resumes_at?: number | null @@ -9350,6 +10401,7 @@ export type t_subscriptions_resource_payment_method_options = { card?: t_subscription_payment_method_options_card | null customer_balance?: t_invoice_payment_method_options_customer_balance | null konbini?: t_invoice_payment_method_options_konbini | null + sepa_debit?: t_invoice_payment_method_options_sepa_debit | null us_bank_account?: t_invoice_payment_method_options_us_bank_account | null } @@ -9367,12 +10419,14 @@ export type t_subscriptions_resource_payment_settings = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -9437,6 +10491,18 @@ export type t_tax_calculation_line_item = { tax_code: string } +export type t_tax_registration = { + active_from: number + country: string + country_options: t_tax_product_registrations_resource_country_options + created: number + expires_at?: number | null + id: string + livemode: boolean + object: "tax.registration" + status: "active" | "expired" | "scheduled" +} + export type t_tax_settings = { defaults: t_tax_product_resource_tax_settings_defaults head_office?: t_tax_product_resource_tax_settings_head_office | null @@ -9503,6 +10569,13 @@ export type t_tax_deducted_at_source = { tax_deduction_account_number: string } +export type t_tax_i_ds_owner = { + account?: string | t_account + application?: string | t_application + customer?: string | t_customer + type: "account" | "application" | "customer" | "self" +} + export type t_tax_id = { country?: string | null created: number @@ -9510,6 +10583,7 @@ export type t_tax_id = { id: string livemode: boolean object: "tax_id" + owner?: t_tax_i_ds_owner | null type: | "ad_nrt" | "ae_trn" @@ -9556,6 +10630,7 @@ export type t_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -9588,6 +10663,107 @@ export type t_tax_id_verification = { verified_name?: string | null } +export type t_tax_product_registrations_resource_country_options = { + ae?: t_tax_product_registrations_resource_country_options_default + at?: t_tax_product_registrations_resource_country_options_europe + au?: t_tax_product_registrations_resource_country_options_default + be?: t_tax_product_registrations_resource_country_options_europe + bg?: t_tax_product_registrations_resource_country_options_europe + ca?: t_tax_product_registrations_resource_country_options_canada + ch?: t_tax_product_registrations_resource_country_options_default + cl?: t_tax_product_registrations_resource_country_options_simplified + co?: t_tax_product_registrations_resource_country_options_simplified + cy?: t_tax_product_registrations_resource_country_options_europe + cz?: t_tax_product_registrations_resource_country_options_europe + de?: t_tax_product_registrations_resource_country_options_europe + dk?: t_tax_product_registrations_resource_country_options_europe + ee?: t_tax_product_registrations_resource_country_options_europe + es?: t_tax_product_registrations_resource_country_options_europe + fi?: t_tax_product_registrations_resource_country_options_europe + fr?: t_tax_product_registrations_resource_country_options_europe + gb?: t_tax_product_registrations_resource_country_options_default + gr?: t_tax_product_registrations_resource_country_options_europe + hr?: t_tax_product_registrations_resource_country_options_europe + hu?: t_tax_product_registrations_resource_country_options_europe + id?: t_tax_product_registrations_resource_country_options_simplified + ie?: t_tax_product_registrations_resource_country_options_europe + is?: t_tax_product_registrations_resource_country_options_default + it?: t_tax_product_registrations_resource_country_options_europe + jp?: t_tax_product_registrations_resource_country_options_default + kr?: t_tax_product_registrations_resource_country_options_simplified + lt?: t_tax_product_registrations_resource_country_options_europe + lu?: t_tax_product_registrations_resource_country_options_europe + lv?: t_tax_product_registrations_resource_country_options_europe + mt?: t_tax_product_registrations_resource_country_options_europe + mx?: t_tax_product_registrations_resource_country_options_simplified + my?: t_tax_product_registrations_resource_country_options_simplified + nl?: t_tax_product_registrations_resource_country_options_europe + no?: t_tax_product_registrations_resource_country_options_default + nz?: t_tax_product_registrations_resource_country_options_default + pl?: t_tax_product_registrations_resource_country_options_europe + pt?: t_tax_product_registrations_resource_country_options_europe + ro?: t_tax_product_registrations_resource_country_options_europe + sa?: t_tax_product_registrations_resource_country_options_simplified + se?: t_tax_product_registrations_resource_country_options_europe + sg?: t_tax_product_registrations_resource_country_options_default + si?: t_tax_product_registrations_resource_country_options_europe + sk?: t_tax_product_registrations_resource_country_options_europe + th?: t_tax_product_registrations_resource_country_options_simplified + tr?: t_tax_product_registrations_resource_country_options_simplified + us?: t_tax_product_registrations_resource_country_options_united_states + vn?: t_tax_product_registrations_resource_country_options_simplified + za?: t_tax_product_registrations_resource_country_options_default +} + +export type t_tax_product_registrations_resource_country_options_ca_province_standard = + { + province: string + } + +export type t_tax_product_registrations_resource_country_options_canada = { + province_standard?: t_tax_product_registrations_resource_country_options_ca_province_standard + type: "province_standard" | "simplified" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_default = { + type: "standard" +} + +export type t_tax_product_registrations_resource_country_options_eu_standard = { + place_of_supply_scheme: "small_seller" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_europe = { + standard?: t_tax_product_registrations_resource_country_options_eu_standard + type: "ioss" | "oss_non_union" | "oss_union" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_simplified = { + type: "simplified" +} + +export type t_tax_product_registrations_resource_country_options_united_states = + { + local_amusement_tax?: t_tax_product_registrations_resource_country_options_us_local_amusement_tax + local_lease_tax?: t_tax_product_registrations_resource_country_options_us_local_lease_tax + state: string + type: + | "local_amusement_tax" + | "local_lease_tax" + | "state_communications_tax" + | "state_sales_tax" + } + +export type t_tax_product_registrations_resource_country_options_us_local_amusement_tax = + { + jurisdiction: string + } + +export type t_tax_product_registrations_resource_country_options_us_local_lease_tax = + { + jurisdiction: string + } + export type t_tax_product_resource_customer_details = { address?: t_tax_product_resource_postal_address | null address_source?: "billing" | "shipping" | null @@ -9643,6 +10819,7 @@ export type t_tax_product_resource_customer_details_resource_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -9827,6 +11004,14 @@ export type t_tax_rate = { id: string inclusive: boolean jurisdiction?: string | null + jurisdiction_level?: + | "city" + | "country" + | "county" + | "district" + | "multiple" + | "state" + | null livemode: boolean metadata?: { [key: string]: string | undefined @@ -9846,7 +11031,6 @@ export type t_tax_rate = { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" | null } @@ -9856,7 +11040,9 @@ export type t_terminal_configuration = { id: string is_account_default?: boolean | null livemode: boolean + name?: string | null object: "terminal.configuration" + offline?: t_terminal_configuration_configuration_resource_offline_config tipping?: t_terminal_configuration_configuration_resource_tipping verifone_p400?: t_terminal_configuration_configuration_resource_device_type_specific_config } @@ -9886,6 +11072,7 @@ export type t_terminal_reader = { | "bbpos_chipper2x" | "bbpos_wisepad3" | "bbpos_wisepos_e" + | "mobile_phone_reader" | "simulated_wisepos_e" | "stripe_m2" | "verifone_P400" @@ -9899,7 +11086,7 @@ export type t_terminal_reader = { } object: "terminal.reader" serial_number: string - status?: string | null + status?: "offline" | "online" | null } export type t_terminal_configuration_configuration_resource_currency_specific_config = @@ -9914,6 +11101,10 @@ export type t_terminal_configuration_configuration_resource_device_type_specific splashscreen?: string | t_file } +export type t_terminal_configuration_configuration_resource_offline_config = { + enabled?: boolean | null +} + export type t_terminal_configuration_configuration_resource_tipping = { aud?: t_terminal_configuration_configuration_resource_currency_specific_config cad?: t_terminal_configuration_configuration_resource_currency_specific_config @@ -9945,6 +11136,7 @@ export type t_terminal_reader_reader_resource_line_item = { } export type t_terminal_reader_reader_resource_process_config = { + enable_customer_cancellation?: boolean skip_tipping?: boolean tipping?: t_terminal_reader_reader_resource_tipping_config } @@ -9954,7 +11146,9 @@ export type t_terminal_reader_reader_resource_process_payment_intent_action = { process_config?: t_terminal_reader_reader_resource_process_config } -export type t_terminal_reader_reader_resource_process_setup_config = EmptyObject +export type t_terminal_reader_reader_resource_process_setup_config = { + enable_customer_cancellation?: boolean +} export type t_terminal_reader_reader_resource_process_setup_intent_action = { generated_card?: string @@ -9987,9 +11181,14 @@ export type t_terminal_reader_reader_resource_refund_payment_action = { reason?: "duplicate" | "fraudulent" | "requested_by_customer" refund?: string | t_refund refund_application_fee?: boolean + refund_payment_config?: t_terminal_reader_reader_resource_refund_payment_config reverse_transfer?: boolean } +export type t_terminal_reader_reader_resource_refund_payment_config = { + enable_customer_cancellation?: boolean +} + export type t_terminal_reader_reader_resource_set_reader_display_action = { cart?: t_terminal_reader_reader_resource_cart | null type: "cart" @@ -10012,6 +11211,7 @@ export type t_test_helpers_test_clock = { export type t_three_d_secure_details = { authentication_flow?: "challenge" | "frictionless" | null + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" | null result?: | "attempt_acknowledged" | "authenticated" @@ -10029,11 +11229,15 @@ export type t_three_d_secure_details = { | "protocol_error" | "rejected" | null + transaction_id?: string | null version?: "1.0.2" | "2.1.0" | "2.2.0" | null } export type t_three_d_secure_details_charge = { authentication_flow?: "challenge" | "frictionless" | null + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" | null + exemption_indicator?: "low_risk" | "none" | null + exemption_indicator_applied?: boolean result?: | "attempt_acknowledged" | "authenticated" @@ -10051,6 +11255,7 @@ export type t_three_d_secure_details_charge = { | "protocol_error" | "rejected" | null + transaction_id?: string | null version?: "1.0.2" | "2.1.0" | "2.2.0" | null } @@ -10070,6 +11275,10 @@ export type t_token = { used: boolean } +export type t_token_card_networks = { + preferred?: string | null +} + export type t_topup = { amount: number balance_transaction?: string | t_balance_transaction | null @@ -10670,6 +11879,7 @@ export type t_treasury_received_debits_resource_linked_flows = { inbound_transfer?: string | null issuing_authorization?: string | null issuing_transaction?: string | null + payout?: string | null } export type t_treasury_received_debits_resource_reversal_details = { diff --git a/integration-tests/typescript-axios/src/generated/api.github.com.yaml/client.ts b/integration-tests/typescript-axios/src/generated/api.github.com.yaml/client.ts index 5612b057..a71658cf 100644 --- a/integration-tests/typescript-axios/src/generated/api.github.com.yaml/client.ts +++ b/integration-tests/typescript-axios/src/generated/api.github.com.yaml/client.ts @@ -65,6 +65,7 @@ import { t_code_scanning_default_setup_update_response, t_code_scanning_organization_alert_items, t_code_scanning_ref, + t_code_scanning_ref_full, t_code_scanning_sarifs_receipt, t_code_scanning_sarifs_status, t_code_search_result_item, @@ -74,6 +75,7 @@ import { t_codespace_machine, t_codespace_with_full_repository, t_codespaces_org_secret, + t_codespaces_permissions_check_for_devcontainer, t_codespaces_public_key, t_codespaces_secret, t_codespaces_user_public_key, @@ -96,6 +98,7 @@ import { t_copilot_organization_details, t_copilot_seat_details, t_custom_deployment_rule_app, + t_custom_property_value, t_dependabot_alert, t_dependabot_alert_with_repository, t_dependabot_public_key, @@ -106,6 +109,7 @@ import { t_deployment, t_deployment_branch_policy, t_deployment_branch_policy_name_pattern, + t_deployment_branch_policy_name_pattern_with_type, t_deployment_branch_policy_settings, t_deployment_protection_rule, t_deployment_reviewer_type, @@ -163,16 +167,20 @@ import { t_minimal_repository, t_oidc_custom_sub, t_oidc_custom_sub_repo, + t_org_custom_property, t_org_hook, t_org_membership, + t_org_repo_custom_property_values, t_org_ruleset_conditions, t_organization_actions_secret, t_organization_actions_variable, t_organization_dependabot_secret, + t_organization_fine_grained_permission, t_organization_full, t_organization_invitation, t_organization_programmatic_access_grant, t_organization_programmatic_access_grant_request, + t_organization_role, t_organization_secret_scanning_alert, t_organization_simple, t_package, @@ -182,11 +190,13 @@ import { t_page_build, t_page_build_status, t_page_deployment, + t_pages_deployment_status, t_pages_health_check, t_participation_stats, t_pending_deployment, t_porter_author, t_porter_large_file, + t_prevent_self_review, t_private_user, t_private_vulnerability_report_create, t_project, @@ -228,6 +238,8 @@ import { t_review_custom_gates_comment_required, t_review_custom_gates_state_required, t_root, + t_rule_suite, + t_rule_suites, t_runner, t_runner_application, t_runner_label, @@ -236,6 +248,7 @@ import { t_secret_scanning_alert_resolution_comment, t_secret_scanning_alert_state, t_secret_scanning_location, + t_security_advisory_ecosystems, t_selected_actions, t_short_blob, t_short_branch, @@ -309,19 +322,7 @@ export class ApiClient extends AbstractAxiosClient { ghsaId?: string type?: "reviewed" | "malware" | "unreviewed" cveId?: string - ecosystem?: - | "actions" - | "composer" - | "erlang" - | "go" - | "maven" - | "npm" - | "nuget" - | "other" - | "pip" - | "pub" - | "rubygems" - | "rust" + ecosystem?: t_security_advisory_ecosystems severity?: "unknown" | "low" | "medium" | "high" | "critical" cwes?: string | string[] isWithdrawn?: boolean @@ -1052,6 +1053,7 @@ export class ApiClient extends AbstractAxiosClient { perPage?: number before?: string after?: string + validity?: string }, timeout?: number, opts?: AxiosRequestConfig, @@ -1066,6 +1068,7 @@ export class ApiClient extends AbstractAxiosClient { per_page: p["perPage"], before: p["before"], after: p["after"], + validity: p["validity"], }) return this.axios.request({ @@ -2011,6 +2014,24 @@ export class ApiClient extends AbstractAxiosClient { }) } + async activityMarkThreadAsDone( + p: { + threadId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/notifications/threads/${p["threadId"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "DELETE", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async activityGetThreadSubscriptionForAuthenticatedUser( p: { threadId: number @@ -3685,7 +3706,7 @@ export class ApiClient extends AbstractAxiosClient { }) } - async copilotAddCopilotForBusinessSeatsForTeams( + async copilotAddCopilotSeatsForTeams( p: { org: string requestBody: { @@ -3743,7 +3764,7 @@ export class ApiClient extends AbstractAxiosClient { }) } - async copilotAddCopilotForBusinessSeatsForUsers( + async copilotAddCopilotSeatsForUsers( p: { org: string requestBody: { @@ -4517,7 +4538,7 @@ export class ApiClient extends AbstractAxiosClient { requestBody?: { email?: string invitee_id?: number - role?: "admin" | "direct_member" | "billing_manager" + role?: "admin" | "direct_member" | "billing_manager" | "reinstate" team_ids?: number[] } }, @@ -4759,7 +4780,7 @@ export class ApiClient extends AbstractAxiosClient { }) } - async copilotGetCopilotSeatAssignmentDetailsForUser( + async copilotGetCopilotSeatDetailsForUser( p: { org: string username: string @@ -5002,25 +5023,40 @@ export class ApiClient extends AbstractAxiosClient { }) } - async orgsListOutsideCollaborators( + async orgsListOrganizationFineGrainedPermissions( p: { org: string - filter?: "2fa_disabled" | "all" - perPage?: number - page?: number }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/orgs/${p["org"]}/outside_collaborators` - const query = this._query({ - filter: p["filter"], - per_page: p["perPage"], - page: p["page"], + ): Promise> { + const url = `/orgs/${p["org"]}/organization-fine-grained-permissions` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), }) + } + + async orgsListOrgRoles( + p: { + org: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + roles?: t_organization_role[] + total_count?: number + }> + > { + const url = `/orgs/${p["org"]}/organization-roles` return this.axios.request({ - url: url + query, + url: url, baseURL: this.basePath, method: "GET", ...(timeout ? { timeout } : {}), @@ -5028,25 +5064,26 @@ export class ApiClient extends AbstractAxiosClient { }) } - async orgsConvertMemberToOutsideCollaborator( + async orgsCreateCustomOrganizationRole( p: { org: string - username: string - requestBody?: { - async?: boolean + requestBody: { + description?: string + name: string + permissions: string[] } }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise | AxiosResponse> { - const url = `/orgs/${p["org"]}/outside_collaborators/${p["username"]}` + ): Promise> { + const url = `/orgs/${p["org"]}/organization-roles` const headers = this._headers({ "Content-Type": "application/json" }) const body = JSON.stringify(p.requestBody) return this.axios.request({ url: url, baseURL: this.basePath, - method: "PUT", + method: "POST", headers, data: body, ...(timeout ? { timeout } : {}), @@ -5054,15 +5091,15 @@ export class ApiClient extends AbstractAxiosClient { }) } - async orgsRemoveOutsideCollaborator( + async orgsRevokeAllOrgRolesTeam( p: { org: string - username: string + teamSlug: string }, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { - const url = `/orgs/${p["org"]}/outside_collaborators/${p["username"]}` + const url = `/orgs/${p["org"]}/organization-roles/teams/${p["teamSlug"]}` return this.axios.request({ url: url, @@ -5073,82 +5110,55 @@ export class ApiClient extends AbstractAxiosClient { }) } - async packagesListPackagesForOrganization( + async orgsAssignTeamToOrgRole( p: { - packageType: - | "npm" - | "maven" - | "rubygems" - | "docker" - | "nuget" - | "container" org: string - visibility?: "public" | "private" | "internal" - page?: number - perPage?: number + teamSlug: string + roleId: number }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/orgs/${p["org"]}/packages` - const query = this._query({ - package_type: p["packageType"], - visibility: p["visibility"], - page: p["page"], - per_page: p["perPage"], - }) + ): Promise> { + const url = `/orgs/${p["org"]}/organization-roles/teams/${p["teamSlug"]}/${p["roleId"]}` return this.axios.request({ - url: url + query, + url: url, baseURL: this.basePath, - method: "GET", + method: "PUT", ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) } - async packagesGetPackageForOrganization( + async orgsRevokeOrgRoleTeam( p: { - packageType: - | "npm" - | "maven" - | "rubygems" - | "docker" - | "nuget" - | "container" - packageName: string org: string + teamSlug: string + roleId: number }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}` + ): Promise> { + const url = `/orgs/${p["org"]}/organization-roles/teams/${p["teamSlug"]}/${p["roleId"]}` return this.axios.request({ url: url, baseURL: this.basePath, - method: "GET", + method: "DELETE", ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) } - async packagesDeletePackageForOrg( + async orgsRevokeAllOrgRolesUser( p: { - packageType: - | "npm" - | "maven" - | "rubygems" - | "docker" - | "nuget" - | "container" - packageName: string org: string + username: string }, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { - const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}` + const url = `/orgs/${p["org"]}/organization-roles/users/${p["username"]}` return this.axios.request({ url: url, @@ -5159,85 +5169,55 @@ export class ApiClient extends AbstractAxiosClient { }) } - async packagesRestorePackageForOrg( + async orgsAssignUserToOrgRole( p: { - packageType: - | "npm" - | "maven" - | "rubygems" - | "docker" - | "nuget" - | "container" - packageName: string org: string - token?: string + username: string + roleId: number }, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { - const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/restore` - const query = this._query({ token: p["token"] }) + const url = `/orgs/${p["org"]}/organization-roles/users/${p["username"]}/${p["roleId"]}` return this.axios.request({ - url: url + query, + url: url, baseURL: this.basePath, - method: "POST", + method: "PUT", ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) } - async packagesGetAllPackageVersionsForPackageOwnedByOrg( + async orgsRevokeOrgRoleUser( p: { - packageType: - | "npm" - | "maven" - | "rubygems" - | "docker" - | "nuget" - | "container" - packageName: string org: string - page?: number - perPage?: number - state?: "active" | "deleted" + username: string + roleId: number }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions` - const query = this._query({ - page: p["page"], - per_page: p["perPage"], - state: p["state"], - }) + ): Promise> { + const url = `/orgs/${p["org"]}/organization-roles/users/${p["username"]}/${p["roleId"]}` return this.axios.request({ - url: url + query, + url: url, baseURL: this.basePath, - method: "GET", + method: "DELETE", ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) } - async packagesGetPackageVersionForOrganization( + async orgsGetOrgRole( p: { - packageType: - | "npm" - | "maven" - | "rubygems" - | "docker" - | "nuget" - | "container" - packageName: string org: string - packageVersionId: number + roleId: number }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}` + ): Promise> { + const url = `/orgs/${p["org"]}/organization-roles/${p["roleId"]}` return this.axios.request({ url: url, @@ -5248,90 +5228,65 @@ export class ApiClient extends AbstractAxiosClient { }) } - async packagesDeletePackageVersionForOrg( + async orgsPatchCustomOrganizationRole( p: { - packageType: - | "npm" - | "maven" - | "rubygems" - | "docker" - | "nuget" - | "container" - packageName: string org: string - packageVersionId: number + roleId: number + requestBody: { + description?: string + name?: string + permissions?: string[] + } }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}` + ): Promise> { + const url = `/orgs/${p["org"]}/organization-roles/${p["roleId"]}` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) return this.axios.request({ url: url, baseURL: this.basePath, - method: "DELETE", + method: "PATCH", + headers, + data: body, ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) } - async packagesRestorePackageVersionForOrg( + async orgsDeleteCustomOrganizationRole( p: { - packageType: - | "npm" - | "maven" - | "rubygems" - | "docker" - | "nuget" - | "container" - packageName: string org: string - packageVersionId: number + roleId: number }, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { - const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}/restore` + const url = `/orgs/${p["org"]}/organization-roles/${p["roleId"]}` return this.axios.request({ url: url, baseURL: this.basePath, - method: "POST", + method: "DELETE", ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) } - async orgsListPatGrantRequests( + async orgsListOrgRoleTeams( p: { org: string + roleId: number perPage?: number page?: number - sort?: "created_at" - direction?: "asc" | "desc" - owner?: string[] - repository?: string - permission?: string - lastUsedBefore?: string - lastUsedAfter?: string }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise< - AxiosResponse - > { - const url = `/orgs/${p["org"]}/personal-access-token-requests` - const query = this._query({ - per_page: p["perPage"], - page: p["page"], - sort: p["sort"], - direction: p["direction"], - owner: p["owner"], - repository: p["repository"], - permission: p["permission"], - last_used_before: p["lastUsedBefore"], - last_used_after: p["lastUsedAfter"], - }) + ): Promise> { + const url = `/orgs/${p["org"]}/organization-roles/${p["roleId"]}/teams` + const query = this._query({ per_page: p["perPage"], page: p["page"] }) return this.axios.request({ url: url + query, @@ -5342,32 +5297,394 @@ export class ApiClient extends AbstractAxiosClient { }) } - async orgsReviewPatGrantRequestsInBulk( + async orgsListOrgRoleUsers( p: { org: string - requestBody: { - action: "approve" | "deny" - pat_request_ids?: number[] - reason?: string | null - } + roleId: number + perPage?: number + page?: number }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise< - AxiosResponse<{ - [key: string]: unknown | undefined - }> - > { - const url = `/orgs/${p["org"]}/personal-access-token-requests` - const headers = this._headers({ "Content-Type": "application/json" }) - const body = JSON.stringify(p.requestBody) + ): Promise> { + const url = `/orgs/${p["org"]}/organization-roles/${p["roleId"]}/users` + const query = this._query({ per_page: p["perPage"], page: p["page"] }) return this.axios.request({ - url: url, + url: url + query, baseURL: this.basePath, - method: "POST", - headers, - data: body, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsListOutsideCollaborators( + p: { + org: string + filter?: "2fa_disabled" | "all" + perPage?: number + page?: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/outside_collaborators` + const query = this._query({ + filter: p["filter"], + per_page: p["perPage"], + page: p["page"], + }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsConvertMemberToOutsideCollaborator( + p: { + org: string + username: string + requestBody?: { + async?: boolean + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise | AxiosResponse> { + const url = `/orgs/${p["org"]}/outside_collaborators/${p["username"]}` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "PUT", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsRemoveOutsideCollaborator( + p: { + org: string + username: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/outside_collaborators/${p["username"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "DELETE", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async packagesListPackagesForOrganization( + p: { + packageType: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container" + org: string + visibility?: "public" | "private" | "internal" + page?: number + perPage?: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/packages` + const query = this._query({ + package_type: p["packageType"], + visibility: p["visibility"], + page: p["page"], + per_page: p["perPage"], + }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async packagesGetPackageForOrganization( + p: { + packageType: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container" + packageName: string + org: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async packagesDeletePackageForOrg( + p: { + packageType: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container" + packageName: string + org: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "DELETE", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async packagesRestorePackageForOrg( + p: { + packageType: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container" + packageName: string + org: string + token?: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/restore` + const query = this._query({ token: p["token"] }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "POST", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async packagesGetAllPackageVersionsForPackageOwnedByOrg( + p: { + packageType: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container" + packageName: string + org: string + page?: number + perPage?: number + state?: "active" | "deleted" + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions` + const query = this._query({ + page: p["page"], + per_page: p["perPage"], + state: p["state"], + }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async packagesGetPackageVersionForOrganization( + p: { + packageType: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container" + packageName: string + org: string + packageVersionId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async packagesDeletePackageVersionForOrg( + p: { + packageType: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container" + packageName: string + org: string + packageVersionId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "DELETE", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async packagesRestorePackageVersionForOrg( + p: { + packageType: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container" + packageName: string + org: string + packageVersionId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/packages/${p["packageType"]}/${p["packageName"]}/versions/${p["packageVersionId"]}/restore` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsListPatGrantRequests( + p: { + org: string + perPage?: number + page?: number + sort?: "created_at" + direction?: "asc" | "desc" + owner?: string[] + repository?: string + permission?: string + lastUsedBefore?: string + lastUsedAfter?: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse + > { + const url = `/orgs/${p["org"]}/personal-access-token-requests` + const query = this._query({ + per_page: p["perPage"], + page: p["page"], + sort: p["sort"], + direction: p["direction"], + owner: p["owner"], + repository: p["repository"], + permission: p["permission"], + last_used_before: p["lastUsedBefore"], + last_used_after: p["lastUsedAfter"], + }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsReviewPatGrantRequestsInBulk( + p: { + org: string + requestBody: { + action: "approve" | "deny" + pat_request_ids?: number[] + reason?: string | null + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + [key: string]: unknown | undefined + }> + > { + const url = `/orgs/${p["org"]}/personal-access-token-requests` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) @@ -5590,6 +5907,169 @@ export class ApiClient extends AbstractAxiosClient { }) } + async orgsGetAllCustomProperties( + p: { + org: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/properties/schema` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsCreateOrUpdateCustomProperties( + p: { + org: string + requestBody: { + properties: t_org_custom_property[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/properties/schema` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "PATCH", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsGetCustomProperty( + p: { + org: string + customPropertyName: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/properties/schema/${p["customPropertyName"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsCreateOrUpdateCustomProperty( + p: { + org: string + customPropertyName: string + requestBody: { + allowed_values?: string[] | null + default_value?: string | string[] | null + description?: string | null + required?: boolean + value_type: "string" | "single_select" + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/properties/schema/${p["customPropertyName"]}` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "PUT", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsRemoveCustomProperty( + p: { + org: string + customPropertyName: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/properties/schema/${p["customPropertyName"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "DELETE", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsListCustomPropertiesValuesForRepos( + p: { + org: string + perPage?: number + page?: number + repositoryQuery?: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/properties/values` + const query = this._query({ + per_page: p["perPage"], + page: p["page"], + repository_query: p["repositoryQuery"], + }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async orgsCreateOrUpdateCustomPropertiesValuesForRepos( + p: { + org: string + requestBody: { + properties: t_custom_property_value[] + repository_names: string[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/properties/values` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "PATCH", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async orgsListPublicMembers( p: { org: string @@ -5707,6 +6187,9 @@ export class ApiClient extends AbstractAxiosClient { allow_rebase_merge?: boolean allow_squash_merge?: boolean auto_init?: boolean + custom_properties?: { + [key: string]: unknown | undefined + } delete_branch_on_merge?: boolean description?: string gitignore_template?: string @@ -5730,7 +6213,7 @@ export class ApiClient extends AbstractAxiosClient { }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { + ): Promise> { const url = `/orgs/${p["org"]}/repos` const headers = this._headers({ "Content-Type": "application/json" }) const body = JSON.stringify(p.requestBody) @@ -5797,6 +6280,57 @@ export class ApiClient extends AbstractAxiosClient { }) } + async reposGetOrgRuleSuites( + p: { + org: string + repositoryName?: number + timePeriod?: "hour" | "day" | "week" | "month" + actorName?: string + ruleSuiteResult?: "pass" | "fail" | "bypass" | "all" + perPage?: number + page?: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/rulesets/rule-suites` + const query = this._query({ + repository_name: p["repositoryName"], + time_period: p["timePeriod"], + actor_name: p["actorName"], + rule_suite_result: p["ruleSuiteResult"], + per_page: p["perPage"], + page: p["page"], + }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposGetOrgRuleSuite( + p: { + org: string + ruleSuiteId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/orgs/${p["org"]}/rulesets/rule-suites/${p["ruleSuiteId"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async reposGetOrgRuleset( p: { org: string @@ -5878,6 +6412,7 @@ export class ApiClient extends AbstractAxiosClient { perPage?: number before?: string after?: string + validity?: string }, timeout?: number, opts?: AxiosRequestConfig, @@ -5893,6 +6428,7 @@ export class ApiClient extends AbstractAxiosClient { per_page: p["perPage"], before: p["before"], after: p["after"], + validity: p["validity"], }) return this.axios.request({ @@ -8637,6 +9173,26 @@ export class ApiClient extends AbstractAxiosClient { }) } + async actionsForceCancelWorkflowRun( + p: { + owner: string + repo: string + runId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/actions/runs/${p["runId"]}/force-cancel` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async actionsListJobsForWorkflowRun( p: { owner: string @@ -9356,16 +9912,14 @@ export class ApiClient extends AbstractAxiosClient { p: { owner: string repo: string - page?: number }, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { const url = `/repos/${p["owner"]}/${p["repo"]}/autolinks` - const query = this._query({ page: p["page"] }) return this.axios.request({ - url: url + query, + url: url, baseURL: this.basePath, method: "GET", ...(timeout ? { timeout } : {}), @@ -10513,7 +11067,13 @@ export class ApiClient extends AbstractAxiosClient { title?: string } started_at?: string - status?: "queued" | "in_progress" | "completed" + status?: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" } }, timeout?: number, @@ -11000,7 +11560,7 @@ export class ApiClient extends AbstractAxiosClient { requestBody: { checkout_uri?: string commit_sha: t_code_scanning_analysis_commit_sha - ref: t_code_scanning_ref + ref: t_code_scanning_ref_full sarif: t_code_scanning_analysis_sarif_file started_at?: string tool_name?: string @@ -11201,17 +11761,42 @@ export class ApiClient extends AbstractAxiosClient { }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise< - AxiosResponse<{ - billable_owner?: t_simple_user - defaults?: { - devcontainer_path: string | null - location: string - } - }> - > { - const url = `/repos/${p["owner"]}/${p["repo"]}/codespaces/new` - const query = this._query({ ref: p["ref"], client_ip: p["clientIp"] }) + ): Promise< + AxiosResponse<{ + billable_owner?: t_simple_user + defaults?: { + devcontainer_path: string | null + location: string + } + }> + > { + const url = `/repos/${p["owner"]}/${p["repo"]}/codespaces/new` + const query = this._query({ ref: p["ref"], client_ip: p["clientIp"] }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async codespacesCheckPermissionsForDevcontainer( + p: { + owner: string + repo: string + ref: string + devcontainerPath: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/codespaces/permissions_check` + const query = this._query({ + ref: p["ref"], + devcontainer_path: p["devcontainerPath"], + }) return this.axios.request({ url: url + query, @@ -12656,6 +13241,7 @@ export class ApiClient extends AbstractAxiosClient { environmentName: string requestBody?: { deployment_branch_policy?: t_deployment_branch_policy_settings + prevent_self_review?: t_prevent_self_review reviewers?: | { id?: number @@ -12736,37 +13322,275 @@ export class ApiClient extends AbstractAxiosClient { owner: string repo: string environmentName: string - requestBody: t_deployment_branch_policy_name_pattern + requestBody: t_deployment_branch_policy_name_pattern_with_type + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposGetDeploymentBranchPolicy( + p: { + owner: string + repo: string + environmentName: string + branchPolicyId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposUpdateDeploymentBranchPolicy( + p: { + owner: string + repo: string + environmentName: string + branchPolicyId: number + requestBody: t_deployment_branch_policy_name_pattern + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "PUT", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposDeleteDeploymentBranchPolicy( + p: { + owner: string + repo: string + environmentName: string + branchPolicyId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "DELETE", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposGetAllDeploymentProtectionRules( + p: { + environmentName: string + repo: string + owner: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + custom_deployment_protection_rules?: t_deployment_protection_rule[] + total_count?: number + }> + > { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposCreateDeploymentProtectionRule( + p: { + environmentName: string + repo: string + owner: string + requestBody: { + integration_id?: number + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposListCustomDeploymentRuleIntegrations( + p: { + environmentName: string + repo: string + owner: string + page?: number + perPage?: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + available_custom_deployment_protection_rule_integrations?: t_custom_deployment_rule_app[] + total_count?: number + }> + > { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/apps` + const query = this._query({ page: p["page"], per_page: p["perPage"] }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposGetCustomDeploymentProtectionRule( + p: { + owner: string + repo: string + environmentName: string + protectionRuleId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/${p["protectionRuleId"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposDisableDeploymentProtectionRule( + p: { + environmentName: string + repo: string + owner: string + protectionRuleId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/${p["protectionRuleId"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "DELETE", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async actionsListEnvironmentSecrets( + p: { + owner: string + repo: string + environmentName: string + perPage?: number + page?: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + secrets: t_actions_secret[] + total_count: number + }> + > { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets` + const query = this._query({ per_page: p["perPage"], page: p["page"] }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async actionsGetEnvironmentPublicKey( + p: { + owner: string + repo: string + environmentName: string }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies` - const headers = this._headers({ "Content-Type": "application/json" }) - const body = JSON.stringify(p.requestBody) + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/public-key` return this.axios.request({ url: url, baseURL: this.basePath, - method: "POST", - headers, - data: body, + method: "GET", ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) } - async reposGetDeploymentBranchPolicy( + async actionsGetEnvironmentSecret( p: { owner: string repo: string environmentName: string - branchPolicyId: number + secretName: string }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}` + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` return this.axios.request({ url: url, @@ -12777,18 +13601,21 @@ export class ApiClient extends AbstractAxiosClient { }) } - async reposUpdateDeploymentBranchPolicy( + async actionsCreateOrUpdateEnvironmentSecret( p: { owner: string repo: string environmentName: string - branchPolicyId: number - requestBody: t_deployment_branch_policy_name_pattern + secretName: string + requestBody: { + encrypted_value: string + key_id: string + } }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}` + ): Promise | AxiosResponse> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` const headers = this._headers({ "Content-Type": "application/json" }) const body = JSON.stringify(p.requestBody) @@ -12803,17 +13630,17 @@ export class ApiClient extends AbstractAxiosClient { }) } - async reposDeleteDeploymentBranchPolicy( + async actionsDeleteEnvironmentSecret( p: { owner: string repo: string environmentName: string - branchPolicyId: number + secretName: string }, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { - const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment-branch-policies/${p["branchPolicyId"]}` + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` return this.axios.request({ url: url, @@ -12824,24 +13651,27 @@ export class ApiClient extends AbstractAxiosClient { }) } - async reposGetAllDeploymentProtectionRules( + async actionsListEnvironmentVariables( p: { - environmentName: string - repo: string owner: string + repo: string + environmentName: string + perPage?: number + page?: number }, timeout?: number, opts?: AxiosRequestConfig, ): Promise< AxiosResponse<{ - custom_deployment_protection_rules?: t_deployment_protection_rule[] - total_count?: number + total_count: number + variables: t_actions_variable[] }> > { - const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules` + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables` + const query = this._query({ per_page: p["perPage"], page: p["page"] }) return this.axios.request({ - url: url, + url: url + query, baseURL: this.basePath, method: "GET", ...(timeout ? { timeout } : {}), @@ -12849,19 +13679,20 @@ export class ApiClient extends AbstractAxiosClient { }) } - async reposCreateDeploymentProtectionRule( + async actionsCreateEnvironmentVariable( p: { - environmentName: string - repo: string owner: string + repo: string + environmentName: string requestBody: { - integration_id?: number + name: string + value: string } }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules` + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables` const headers = this._headers({ "Content-Type": "application/json" }) const body = JSON.stringify(p.requestBody) @@ -12876,27 +13707,20 @@ export class ApiClient extends AbstractAxiosClient { }) } - async reposListCustomDeploymentRuleIntegrations( + async actionsGetEnvironmentVariable( p: { - environmentName: string - repo: string owner: string - page?: number - perPage?: number + repo: string + environmentName: string + name: string }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise< - AxiosResponse<{ - available_custom_deployment_protection_rule_integrations?: t_custom_deployment_rule_app[] - total_count?: number - }> - > { - const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/apps` - const query = this._query({ page: p["page"], per_page: p["perPage"] }) + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables/${p["name"]}` return this.axios.request({ - url: url + query, + url: url, baseURL: this.basePath, method: "GET", ...(timeout ? { timeout } : {}), @@ -12904,38 +13728,46 @@ export class ApiClient extends AbstractAxiosClient { }) } - async reposGetCustomDeploymentProtectionRule( + async actionsUpdateEnvironmentVariable( p: { owner: string repo: string + name: string environmentName: string - protectionRuleId: number + requestBody: { + name?: string + value?: string + } }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/${p["protectionRuleId"]}` + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables/${p["name"]}` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) return this.axios.request({ url: url, baseURL: this.basePath, - method: "GET", + method: "PATCH", + headers, + data: body, ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) } - async reposDisableDeploymentProtectionRule( + async actionsDeleteEnvironmentVariable( p: { - environmentName: string - repo: string owner: string - protectionRuleId: number + repo: string + name: string + environmentName: string }, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { - const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/deployment_protection_rules/${p["protectionRuleId"]}` + const url = `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables/${p["name"]}` return this.axios.request({ url: url, @@ -13383,10 +14215,8 @@ export class ApiClient extends AbstractAxiosClient { active?: boolean config?: { content_type?: t_webhook_config_content_type - digest?: string insecure_ssl?: t_webhook_config_insecure_ssl secret?: t_webhook_config_secret - token?: string url?: t_webhook_config_url } events?: string[] @@ -13439,14 +14269,7 @@ export class ApiClient extends AbstractAxiosClient { requestBody: { active?: boolean add_events?: string[] - config?: { - address?: string - content_type?: t_webhook_config_content_type - insecure_ssl?: t_webhook_config_insecure_ssl - room?: string - secret?: t_webhook_config_secret - url: t_webhook_config_url - } + config?: t_webhook_config events?: string[] remove_events?: string[] } @@ -15057,14 +15880,16 @@ export class ApiClient extends AbstractAxiosClient { p: { owner: string repo: string + ref?: t_code_scanning_ref }, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { const url = `/repos/${p["owner"]}/${p["repo"]}/license` + const query = this._query({ ref: p["ref"] }) return this.axios.request({ - url: url, + url: url + query, baseURL: this.basePath, method: "GET", ...(timeout ? { timeout } : {}), @@ -15533,7 +16358,8 @@ export class ApiClient extends AbstractAxiosClient { owner: string repo: string requestBody: { - artifact_url: string + artifact_id?: number + artifact_url?: string environment?: string oidc_token: string pages_build_version: string @@ -15542,7 +16368,7 @@ export class ApiClient extends AbstractAxiosClient { timeout?: number, opts?: AxiosRequestConfig, ): Promise> { - const url = `/repos/${p["owner"]}/${p["repo"]}/pages/deployment` + const url = `/repos/${p["owner"]}/${p["repo"]}/pages/deployments` const headers = this._headers({ "Content-Type": "application/json" }) const body = JSON.stringify(p.requestBody) @@ -15557,6 +16383,46 @@ export class ApiClient extends AbstractAxiosClient { }) } + async reposGetPagesDeployment( + p: { + owner: string + repo: string + pagesDeploymentId: number | string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/pages/deployments/${p["pagesDeploymentId"]}` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposCancelPagesDeployment( + p: { + owner: string + repo: string + pagesDeploymentId: number | string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/pages/deployments/${p["pagesDeploymentId"]}/cancel` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async reposGetPagesHealthCheck( p: { owner: string @@ -15578,6 +16444,29 @@ export class ApiClient extends AbstractAxiosClient { }) } + async reposCheckPrivateVulnerabilityReporting( + p: { + owner: string + repo: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + enabled: boolean + }> + > { + const url = `/repos/${p["owner"]}/${p["repo"]}/private-vulnerability-reporting` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async reposEnablePrivateVulnerabilityReporting( p: { owner: string @@ -15670,6 +16559,51 @@ export class ApiClient extends AbstractAxiosClient { }) } + async reposGetCustomPropertiesValues( + p: { + owner: string + repo: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/properties/values` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposCreateOrUpdateCustomPropertiesValues( + p: { + owner: string + repo: string + requestBody: { + properties: t_custom_property_value[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/properties/values` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "PATCH", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async pullsList( p: { owner: string @@ -17032,17 +17966,70 @@ export class ApiClient extends AbstractAxiosClient { }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repos/${p["owner"]}/${p["repo"]}/rulesets` - const headers = this._headers({ "Content-Type": "application/json" }) - const body = JSON.stringify(p.requestBody) + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/rulesets` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposGetRepoRuleSuites( + p: { + owner: string + repo: string + ref?: string + timePeriod?: "hour" | "day" | "week" | "month" + actorName?: string + ruleSuiteResult?: "pass" | "fail" | "bypass" | "all" + perPage?: number + page?: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/rulesets/rule-suites` + const query = this._query({ + ref: p["ref"], + time_period: p["timePeriod"], + actor_name: p["actorName"], + rule_suite_result: p["ruleSuiteResult"], + per_page: p["perPage"], + page: p["page"], + }) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async reposGetRepoRuleSuite( + p: { + owner: string + repo: string + ruleSuiteId: number + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/rulesets/rule-suites/${p["ruleSuiteId"]}` return this.axios.request({ url: url, baseURL: this.basePath, - method: "POST", - headers, - data: body, + method: "GET", ...(timeout ? { timeout } : {}), ...(opts ?? {}), }) @@ -17135,6 +18122,7 @@ export class ApiClient extends AbstractAxiosClient { perPage?: number before?: string after?: string + validity?: string }, timeout?: number, opts?: AxiosRequestConfig, @@ -17150,6 +18138,7 @@ export class ApiClient extends AbstractAxiosClient { per_page: p["perPage"], before: p["before"], after: p["after"], + validity: p["validity"], }) return this.axios.request({ @@ -17383,6 +18372,26 @@ export class ApiClient extends AbstractAxiosClient { }) } + async securityAdvisoriesCreateFork( + p: { + owner: string + repo: string + ghsaId: string + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/repos/${p["owner"]}/${p["repo"]}/security-advisories/${p["ghsaId"]}/forks` + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async activityListStargazersForRepo( p: { owner: string @@ -18011,7 +19020,7 @@ export class ApiClient extends AbstractAxiosClient { }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { + ): Promise> { const url = `/repos/${p["templateOwner"]}/${p["templateRepo"]}/generate` const headers = this._headers({ "Content-Type": "application/json" }) const body = JSON.stringify(p.requestBody) @@ -18046,242 +19055,6 @@ export class ApiClient extends AbstractAxiosClient { }) } - async actionsListEnvironmentSecrets( - p: { - repositoryId: number - environmentName: string - perPage?: number - page?: number - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise< - AxiosResponse<{ - secrets: t_actions_secret[] - total_count: number - }> - > { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets` - const query = this._query({ per_page: p["perPage"], page: p["page"] }) - - return this.axios.request({ - url: url + query, - baseURL: this.basePath, - method: "GET", - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async actionsGetEnvironmentPublicKey( - p: { - repositoryId: number - environmentName: string - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/public-key` - - return this.axios.request({ - url: url, - baseURL: this.basePath, - method: "GET", - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async actionsGetEnvironmentSecret( - p: { - repositoryId: number - environmentName: string - secretName: string - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` - - return this.axios.request({ - url: url, - baseURL: this.basePath, - method: "GET", - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async actionsCreateOrUpdateEnvironmentSecret( - p: { - repositoryId: number - environmentName: string - secretName: string - requestBody: { - encrypted_value: string - key_id: string - } - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise | AxiosResponse> { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` - const headers = this._headers({ "Content-Type": "application/json" }) - const body = JSON.stringify(p.requestBody) - - return this.axios.request({ - url: url, - baseURL: this.basePath, - method: "PUT", - headers, - data: body, - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async actionsDeleteEnvironmentSecret( - p: { - repositoryId: number - environmentName: string - secretName: string - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` - - return this.axios.request({ - url: url, - baseURL: this.basePath, - method: "DELETE", - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async actionsListEnvironmentVariables( - p: { - repositoryId: number - environmentName: string - perPage?: number - page?: number - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise< - AxiosResponse<{ - total_count: number - variables: t_actions_variable[] - }> - > { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables` - const query = this._query({ per_page: p["perPage"], page: p["page"] }) - - return this.axios.request({ - url: url + query, - baseURL: this.basePath, - method: "GET", - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async actionsCreateEnvironmentVariable( - p: { - repositoryId: number - environmentName: string - requestBody: { - name: string - value: string - } - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables` - const headers = this._headers({ "Content-Type": "application/json" }) - const body = JSON.stringify(p.requestBody) - - return this.axios.request({ - url: url, - baseURL: this.basePath, - method: "POST", - headers, - data: body, - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async actionsGetEnvironmentVariable( - p: { - repositoryId: number - environmentName: string - name: string - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables/${p["name"]}` - - return this.axios.request({ - url: url, - baseURL: this.basePath, - method: "GET", - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async actionsUpdateEnvironmentVariable( - p: { - repositoryId: number - name: string - environmentName: string - requestBody: { - name?: string - value?: string - } - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables/${p["name"]}` - const headers = this._headers({ "Content-Type": "application/json" }) - const body = JSON.stringify(p.requestBody) - - return this.axios.request({ - url: url, - baseURL: this.basePath, - method: "PATCH", - headers, - data: body, - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async actionsDeleteEnvironmentVariable( - p: { - repositoryId: number - name: string - environmentName: string - }, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise> { - const url = `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables/${p["name"]}` - - return this.axios.request({ - url: url, - baseURL: this.basePath, - method: "DELETE", - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - async searchCode( p: { q: string @@ -21084,7 +21857,7 @@ export class ApiClient extends AbstractAxiosClient { }, timeout?: number, opts?: AxiosRequestConfig, - ): Promise> { + ): Promise> { const url = `/user/repos` const headers = this._headers({ "Content-Type": "application/json" }) const body = JSON.stringify(p.requestBody) diff --git a/integration-tests/typescript-axios/src/generated/api.github.com.yaml/models.ts b/integration-tests/typescript-axios/src/generated/api.github.com.yaml/models.ts index 850136f4..0eda0d0f 100644 --- a/integration-tests/typescript-axios/src/generated/api.github.com.yaml/models.ts +++ b/integration-tests/typescript-axios/src/generated/api.github.com.yaml/models.ts @@ -177,6 +177,7 @@ export type t_api_overview = { api?: string[] dependabot?: string[] domains?: { + actions?: string[] codespaces?: string[] copilot?: string[] packages?: string[] @@ -203,15 +204,26 @@ export type t_app_permissions = { actions?: "read" | "write" administration?: "read" | "write" checks?: "read" | "write" + codespaces?: "read" | "write" contents?: "read" | "write" + dependabot_secrets?: "read" | "write" deployments?: "read" | "write" + email_addresses?: "read" | "write" environments?: "read" | "write" + followers?: "read" | "write" + git_ssh_keys?: "read" | "write" + gpg_keys?: "read" | "write" + interaction_limits?: "read" | "write" issues?: "read" | "write" members?: "read" | "write" metadata?: "read" | "write" organization_administration?: "read" | "write" organization_announcement_banners?: "read" | "write" + organization_copilot_seat_management?: "write" + organization_custom_org_roles?: "read" | "write" + organization_custom_properties?: "read" | "write" | "admin" organization_custom_roles?: "read" | "write" + organization_events?: "read" organization_hooks?: "read" | "write" organization_packages?: "read" | "write" organization_personal_access_token_requests?: "read" | "write" @@ -223,13 +235,16 @@ export type t_app_permissions = { organization_user_blocking?: "read" | "write" packages?: "read" | "write" pages?: "read" | "write" + profile?: "write" pull_requests?: "read" | "write" + repository_custom_properties?: "read" | "write" repository_hooks?: "read" | "write" repository_projects?: "read" | "write" | "admin" secret_scanning_alerts?: "read" | "write" secrets?: "read" | "write" security_events?: "read" | "write" single_file?: "read" | "write" + starring?: "read" | "write" statuses?: "read" | "write" team_discussions?: "read" | "write" vulnerability_alerts?: "read" | "write" @@ -569,7 +584,13 @@ export type t_check_run = { } pull_requests: t_pull_request_minimal[] started_at: string | null - status: "queued" | "in_progress" | "completed" + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" url: string } @@ -600,7 +621,14 @@ export type t_check_suite = { repository: t_minimal_repository rerequestable?: boolean runs_rerequestable?: boolean - status: "queued" | "in_progress" | "completed" | null + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" + | null updated_at: string | null url: string | null } @@ -785,6 +813,7 @@ export type t_code_scanning_alert_rule_summary = { description?: string id?: string | null name?: string + security_severity_level?: "low" | "medium" | "high" | "critical" | null severity?: "none" | "note" | "warning" | "error" | null tags?: string[] | null } @@ -860,6 +889,7 @@ export type t_code_scanning_analysis_tool_version = string | null export type t_code_scanning_analysis_url = string export type t_code_scanning_codeql_database = { + commit_oid?: string | null content_type: string created_at: string id: number @@ -902,7 +932,7 @@ export type t_code_scanning_default_setup_update = { | "swift" )[] query_suite?: "default" | "extended" - state: "configured" | "not-configured" + state?: "configured" | "not-configured" } export type t_code_scanning_default_setup_update_response = { @@ -922,7 +952,7 @@ export type t_code_scanning_organization_alert_items = { most_recent_instance: t_code_scanning_alert_instance number: t_alert_number repository: t_simple_repository - rule: t_code_scanning_alert_rule + rule: t_code_scanning_alert_rule_summary state: t_code_scanning_alert_state tool: t_code_scanning_analysis_tool updated_at?: t_alert_updated_at @@ -931,6 +961,8 @@ export type t_code_scanning_organization_alert_items = { export type t_code_scanning_ref = string +export type t_code_scanning_ref_full = string + export type t_code_scanning_sarifs_receipt = { id?: t_code_scanning_analysis_sarif_id readonly url?: string @@ -1117,6 +1149,10 @@ export type t_codespaces_org_secret = { visibility: "all" | "private" | "selected" } +export type t_codespaces_permissions_check_for_devcontainer = { + accepted: boolean +} + export type t_codespaces_public_key = { created_at?: string id?: number @@ -1447,6 +1483,9 @@ export type t_converted_note_to_issue_issue_event = { } export type t_copilot_organization_details = { + cli?: "enabled" | "disabled" | "unconfigured" + ide_chat?: "enabled" | "disabled" | "unconfigured" + platform_chat?: "enabled" | "disabled" | "unconfigured" public_code_suggestions: "allow" | "block" | "unconfigured" | "unknown" seat_breakdown: t_copilot_seat_breakdown seat_management_setting: @@ -1467,9 +1506,7 @@ export type t_copilot_seat_breakdown = { } export type t_copilot_seat_details = { - assignee: { - [key: string]: unknown | undefined - } + assignee: t_simple_user | t_team | t_organization assigning_team?: t_team | null created_at: string last_activity_at?: string | null @@ -1485,6 +1522,11 @@ export type t_custom_deployment_rule_app = { slug: string } +export type t_custom_property_value = { + property_name: string + value: string | string[] | null +} + export type t_demilestoned_issue_event = { actor: t_simple_user commit_id: string | null @@ -1706,12 +1748,18 @@ export type t_deployment_branch_policy = { id?: number name?: string node_id?: string + type?: "branch" | "tag" } export type t_deployment_branch_policy_name_pattern = { name: string } +export type t_deployment_branch_policy_name_pattern_with_type = { + name: string + type?: "branch" | "tag" +} + export type t_deployment_branch_policy_settings = { custom_branch_policies: boolean protected_branches: boolean @@ -1830,6 +1878,7 @@ export type t_environment = { | { id: number node_id: string + prevent_self_review?: boolean reviewers?: { reviewer?: t_simple_user | t_team type?: t_deployment_reviewer_type @@ -1986,6 +2035,9 @@ export type t_full_repository = { contents_url: string contributors_url: string created_at: string + custom_properties?: { + [key: string]: unknown | undefined + } default_branch: string delete_branch_on_merge?: boolean deployments_url: string @@ -2003,7 +2055,7 @@ export type t_full_repository = { git_tags_url: string git_url: string has_discussions: boolean - has_downloads: boolean + has_downloads?: boolean has_issues: boolean has_pages: boolean has_projects: boolean @@ -2360,18 +2412,7 @@ export type t_gpg_key = { export type t_hook = { active: boolean - config: { - content_type?: t_webhook_config_content_type - digest?: string - email?: string - insecure_ssl?: t_webhook_config_insecure_ssl - password?: string - room?: string - secret?: t_webhook_config_secret - subdomain?: string - token?: string - url?: t_webhook_config_url - } + config: t_webhook_config created_at: string deliveries_url?: string events: string[] @@ -2802,7 +2843,13 @@ export type t_job = { runner_id: number | null runner_name: string | null started_at: string - status: "queued" | "in_progress" | "completed" + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" steps?: { completed_at?: string | null conclusion: string | null @@ -3524,12 +3571,10 @@ export type t_nullable_repository = { milestones_url: string mirror_url: string | null name: string - network_count?: number node_id: string notifications_url: string open_issues: number open_issues_count: number - organization?: t_nullable_simple_user owner: t_simple_user permissions?: { admin: boolean @@ -3550,127 +3595,12 @@ export type t_nullable_repository = { stargazers_url: string starred_at?: string statuses_url: string - subscribers_count?: number subscribers_url: string subscription_url: string svn_url: string tags_url: string teams_url: string temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK" - merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" - squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - use_squash_pr_title_as_default?: boolean - visibility?: string - watchers_count?: number - } | null topics?: string[] trees_url: string updated_at: string | null @@ -3756,6 +3686,16 @@ export type t_oidc_custom_sub_repo = { use_default: boolean } +export type t_org_custom_property = { + allowed_values?: string[] | null + default_value?: string | string[] | null + description?: string | null + property_name: string + required?: boolean + value_type: "string" | "single_select" + values_editable_by?: "org_actors" | "org_and_repo_actors" | null +} + export type t_org_hook = { active: boolean config: { @@ -3787,11 +3727,58 @@ export type t_org_membership = { user: t_nullable_simple_user } +export type t_org_repo_custom_property_values = { + properties: t_custom_property_value[] + repository_full_name: string + repository_id: number + repository_name: string +} + export type t_org_ruleset_conditions = | (t_repository_ruleset_conditions & t_repository_ruleset_conditions_repository_name_target) | (t_repository_ruleset_conditions & t_repository_ruleset_conditions_repository_id_target) + | (t_repository_ruleset_conditions & + t_repository_ruleset_conditions_repository_property_target) + +export type t_organization = { + avatar_url: string + blog?: string + company?: string + created_at: string + description: string | null + email?: string + events_url: string + followers: number + following: number + has_organization_projects: boolean + has_repository_projects: boolean + hooks_url: string + html_url: string + id: number + is_verified?: boolean + issues_url: string + location?: string + login: string + members_url: string + name?: string + node_id: string + plan?: { + filled_seats?: number + name?: string + private_repos?: number + seats?: number + space?: number + } + public_gists: number + public_members_url: string + public_repos: number + repos_url: string + type: string + updated_at: string + url: string +} export type t_organization_actions_secret = { created_at: string @@ -3818,6 +3805,11 @@ export type t_organization_dependabot_secret = { visibility: "all" | "private" | "selected" } +export type t_organization_fine_grained_permission = { + description: string + name: string +} + export type t_organization_full = { advanced_security_enabled_for_new_repositories?: boolean archived_at: string | null @@ -3944,6 +3936,16 @@ export type t_organization_programmatic_access_grant_request = { token_last_used_at: string | null } +export type t_organization_role = { + created_at: string + description?: string | null + id: number + name: string + organization: t_nullable_simple_user + permissions: string[] + updated_at: string +} + export type t_organization_secret_scanning_alert = { created_at?: t_alert_created_at html_url?: t_alert_html_url @@ -3963,6 +3965,7 @@ export type t_organization_secret_scanning_alert = { state?: t_secret_scanning_alert_state updated_at?: t_nullable_alert_updated_at url?: t_alert_url + validity?: "active" | "inactive" | "unknown" } export type t_organization_simple = { @@ -4062,11 +4065,27 @@ export type t_page_build_status = { } export type t_page_deployment = { + id: number | string page_url: string preview_url?: string status_url: string } +export type t_pages_deployment_status = { + status?: + | "deployment_in_progress" + | "syncing_files" + | "finished_file_sync" + | "updating_pages" + | "purging_cdn" + | "deployment_cancelled" + | "deployment_failed" + | "deployment_content_failed" + | "deployment_attempt_error" + | "deployment_lost" + | "succeed" +} + export type t_pages_health_check = { alt_domain?: { caa_error?: string | null @@ -4193,6 +4212,8 @@ export type t_porter_large_file = { size: number } +export type t_prevent_self_review = boolean + export type t_private_user = { avatar_url: string bio: string | null @@ -4248,6 +4269,7 @@ export type t_private_vulnerability_report_create = { cwe_ids?: string[] | null description: string severity?: "critical" | "high" | "medium" | "low" | null + start_private_fork?: boolean summary: string vulnerabilities?: | { @@ -5280,12 +5302,10 @@ export type t_repository = { milestones_url: string mirror_url: string | null name: string - network_count?: number node_id: string notifications_url: string open_issues: number open_issues_count: number - organization?: t_nullable_simple_user owner: t_simple_user permissions?: { admin: boolean @@ -5306,127 +5326,12 @@ export type t_repository = { stargazers_url: string starred_at?: string statuses_url: string - subscribers_count?: number subscribers_url: string subscription_url: string svn_url: string tags_url: string teams_url: string temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK" - merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" - squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - use_squash_pr_title_as_default?: boolean - visibility?: string - watchers_count?: number - } | null topics?: string[] trees_url: string updated_at: string | null @@ -5480,7 +5385,7 @@ export type t_repository_advisory = { } | null summary: string readonly updated_at: string | null - url: string + readonly url: string vulnerabilities: t_repository_advisory_vulnerability[] | null readonly withdrawn_at: string | null } @@ -5497,6 +5402,7 @@ export type t_repository_advisory_create = { cwe_ids?: string[] | null description: string severity?: "critical" | "high" | "medium" | "low" | null + start_private_fork?: boolean summary: string vulnerabilities: { package: { @@ -5586,6 +5492,7 @@ export type t_repository_rule = | t_repository_rule_committer_email_pattern | t_repository_rule_branch_name_pattern | t_repository_rule_tag_name_pattern + | t_repository_rule_workflows export type t_repository_rule_branch_name_pattern = { parameters?: { @@ -5651,6 +5558,7 @@ export type t_repository_rule_detailed = | (t_repository_rule_committer_email_pattern & t_repository_rule_ruleset_info) | (t_repository_rule_branch_name_pattern & t_repository_rule_ruleset_info) | (t_repository_rule_tag_name_pattern & t_repository_rule_ruleset_info) + | (t_repository_rule_workflows & t_repository_rule_ruleset_info) export type t_repository_rule_enforcement = "disabled" | "active" | "evaluate" @@ -5663,6 +5571,13 @@ export type t_repository_rule_params_status_check_configuration = { integration_id?: number } +export type t_repository_rule_params_workflow_file_reference = { + path: string + ref?: string + repository_id: number + sha?: string +} + export type t_repository_rule_pull_request = { parameters?: { dismiss_stale_reviews_on_push: boolean @@ -5720,6 +5635,13 @@ export type t_repository_rule_update = { type: "update" } +export type t_repository_rule_workflows = { + parameters?: { + workflows: t_repository_rule_params_workflow_file_reference[] + } + type: "workflows" +} + export type t_repository_ruleset = { _links?: { html?: { @@ -5730,7 +5652,7 @@ export type t_repository_ruleset = { } } bypass_actors?: t_repository_ruleset_bypass_actor[] - conditions?: t_repository_ruleset_conditions | t_org_ruleset_conditions + conditions?: t_repository_ruleset_conditions | t_org_ruleset_conditions | null created_at?: string current_user_can_bypass?: "always" | "pull_requests_only" | "never" enforcement: t_repository_rule_enforcement @@ -5771,6 +5693,18 @@ export type t_repository_ruleset_conditions_repository_name_target = { } } +export type t_repository_ruleset_conditions_repository_property_spec = { + name: string + property_values: string[] +} + +export type t_repository_ruleset_conditions_repository_property_target = { + repository_property: { + exclude?: t_repository_ruleset_conditions_repository_property_spec[] + include?: t_repository_ruleset_conditions_repository_property_spec[] + } +} + export type t_repository_subscription = { created_at: string ignored: boolean @@ -5888,7 +5822,7 @@ export type t_root = { followers_url: string following_url: string gists_url: string - hub_url: string + hub_url?: string issue_search_url: string issues_url: string keys_url: string @@ -5910,6 +5844,45 @@ export type t_root = { user_url: string } +export type t_rule_suite = { + actor_id?: number | null + actor_name?: string | null + after_sha?: string + before_sha?: string + evaluation_result?: "pass" | "fail" + id?: number + pushed_at?: string + ref?: string + repository_id?: number + repository_name?: string + result?: "pass" | "fail" | "bypass" + rule_evaluations?: { + details?: string + enforcement?: "active" | "evaluate" | "deleted ruleset" + result?: "pass" | "fail" + rule_source?: { + id?: number | null + name?: string | null + type?: string + } + rule_type?: string + }[] +} + +export type t_rule_suites = { + actor_id?: number + actor_name?: string + after_sha?: string + before_sha?: string + evaluation_result?: "pass" | "fail" + id?: number + pushed_at?: string + ref?: string + repository_id?: number + repository_name?: string + result?: "pass" | "fail" | "bypass" +}[] + export type t_runner = { busy: boolean id: number @@ -5973,6 +5946,7 @@ export type t_secret_scanning_alert = { state?: t_secret_scanning_alert_state updated_at?: t_nullable_alert_updated_at url?: t_alert_url + validity?: "active" | "inactive" | "unknown" } export type t_secret_scanning_alert_resolution = @@ -5987,12 +5961,34 @@ export type t_secret_scanning_alert_resolution_comment = string | null export type t_secret_scanning_alert_state = "open" | "resolved" export type t_secret_scanning_location = { - details: + details?: | t_secret_scanning_location_commit + | t_secret_scanning_location_wiki_commit | t_secret_scanning_location_issue_title | t_secret_scanning_location_issue_body | t_secret_scanning_location_issue_comment - type: "commit" | "issue_title" | "issue_body" | "issue_comment" + | t_secret_scanning_location_discussion_title + | t_secret_scanning_location_discussion_body + | t_secret_scanning_location_discussion_comment + | t_secret_scanning_location_pull_request_title + | t_secret_scanning_location_pull_request_body + | t_secret_scanning_location_pull_request_comment + | t_secret_scanning_location_pull_request_review + | t_secret_scanning_location_pull_request_review_comment + type?: + | "commit" + | "wiki_commit" + | "issue_title" + | "issue_body" + | "issue_comment" + | "discussion_title" + | "discussion_body" + | "discussion_comment" + | "pull_request_title" + | "pull_request_body" + | "pull_request_comment" + | "pull_request_review" + | "pull_request_review_comment" } export type t_secret_scanning_location_commit = { @@ -6007,6 +6003,18 @@ export type t_secret_scanning_location_commit = { start_line: number } +export type t_secret_scanning_location_discussion_body = { + discussion_body_url: string +} + +export type t_secret_scanning_location_discussion_comment = { + discussion_comment_url: string +} + +export type t_secret_scanning_location_discussion_title = { + discussion_title_url: string +} + export type t_secret_scanning_location_issue_body = { issue_body_url: string } @@ -6019,6 +6027,38 @@ export type t_secret_scanning_location_issue_title = { issue_title_url: string } +export type t_secret_scanning_location_pull_request_body = { + pull_request_body_url: string +} + +export type t_secret_scanning_location_pull_request_comment = { + pull_request_comment_url: string +} + +export type t_secret_scanning_location_pull_request_review = { + pull_request_review_url: string +} + +export type t_secret_scanning_location_pull_request_review_comment = { + pull_request_review_comment_url: string +} + +export type t_secret_scanning_location_pull_request_title = { + pull_request_title_url: string +} + +export type t_secret_scanning_location_wiki_commit = { + blob_sha: string + commit_sha: string + commit_url: string + end_column: number + end_line: number + page_url: string + path: string + start_column: number + start_line: number +} + export type t_security_advisory_credit_types = | "analyst" | "finder" @@ -6597,7 +6637,6 @@ export type t_team_repository = { tags_url: string teams_url: string temp_clone_token?: string - template_repository?: t_nullable_repository topics?: string[] trees_url: string updated_at: string | null diff --git a/integration-tests/typescript-axios/src/generated/stripe.yaml/client.ts b/integration-tests/typescript-axios/src/generated/stripe.yaml/client.ts index 40aba31a..019dcb8c 100644 --- a/integration-tests/typescript-axios/src/generated/stripe.yaml/client.ts +++ b/integration-tests/typescript-axios/src/generated/stripe.yaml/client.ts @@ -13,6 +13,10 @@ import { t_balance, t_balance_transaction, t_bank_account, + t_billing_meter, + t_billing_meter_event, + t_billing_meter_event_adjustment, + t_billing_meter_event_summary, t_billing_portal_configuration, t_billing_portal_session, t_capability, @@ -20,6 +24,10 @@ import { t_cash_balance, t_charge, t_checkout_session, + t_climate_order, + t_climate_product, + t_climate_supplier, + t_confirmation_token, t_country_spec, t_coupon, t_credit_note, @@ -27,6 +35,7 @@ import { t_customer, t_customer_balance_transaction, t_customer_cash_balance_transaction, + t_customer_session, t_deleted_account, t_deleted_apple_pay_domain, t_deleted_coupon, @@ -60,6 +69,8 @@ import { t_financial_connections_account, t_financial_connections_account_owner, t_financial_connections_session, + t_financial_connections_transaction, + t_forwarding_request, t_funding_instructions, t_identity_verification_report, t_identity_verification_session, @@ -69,7 +80,10 @@ import { t_issuing_card, t_issuing_cardholder, t_issuing_dispute, + t_issuing_personalization_design, + t_issuing_physical_bundle, t_issuing_settlement, + t_issuing_token, t_issuing_transaction, t_item, t_line_item, @@ -110,6 +124,7 @@ import { t_tax_code, t_tax_id, t_tax_rate, + t_tax_registration, t_tax_settings, t_tax_transaction, t_tax_transaction_line_item, @@ -179,6 +194,10 @@ export class ApiClient extends AbstractAxiosClient { requestBody: { account: string collect?: "currently_due" | "eventually_due" + collection_options?: { + fields: "currently_due" | "eventually_due" + future_requirements?: "include" | "omit" + } expand?: string[] refresh_url?: string return_url?: string @@ -212,6 +231,37 @@ export class ApiClient extends AbstractAxiosClient { components: { account_onboarding?: { enabled: boolean + features?: EmptyObject + } + documents?: { + enabled: boolean + features?: EmptyObject + } + payment_details?: { + enabled: boolean + features?: { + capture_payments?: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management?: boolean + refund_management?: boolean + } + } + payments?: { + enabled: boolean + features?: { + capture_payments?: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management?: boolean + refund_management?: boolean + } + } + payouts?: { + enabled: boolean + features?: { + edit_payout_schedule?: boolean + instant_payouts?: boolean + standard_payouts?: boolean + } } } expand?: string[] @@ -309,6 +359,12 @@ export class ApiClient extends AbstractAxiosClient { } | string business_profile?: { + annual_revenue?: { + amount: number + currency: string + fiscal_year_end: string + } + estimated_worker_count?: number mcc?: string monthly_estimated_revenue?: { amount: number @@ -344,6 +400,9 @@ export class ApiClient extends AbstractAxiosClient { afterpay_clearpay_payments?: { requested?: boolean } + amazon_pay_payments?: { + requested?: boolean + } au_becs_debit_payments?: { requested?: boolean } @@ -407,6 +466,9 @@ export class ApiClient extends AbstractAxiosClient { link_payments?: { requested?: boolean } + mobilepay_payments?: { + requested?: boolean + } oxxo_payments?: { requested?: boolean } @@ -419,12 +481,18 @@ export class ApiClient extends AbstractAxiosClient { promptpay_payments?: { requested?: boolean } + revolut_pay_payments?: { + requested?: boolean + } sepa_debit_payments?: { requested?: boolean } sofort_payments?: { requested?: boolean } + swish_payments?: { + requested?: boolean + } tax_reporting_us_1099_k?: { requested?: boolean } @@ -503,6 +571,7 @@ export class ApiClient extends AbstractAxiosClient { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -609,6 +678,13 @@ export class ApiClient extends AbstractAxiosClient { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -627,6 +703,9 @@ export class ApiClient extends AbstractAxiosClient { } | "" settings?: { + bacs_debit_payments?: { + display_name?: string + } branding?: { icon?: string logo?: string @@ -766,6 +845,12 @@ export class ApiClient extends AbstractAxiosClient { requestBody?: { account_token?: string business_profile?: { + annual_revenue?: { + amount: number + currency: string + fiscal_year_end: string + } + estimated_worker_count?: number mcc?: string monthly_estimated_revenue?: { amount: number @@ -801,6 +886,9 @@ export class ApiClient extends AbstractAxiosClient { afterpay_clearpay_payments?: { requested?: boolean } + amazon_pay_payments?: { + requested?: boolean + } au_becs_debit_payments?: { requested?: boolean } @@ -864,6 +952,9 @@ export class ApiClient extends AbstractAxiosClient { link_payments?: { requested?: boolean } + mobilepay_payments?: { + requested?: boolean + } oxxo_payments?: { requested?: boolean } @@ -876,12 +967,18 @@ export class ApiClient extends AbstractAxiosClient { promptpay_payments?: { requested?: boolean } + revolut_pay_payments?: { + requested?: boolean + } sepa_debit_payments?: { requested?: boolean } sofort_payments?: { requested?: boolean } + swish_payments?: { + requested?: boolean + } tax_reporting_us_1099_k?: { requested?: boolean } @@ -960,6 +1057,7 @@ export class ApiClient extends AbstractAxiosClient { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -1065,6 +1163,13 @@ export class ApiClient extends AbstractAxiosClient { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -1083,6 +1188,9 @@ export class ApiClient extends AbstractAxiosClient { } | "" settings?: { + bacs_debit_payments?: { + display_name?: string + } branding?: { icon?: string logo?: string @@ -1105,6 +1213,9 @@ export class ApiClient extends AbstractAxiosClient { statement_descriptor_prefix_kana?: string | "" statement_descriptor_prefix_kanji?: string | "" } + invoices?: { + default_account_tax_ids?: string[] | "" + } payments?: { statement_descriptor?: string statement_descriptor_kana?: string @@ -1414,6 +1525,7 @@ export class ApiClient extends AbstractAxiosClient { endingBefore?: string expand?: string[] limit?: number + object?: "bank_account" | "card" startingAfter?: string requestBody?: EmptyObject }, @@ -1435,6 +1547,7 @@ export class ApiClient extends AbstractAxiosClient { ending_before: p["endingBefore"], expand: p["expand"], limit: p["limit"], + object: p["object"], starting_after: p["startingAfter"], }) const body = JSON.stringify(p.requestBody) @@ -1640,6 +1753,7 @@ export class ApiClient extends AbstractAxiosClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean representative?: boolean } @@ -1684,6 +1798,13 @@ export class ApiClient extends AbstractAxiosClient { p: { account: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -1761,6 +1882,7 @@ export class ApiClient extends AbstractAxiosClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -1858,6 +1980,13 @@ export class ApiClient extends AbstractAxiosClient { account: string person: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -1935,6 +2064,7 @@ export class ApiClient extends AbstractAxiosClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -1982,6 +2112,7 @@ export class ApiClient extends AbstractAxiosClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean representative?: boolean } @@ -2026,6 +2157,13 @@ export class ApiClient extends AbstractAxiosClient { p: { account: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -2103,6 +2241,7 @@ export class ApiClient extends AbstractAxiosClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -2200,6 +2339,13 @@ export class ApiClient extends AbstractAxiosClient { account: string person: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -2277,6 +2423,7 @@ export class ApiClient extends AbstractAxiosClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -3048,6 +3195,310 @@ export class ApiClient extends AbstractAxiosClient { }) } + async postBillingMeterEventAdjustments( + p: { + requestBody: { + cancel: { + identifier: string + } + event_name: string + expand?: string[] + type?: "cancel" + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/billing/meter_event_adjustments` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postBillingMeterEvents( + p: { + requestBody: { + event_name: string + expand?: string[] + identifier?: string + payload: { + [key: string]: string | undefined + } + timestamp: number + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/billing/meter_events` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getBillingMeters( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "inactive" + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_billing_meter[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/billing/meters` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postBillingMeters( + p: { + requestBody: { + customer_mapping?: { + event_payload_key: string + type: "by_id" + } + default_aggregation: { + formula: "count" | "sum" + } + display_name: string + event_name: string + event_time_window?: "day" | "hour" + expand?: string[] + value_settings?: { + event_payload_key: string + } + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/billing/meters` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getBillingMetersId( + p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/billing/meters/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postBillingMetersId( + p: { + id: string + requestBody?: { + display_name?: string + expand?: string[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/billing/meters/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postBillingMetersIdDeactivate( + p: { + id: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/billing/meters/${p["id"]}/deactivate` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getBillingMetersIdEventSummaries( + p: { + customer: string + endTime: number + endingBefore?: string + expand?: string[] + id: string + limit?: number + startTime: number + startingAfter?: string + valueGroupingWindow?: "hour" + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_billing_meter_event_summary[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/billing/meters/${p["id"]}/event_summaries` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + customer: p["customer"], + end_time: p["endTime"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + start_time: p["startTime"], + starting_after: p["startingAfter"], + value_grouping_window: p["valueGroupingWindow"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postBillingMetersIdReactivate( + p: { + id: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/billing/meters/${p["id"]}/reactivate` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async getBillingPortalConfigurations( p: { active?: boolean @@ -3143,9 +3594,6 @@ export class ApiClient extends AbstractAxiosClient { mode?: "at_period_end" | "immediately" proration_behavior?: "always_invoice" | "create_prorations" | "none" } - subscription_pause?: { - enabled?: boolean - } subscription_update?: { default_allowed_updates: | ("price" | "promotion_code" | "quantity")[] @@ -3267,9 +3715,6 @@ export class ApiClient extends AbstractAxiosClient { mode?: "at_period_end" | "immediately" proration_behavior?: "always_invoice" | "create_prorations" | "none" } - subscription_pause?: { - enabled?: boolean - } subscription_update?: { default_allowed_updates?: | ("price" | "promotion_code" | "quantity")[] @@ -4038,6 +4483,14 @@ export class ApiClient extends AbstractAxiosClient { async getCheckoutSessions( p: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string customerDetails?: { email: string @@ -4048,6 +4501,7 @@ export class ApiClient extends AbstractAxiosClient { paymentIntent?: string paymentLink?: string startingAfter?: string + status?: "complete" | "expired" | "open" subscription?: string requestBody?: EmptyObject } = {}, @@ -4066,6 +4520,7 @@ export class ApiClient extends AbstractAxiosClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + created: p["created"], customer: p["customer"], customer_details: p["customerDetails"], ending_before: p["endingBefore"], @@ -4074,6 +4529,7 @@ export class ApiClient extends AbstractAxiosClient { payment_intent: p["paymentIntent"], payment_link: p["paymentLink"], starting_after: p["startingAfter"], + status: p["status"], subscription: p["subscription"], }) const body = JSON.stringify(p.requestBody) @@ -4091,7 +4547,7 @@ export class ApiClient extends AbstractAxiosClient { async postCheckoutSessions( p: { - requestBody: { + requestBody?: { after_expiration?: { recovery?: { allow_promotion_codes?: boolean @@ -4101,11 +4557,18 @@ export class ApiClient extends AbstractAxiosClient { allow_promotion_codes?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" cancel_url?: string client_reference_id?: string consent_collection?: { + payment_method_reuse_agreement?: { + position: "auto" | "hidden" + } promotions?: "auto" | "none" terms_of_service?: "none" | "required" } @@ -4134,6 +4597,11 @@ export class ApiClient extends AbstractAxiosClient { type: "dropdown" | "numeric" | "text" }[] custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -4176,6 +4644,10 @@ export class ApiClient extends AbstractAxiosClient { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: { [key: string]: string | undefined } @@ -4339,6 +4811,7 @@ export class ApiClient extends AbstractAxiosClient { installments?: { enabled?: boolean } + request_three_d_secure?: "any" | "automatic" | "challenge" setup_future_usage?: "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -4437,12 +4910,18 @@ export class ApiClient extends AbstractAxiosClient { pix?: { expires_after_seconds?: number } + revolut_pay?: { + setup_future_usage?: "none" | "off_session" + } sepa_debit?: { setup_future_usage?: "none" | "off_session" | "on_session" } sofort?: { setup_future_usage?: "none" } + swish?: { + reference?: string + } us_bank_account?: { financial_connections?: { permissions?: ( @@ -4451,7 +4930,7 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" @@ -4489,8 +4968,10 @@ export class ApiClient extends AbstractAxiosClient { | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -4498,6 +4979,8 @@ export class ApiClient extends AbstractAxiosClient { phone_number_collection?: { enabled: boolean } + redirect_on_completion?: "always" | "if_required" | "never" + return_url?: string setup_intent_data?: { description?: string metadata?: { @@ -4786,6 +5269,12 @@ export class ApiClient extends AbstractAxiosClient { billing_cycle_anchor?: number default_tax_rates?: string[] description?: string + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } metadata?: { [key: string]: string | undefined } @@ -4803,12 +5292,13 @@ export class ApiClient extends AbstractAxiosClient { } } } - success_url: string + success_url?: string tax_id_collection?: { enabled: boolean } + ui_mode?: "embedded" | "hosted" } - }, + } = {}, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { @@ -4925,6 +5415,335 @@ export class ApiClient extends AbstractAxiosClient { }) } + async getClimateOrders( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_climate_order[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/climate/orders` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postClimateOrders( + p: { + requestBody: { + amount?: number + beneficiary?: { + public_name: string + } + currency?: string + expand?: string[] + metadata?: { + [key: string]: string | undefined + } + metric_tons?: string + product: string + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/climate/orders` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getClimateOrdersOrder( + p: { + expand?: string[] + order: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/climate/orders/${p["order"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postClimateOrdersOrder( + p: { + order: string + requestBody?: { + beneficiary?: + | { + public_name: string | "" + } + | "" + expand?: string[] + metadata?: { + [key: string]: string | undefined + } + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/climate/orders/${p["order"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postClimateOrdersOrderCancel( + p: { + order: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/climate/orders/${p["order"]}/cancel` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getClimateProducts( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_climate_product[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/climate/products` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getClimateProductsProduct( + p: { + expand?: string[] + product: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/climate/products/${p["product"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getClimateSuppliers( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_climate_supplier[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/climate/suppliers` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getClimateSuppliersSupplier( + p: { + expand?: string[] + supplier: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/climate/suppliers/${p["supplier"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getConfirmationTokensConfirmationToken( + p: { + confirmationToken: string + expand?: string[] + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/confirmation_tokens/${p["confirmationToken"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async getCountrySpecs( p: { endingBefore?: string @@ -5187,6 +6006,14 @@ export class ApiClient extends AbstractAxiosClient { async getCreditNotes( p: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string endingBefore?: string expand?: string[] @@ -5210,6 +6037,7 @@ export class ApiClient extends AbstractAxiosClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + created: p["created"], customer: p["customer"], ending_before: p["endingBefore"], expand: p["expand"], @@ -5243,6 +6071,13 @@ export class ApiClient extends AbstractAxiosClient { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -5297,6 +6132,13 @@ export class ApiClient extends AbstractAxiosClient { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -5368,6 +6210,13 @@ export class ApiClient extends AbstractAxiosClient { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -5563,6 +6412,41 @@ export class ApiClient extends AbstractAxiosClient { }) } + async postCustomerSessions( + p: { + requestBody: { + components: { + buy_button?: { + enabled: boolean + } + pricing_table?: { + enabled: boolean + } + } + customer: string + expand?: string[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/customer_sessions` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async getCustomers( p: { created?: @@ -5687,6 +6571,7 @@ export class ApiClient extends AbstractAxiosClient { source?: string tax?: { ip_address?: string | "" + validate_location?: "deferred" | "immediately" } tax_exempt?: "" | "exempt" | "none" | "reverse" tax_id_data?: { @@ -5736,6 +6621,7 @@ export class ApiClient extends AbstractAxiosClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -5981,6 +6867,7 @@ export class ApiClient extends AbstractAxiosClient { source?: string tax?: { ip_address?: string | "" + validate_location?: "deferred" | "immediately" } tax_exempt?: "" | "exempt" | "none" | "reverse" } @@ -6855,14 +7742,17 @@ export class ApiClient extends AbstractAxiosClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -7225,6 +8115,11 @@ export class ApiClient extends AbstractAxiosClient { customer: string requestBody?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -7236,9 +8131,13 @@ export class ApiClient extends AbstractAxiosClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } backdate_start_date?: number billing_cycle_anchor?: number @@ -7257,13 +8156,34 @@ export class ApiClient extends AbstractAxiosClient { default_payment_method?: string default_source?: string default_tax_rates?: string[] | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -7330,7 +8250,7 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -7345,6 +8265,7 @@ export class ApiClient extends AbstractAxiosClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -7354,7 +8275,7 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -7375,12 +8296,14 @@ export class ApiClient extends AbstractAxiosClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -7498,6 +8421,11 @@ export class ApiClient extends AbstractAxiosClient { subscriptionExposedId: string requestBody?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -7509,9 +8437,13 @@ export class ApiClient extends AbstractAxiosClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "now" | "unchanged" billing_thresholds?: @@ -7541,7 +8473,21 @@ export class ApiClient extends AbstractAxiosClient { default_payment_method?: string default_source?: string | "" default_tax_rates?: string[] | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { @@ -7550,6 +8496,13 @@ export class ApiClient extends AbstractAxiosClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -7625,7 +8578,7 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -7640,6 +8593,7 @@ export class ApiClient extends AbstractAxiosClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -7649,7 +8603,7 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -7670,12 +8624,14 @@ export class ApiClient extends AbstractAxiosClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -7878,6 +8834,7 @@ export class ApiClient extends AbstractAxiosClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -8791,7 +9748,7 @@ export class ApiClient extends AbstractAxiosClient { account: string requestBody: { expand?: string[] - features: ("balance" | "ownership")[] + features: ("balance" | "ownership" | "transactions")[] } }, timeout?: number, @@ -8814,6 +9771,62 @@ export class ApiClient extends AbstractAxiosClient { }) } + async postFinancialConnectionsAccountsAccountSubscribe( + p: { + account: string + requestBody: { + expand?: string[] + features: "transactions"[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/financial_connections/accounts/${p["account"]}/subscribe` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postFinancialConnectionsAccountsAccountUnsubscribe( + p: { + account: string + requestBody: { + expand?: string[] + features: "transactions"[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/financial_connections/accounts/${p["account"]}/unsubscribe` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async postFinancialConnectionsSessions( p: { requestBody: { @@ -8832,7 +9845,7 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: ("balances" | "ownership")[] + prefetch?: ("balances" | "ownership" | "transactions")[] return_url?: string } }, @@ -8883,8 +9896,209 @@ export class ApiClient extends AbstractAxiosClient { }) } + async getFinancialConnectionsTransactions( + p: { + account: string + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + transactedAt?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + transactionRefresh?: { + after: string + } + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_financial_connections_transaction[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/financial_connections/transactions` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + account: p["account"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + transacted_at: p["transactedAt"], + transaction_refresh: p["transactionRefresh"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getFinancialConnectionsTransactionsTransaction( + p: { + expand?: string[] + transaction: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/financial_connections/transactions/${p["transaction"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getForwardingRequests( + p: { + created?: { + gt?: number + gte?: number + lt?: number + lte?: number + } + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_forwarding_request[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/forwarding/requests` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + created: p["created"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postForwardingRequests( + p: { + requestBody: { + config: string + expand?: string[] + payment_method: string + replacements: ( + | "card_cvc" + | "card_expiry" + | "card_number" + | "cardholder_name" + )[] + request?: { + body?: string + headers?: { + name: string + value: string + }[] + } + url: string + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/forwarding/requests` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getForwardingRequestsId( + p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/forwarding/requests/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async getIdentityVerificationReports( p: { + clientReferenceId?: string created?: | { gt?: number @@ -8916,6 +10130,7 @@ export class ApiClient extends AbstractAxiosClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + client_reference_id: p["clientReferenceId"], created: p["created"], ending_before: p["endingBefore"], expand: p["expand"], @@ -8966,6 +10181,7 @@ export class ApiClient extends AbstractAxiosClient { async getIdentityVerificationSessions( p: { + clientReferenceId?: string created?: | { gt?: number @@ -8996,6 +10212,7 @@ export class ApiClient extends AbstractAxiosClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + client_reference_id: p["clientReferenceId"], created: p["created"], ending_before: p["endingBefore"], expand: p["expand"], @@ -9018,7 +10235,8 @@ export class ApiClient extends AbstractAxiosClient { async postIdentityVerificationSessions( p: { - requestBody: { + requestBody?: { + client_reference_id?: string expand?: string[] metadata?: { [key: string]: string | undefined @@ -9032,11 +10250,26 @@ export class ApiClient extends AbstractAxiosClient { require_matching_selfie?: boolean } | "" + email?: + | { + require_verification?: boolean + } + | "" + phone?: + | { + require_verification?: boolean + } + | "" + } + provided_details?: { + email?: string + phone?: string } return_url?: string - type: "document" | "id_number" + type?: "document" | "id_number" + verification_flow?: string } - }, + } = {}, timeout?: number, opts?: AxiosRequestConfig, ): Promise> { @@ -9101,6 +10334,20 @@ export class ApiClient extends AbstractAxiosClient { require_matching_selfie?: boolean } | "" + email?: + | { + require_verification?: boolean + } + | "" + phone?: + | { + require_verification?: boolean + } + | "" + } + provided_details?: { + email?: string + phone?: string } type?: "document" | "id_number" } @@ -9247,6 +10494,7 @@ export class ApiClient extends AbstractAxiosClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -9360,6 +10608,7 @@ export class ApiClient extends AbstractAxiosClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -9483,6 +10732,10 @@ export class ApiClient extends AbstractAxiosClient { auto_advance?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" currency?: string @@ -9502,6 +10755,7 @@ export class ApiClient extends AbstractAxiosClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" due_date?: number @@ -9512,11 +10766,16 @@ export class ApiClient extends AbstractAxiosClient { action: "revision" invoice: string } + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined } | "" + number?: string on_behalf_of?: string payment_settings?: { default_mandate?: string | "" @@ -9549,7 +10808,7 @@ export class ApiClient extends AbstractAxiosClient { } | "" } - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -9564,6 +10823,7 @@ export class ApiClient extends AbstractAxiosClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -9573,7 +10833,7 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -9594,12 +10854,14 @@ export class ApiClient extends AbstractAxiosClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -9610,21 +10872,13 @@ export class ApiClient extends AbstractAxiosClient { )[] | "" } - pending_invoice_items_behavior?: - | "exclude" - | "include" - | "include_and_require" + pending_invoice_items_behavior?: "exclude" | "include" rendering?: { amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" pdf?: { page_size?: "a4" | "auto" | "letter" } } - rendering_options?: - | { - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" - } - | "" shipping_cost?: { shipping_rate?: string shipping_rate_data?: { @@ -9746,248 +11000,10 @@ export class ApiClient extends AbstractAxiosClient { p: { automaticTax?: { enabled: boolean - } - coupon?: string - currency?: string - customer?: string - customerDetails?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | "" - shipping?: - | { - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - | "" - tax?: { - ip_address?: string | "" - } - tax_exempt?: "" | "exempt" | "none" | "reverse" - tax_ids?: { - type: - | "ad_nrt" - | "ae_trn" - | "ar_cuit" - | "au_abn" - | "au_arn" - | "bg_uic" - | "bo_tin" - | "br_cnpj" - | "br_cpf" - | "ca_bn" - | "ca_gst_hst" - | "ca_pst_bc" - | "ca_pst_mb" - | "ca_pst_sk" - | "ca_qst" - | "ch_vat" - | "cl_tin" - | "cn_tin" - | "co_nit" - | "cr_tin" - | "do_rcn" - | "ec_ruc" - | "eg_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" - | "jp_trn" - | "ke_pin" - | "kr_brn" - | "li_uid" - | "mx_rfc" - | "my_frp" - | "my_itn" - | "my_sst" - | "no_vat" - | "nz_gst" - | "pe_ruc" - | "ph_tin" - | "ro_tin" - | "rs_pib" - | "ru_inn" - | "ru_kpp" - | "sa_vat" - | "sg_gst" - | "sg_uen" - | "si_tin" - | "sv_nit" - | "th_vat" - | "tr_tin" - | "tw_vat" - | "ua_vat" - | "us_ein" - | "uy_ruc" - | "ve_rif" - | "vn_tin" - | "za_vat" - value: string - }[] - } - discounts?: - | { - coupon?: string - discount?: string - }[] - | "" - expand?: string[] - invoiceItems?: { - amount?: number - currency?: string - description?: string - discountable?: boolean - discounts?: - | { - coupon?: string - discount?: string - }[] - | "" - invoiceitem?: string - metadata?: - | { - [key: string]: string | undefined - } - | "" - period?: { - end: number - start: number - } - price?: string - price_data?: { - currency: string - product: string - tax_behavior?: "exclusive" | "inclusive" | "unspecified" - unit_amount?: number - unit_amount_decimal?: string - } - quantity?: number - tax_behavior?: "exclusive" | "inclusive" | "unspecified" - tax_code?: string | "" - tax_rates?: string[] | "" - unit_amount?: number - unit_amount_decimal?: string - }[] - schedule?: string - subscription?: string - subscriptionBillingCycleAnchor?: "now" | "unchanged" | number - subscriptionCancelAt?: number | "" - subscriptionCancelAtPeriodEnd?: boolean - subscriptionCancelNow?: boolean - subscriptionDefaultTaxRates?: string[] | "" - subscriptionItems?: { - billing_thresholds?: - | { - usage_gte: number - } - | "" - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: - | { - [key: string]: string | undefined - } - | "" - price?: string - price_data?: { - currency: string - product: string - recurring: { - interval: "day" | "month" | "week" | "year" - interval_count?: number - } - tax_behavior?: "exclusive" | "inclusive" | "unspecified" - unit_amount?: number - unit_amount_decimal?: string + liability?: { + account?: string + type: "account" | "self" } - quantity?: number - tax_rates?: string[] | "" - }[] - subscriptionProrationBehavior?: - | "always_invoice" - | "create_prorations" - | "none" - subscriptionProrationDate?: number - subscriptionResumeAt?: "now" - subscriptionStartDate?: number - subscriptionTrialEnd?: "now" | number - subscriptionTrialFromPlan?: boolean - requestBody?: EmptyObject - } = {}, - timeout?: number, - opts?: AxiosRequestConfig, - ): Promise> { - const url = `/v1/invoices/upcoming` - const headers = this._headers({ - "Content-Type": "application/x-www-form-urlencoded", - }) - const query = this._query({ - automatic_tax: p["automaticTax"], - coupon: p["coupon"], - currency: p["currency"], - customer: p["customer"], - customer_details: p["customerDetails"], - discounts: p["discounts"], - expand: p["expand"], - invoice_items: p["invoiceItems"], - schedule: p["schedule"], - subscription: p["subscription"], - subscription_billing_cycle_anchor: p["subscriptionBillingCycleAnchor"], - subscription_cancel_at: p["subscriptionCancelAt"], - subscription_cancel_at_period_end: p["subscriptionCancelAtPeriodEnd"], - subscription_cancel_now: p["subscriptionCancelNow"], - subscription_default_tax_rates: p["subscriptionDefaultTaxRates"], - subscription_items: p["subscriptionItems"], - subscription_proration_behavior: p["subscriptionProrationBehavior"], - subscription_proration_date: p["subscriptionProrationDate"], - subscription_resume_at: p["subscriptionResumeAt"], - subscription_start_date: p["subscriptionStartDate"], - subscription_trial_end: p["subscriptionTrialEnd"], - subscription_trial_from_plan: p["subscriptionTrialFromPlan"], - }) - const body = JSON.stringify(p.requestBody) - - return this.axios.request({ - url: url + query, - baseURL: this.basePath, - method: "GET", - headers, - data: body, - ...(timeout ? { timeout } : {}), - ...(opts ?? {}), - }) - } - - async getInvoicesUpcomingLines( - p: { - automaticTax?: { - enabled: boolean } coupon?: string currency?: string @@ -10068,6 +11084,7 @@ export class ApiClient extends AbstractAxiosClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -10096,6 +11113,270 @@ export class ApiClient extends AbstractAxiosClient { | { coupon?: string discount?: string + promotion_code?: string + }[] + | "" + expand?: string[] + invoiceItems?: { + amount?: number + currency?: string + description?: string + discountable?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" + invoiceitem?: string + metadata?: + | { + [key: string]: string | undefined + } + | "" + period?: { + end: number + start: number + } + price?: string + price_data?: { + currency: string + product: string + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + unit_amount?: number + unit_amount_decimal?: string + } + quantity?: number + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + tax_code?: string | "" + tax_rates?: string[] | "" + unit_amount?: number + unit_amount_decimal?: string + }[] + issuer?: { + account?: string + type: "account" | "self" + } + onBehalfOf?: string | "" + schedule?: string + subscription?: string + subscriptionBillingCycleAnchor?: "now" | "unchanged" | number + subscriptionCancelAt?: number | "" + subscriptionCancelAtPeriodEnd?: boolean + subscriptionCancelNow?: boolean + subscriptionDefaultTaxRates?: string[] | "" + subscriptionItems?: { + billing_thresholds?: + | { + usage_gte: number + } + | "" + clear_usage?: boolean + deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" + id?: string + metadata?: + | { + [key: string]: string | undefined + } + | "" + price?: string + price_data?: { + currency: string + product: string + recurring: { + interval: "day" | "month" | "week" | "year" + interval_count?: number + } + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + unit_amount?: number + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | "" + }[] + subscriptionProrationBehavior?: + | "always_invoice" + | "create_prorations" + | "none" + subscriptionProrationDate?: number + subscriptionResumeAt?: "now" + subscriptionStartDate?: number + subscriptionTrialEnd?: "now" | number + subscriptionTrialFromPlan?: boolean + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/invoices/upcoming` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + automatic_tax: p["automaticTax"], + coupon: p["coupon"], + currency: p["currency"], + customer: p["customer"], + customer_details: p["customerDetails"], + discounts: p["discounts"], + expand: p["expand"], + invoice_items: p["invoiceItems"], + issuer: p["issuer"], + on_behalf_of: p["onBehalfOf"], + schedule: p["schedule"], + subscription: p["subscription"], + subscription_billing_cycle_anchor: p["subscriptionBillingCycleAnchor"], + subscription_cancel_at: p["subscriptionCancelAt"], + subscription_cancel_at_period_end: p["subscriptionCancelAtPeriodEnd"], + subscription_cancel_now: p["subscriptionCancelNow"], + subscription_default_tax_rates: p["subscriptionDefaultTaxRates"], + subscription_items: p["subscriptionItems"], + subscription_proration_behavior: p["subscriptionProrationBehavior"], + subscription_proration_date: p["subscriptionProrationDate"], + subscription_resume_at: p["subscriptionResumeAt"], + subscription_start_date: p["subscriptionStartDate"], + subscription_trial_end: p["subscriptionTrialEnd"], + subscription_trial_from_plan: p["subscriptionTrialFromPlan"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getInvoicesUpcomingLines( + p: { + automaticTax?: { + enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } + } + coupon?: string + currency?: string + customer?: string + customerDetails?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | "" + shipping?: + | { + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + | "" + tax?: { + ip_address?: string | "" + } + tax_exempt?: "" | "exempt" | "none" | "reverse" + tax_ids?: { + type: + | "ad_nrt" + | "ae_trn" + | "ar_cuit" + | "au_abn" + | "au_arn" + | "bg_uic" + | "bo_tin" + | "br_cnpj" + | "br_cpf" + | "ca_bn" + | "ca_gst_hst" + | "ca_pst_bc" + | "ca_pst_mb" + | "ca_pst_sk" + | "ca_qst" + | "ch_vat" + | "cl_tin" + | "cn_tin" + | "co_nit" + | "cr_tin" + | "do_rcn" + | "ec_ruc" + | "eg_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" + | "jp_trn" + | "ke_pin" + | "kr_brn" + | "li_uid" + | "mx_rfc" + | "my_frp" + | "my_itn" + | "my_sst" + | "no_vat" + | "no_voec" + | "nz_gst" + | "pe_ruc" + | "ph_tin" + | "ro_tin" + | "rs_pib" + | "ru_inn" + | "ru_kpp" + | "sa_vat" + | "sg_gst" + | "sg_uen" + | "si_tin" + | "sv_nit" + | "th_vat" + | "tr_tin" + | "tw_vat" + | "ua_vat" + | "us_ein" + | "uy_ruc" + | "ve_rif" + | "vn_tin" + | "za_vat" + value: string + }[] + } + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string }[] | "" endingBefore?: string @@ -10109,6 +11390,7 @@ export class ApiClient extends AbstractAxiosClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" invoiceitem?: string @@ -10136,7 +11418,12 @@ export class ApiClient extends AbstractAxiosClient { unit_amount?: number unit_amount_decimal?: string }[] + issuer?: { + account?: string + type: "account" | "self" + } limit?: number + onBehalfOf?: string | "" schedule?: string startingAfter?: string subscription?: string @@ -10153,6 +11440,13 @@ export class ApiClient extends AbstractAxiosClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -10209,7 +11503,9 @@ export class ApiClient extends AbstractAxiosClient { ending_before: p["endingBefore"], expand: p["expand"], invoice_items: p["invoiceItems"], + issuer: p["issuer"], limit: p["limit"], + on_behalf_of: p["onBehalfOf"], schedule: p["schedule"], starting_after: p["startingAfter"], subscription: p["subscription"], @@ -10300,6 +11596,10 @@ export class ApiClient extends AbstractAxiosClient { auto_advance?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" custom_fields?: @@ -10317,17 +11617,23 @@ export class ApiClient extends AbstractAxiosClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" due_date?: number effective_at?: number | "" expand?: string[] footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined } | "" + number?: string | "" on_behalf_of?: string | "" payment_settings?: { default_mandate?: string | "" @@ -10360,7 +11666,7 @@ export class ApiClient extends AbstractAxiosClient { } | "" } - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -10375,6 +11681,7 @@ export class ApiClient extends AbstractAxiosClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -10384,7 +11691,7 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -10405,12 +11712,14 @@ export class ApiClient extends AbstractAxiosClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -10427,11 +11736,6 @@ export class ApiClient extends AbstractAxiosClient { page_size?: "a4" | "auto" | "letter" } } - rendering_options?: - | { - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" - } - | "" shipping_cost?: | { shipping_rate?: string @@ -10584,6 +11888,100 @@ export class ApiClient extends AbstractAxiosClient { }) } + async postInvoicesInvoiceLinesLineItemId( + p: { + invoice: string + lineItemId: string + requestBody?: { + amount?: number + description?: string + discountable?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" + expand?: string[] + metadata?: + | { + [key: string]: string | undefined + } + | "" + period?: { + end: number + start: number + } + price?: string + price_data?: { + currency: string + product?: string + product_data?: { + description?: string + images?: string[] + metadata?: { + [key: string]: string | undefined + } + name: string + tax_code?: string + } + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + unit_amount?: number + unit_amount_decimal?: string + } + quantity?: number + tax_amounts?: + | { + amount: number + tax_rate_data: { + country?: string + description?: string + display_name: string + inclusive: boolean + jurisdiction?: string + percentage: number + state?: string + tax_type?: + | "amusement_tax" + | "communications_tax" + | "gst" + | "hst" + | "igst" + | "jct" + | "lease_tax" + | "pst" + | "qst" + | "rst" + | "sales_tax" + | "vat" + } + taxable_amount: number + }[] + | "" + tax_rates?: string[] | "" + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/invoices/${p["invoice"]}/lines/${p["lineItemId"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async postInvoicesInvoiceMarkUncollectible( p: { invoice: string @@ -11280,6 +12678,7 @@ export class ApiClient extends AbstractAxiosClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -11577,6 +12976,7 @@ export class ApiClient extends AbstractAxiosClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -12281,6 +13681,7 @@ export class ApiClient extends AbstractAxiosClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -12578,6 +13979,7 @@ export class ApiClient extends AbstractAxiosClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -12927,6 +14329,7 @@ export class ApiClient extends AbstractAxiosClient { expand?: string[] last4?: string limit?: number + personalizationDesign?: string startingAfter?: string status?: "active" | "canceled" | "inactive" type?: "physical" | "virtual" @@ -12955,6 +14358,7 @@ export class ApiClient extends AbstractAxiosClient { expand: p["expand"], last4: p["last4"], limit: p["limit"], + personalization_design: p["personalizationDesign"], starting_after: p["startingAfter"], status: p["status"], type: p["type"], @@ -12982,8 +14386,13 @@ export class ApiClient extends AbstractAxiosClient { metadata?: { [key: string]: string | undefined } + personalization_design?: string + pin?: { + encrypted_number?: string + } replacement_for?: string replacement_reason?: "damaged" | "expired" | "lost" | "stolen" + second_line?: string | "" shipping?: { address: { city: string @@ -13300,6 +14709,7 @@ export class ApiClient extends AbstractAxiosClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -13597,6 +15007,7 @@ export class ApiClient extends AbstractAxiosClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -13967,6 +15378,7 @@ export class ApiClient extends AbstractAxiosClient { [key: string]: string | undefined } | "" + personalization_design?: string pin?: { encrypted_number?: string } @@ -14268,6 +15680,7 @@ export class ApiClient extends AbstractAxiosClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -14565,6 +15978,7 @@ export class ApiClient extends AbstractAxiosClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -15228,6 +16642,244 @@ export class ApiClient extends AbstractAxiosClient { }) } + async getIssuingPersonalizationDesigns( + p: { + endingBefore?: string + expand?: string[] + limit?: number + lookupKeys?: string[] + preferences?: { + is_default?: boolean + is_platform_default?: boolean + } + startingAfter?: string + status?: "active" | "inactive" | "rejected" | "review" + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_issuing_personalization_design[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/issuing/personalization_designs` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + lookup_keys: p["lookupKeys"], + preferences: p["preferences"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postIssuingPersonalizationDesigns( + p: { + requestBody: { + card_logo?: string + carrier_text?: { + footer_body?: string | "" + footer_title?: string | "" + header_body?: string | "" + header_title?: string | "" + } + expand?: string[] + lookup_key?: string + metadata?: { + [key: string]: string | undefined + } + name?: string + physical_bundle: string + preferences?: { + is_default: boolean + } + transfer_lookup_key?: boolean + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/issuing/personalization_designs` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getIssuingPersonalizationDesignsPersonalizationDesign( + p: { + expand?: string[] + personalizationDesign: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/issuing/personalization_designs/${p["personalizationDesign"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postIssuingPersonalizationDesignsPersonalizationDesign( + p: { + personalizationDesign: string + requestBody?: { + card_logo?: string | "" + carrier_text?: + | { + footer_body?: string | "" + footer_title?: string | "" + header_body?: string | "" + header_title?: string | "" + } + | "" + expand?: string[] + lookup_key?: string | "" + metadata?: { + [key: string]: string | undefined + } + name?: string | "" + physical_bundle?: string + preferences?: { + is_default: boolean + } + transfer_lookup_key?: boolean + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/issuing/personalization_designs/${p["personalizationDesign"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getIssuingPhysicalBundles( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "inactive" | "review" + type?: "custom" | "standard" + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_issuing_physical_bundle[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/issuing/physical_bundles` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + type: p["type"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getIssuingPhysicalBundlesPhysicalBundle( + p: { + expand?: string[] + physicalBundle: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/issuing/physical_bundles/${p["physicalBundle"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async getIssuingSettlements( p: { created?: @@ -15335,6 +16987,115 @@ export class ApiClient extends AbstractAxiosClient { }) } + async getIssuingTokens( + p: { + card: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "deleted" | "requested" | "suspended" + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_issuing_token[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/issuing/tokens` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + card: p["card"], + created: p["created"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getIssuingTokensToken( + p: { + expand?: string[] + token: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/issuing/tokens/${p["token"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postIssuingTokensToken( + p: { + token: string + requestBody: { + expand?: string[] + status: "active" | "deleted" | "suspended" + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/issuing/tokens/${p["token"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async getIssuingTransactions( p: { card?: string @@ -15468,7 +17229,7 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: ("balances" | "ownership")[] + prefetch?: ("balances" | "ownership" | "transactions")[] return_url?: string } }, @@ -15670,7 +17431,7 @@ export class ApiClient extends AbstractAxiosClient { account: string requestBody: { expand?: string[] - features: ("balance" | "ownership")[] + features: ("balance" | "ownership" | "transactions")[] } }, timeout?: number, @@ -15784,6 +17545,7 @@ export class ApiClient extends AbstractAxiosClient { capture_method?: "automatic" | "automatic_async" | "manual" confirm?: boolean confirmation_method?: "automatic" | "manual" + confirmation_token?: string currency: string customer?: string description?: string @@ -15917,6 +17679,7 @@ export class ApiClient extends AbstractAxiosClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -15938,6 +17701,7 @@ export class ApiClient extends AbstractAxiosClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -15965,6 +17729,7 @@ export class ApiClient extends AbstractAxiosClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -15974,12 +17739,14 @@ export class ApiClient extends AbstractAxiosClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -16000,14 +17767,17 @@ export class ApiClient extends AbstractAxiosClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -16072,6 +17842,7 @@ export class ApiClient extends AbstractAxiosClient { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -16117,10 +17888,36 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: + | "01" + | "02" + | "05" + | "06" + | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -16253,6 +18050,12 @@ export class ApiClient extends AbstractAxiosClient { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -16312,6 +18115,11 @@ export class ApiClient extends AbstractAxiosClient { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -16332,6 +18140,12 @@ export class ApiClient extends AbstractAxiosClient { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -16341,9 +18155,12 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -16615,6 +18432,7 @@ export class ApiClient extends AbstractAxiosClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -16636,6 +18454,7 @@ export class ApiClient extends AbstractAxiosClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -16663,6 +18482,7 @@ export class ApiClient extends AbstractAxiosClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -16672,12 +18492,14 @@ export class ApiClient extends AbstractAxiosClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -16698,14 +18520,17 @@ export class ApiClient extends AbstractAxiosClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -16770,6 +18595,7 @@ export class ApiClient extends AbstractAxiosClient { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -16815,10 +18641,36 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: + | "01" + | "02" + | "05" + | "06" + | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -16951,6 +18803,12 @@ export class ApiClient extends AbstractAxiosClient { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -17010,6 +18868,11 @@ export class ApiClient extends AbstractAxiosClient { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -17030,6 +18893,12 @@ export class ApiClient extends AbstractAxiosClient { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -17039,9 +18908,12 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -17178,6 +19050,7 @@ export class ApiClient extends AbstractAxiosClient { amount_to_capture?: number application_fee_amount?: number expand?: string[] + final_capture?: boolean metadata?: | { [key: string]: string | undefined @@ -17216,6 +19089,7 @@ export class ApiClient extends AbstractAxiosClient { requestBody?: { capture_method?: "automatic" | "automatic_async" | "manual" client_secret?: string + confirmation_token?: string error_on_requires_action?: boolean expand?: string[] mandate?: string @@ -17350,6 +19224,7 @@ export class ApiClient extends AbstractAxiosClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -17371,6 +19246,7 @@ export class ApiClient extends AbstractAxiosClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -17398,6 +19274,7 @@ export class ApiClient extends AbstractAxiosClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -17407,12 +19284,14 @@ export class ApiClient extends AbstractAxiosClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -17433,14 +19312,17 @@ export class ApiClient extends AbstractAxiosClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -17505,6 +19387,7 @@ export class ApiClient extends AbstractAxiosClient { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -17550,10 +19433,36 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: + | "01" + | "02" + | "05" + | "06" + | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -17686,6 +19595,12 @@ export class ApiClient extends AbstractAxiosClient { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -17745,6 +19660,11 @@ export class ApiClient extends AbstractAxiosClient { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -17765,6 +19685,12 @@ export class ApiClient extends AbstractAxiosClient { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -17774,9 +19700,12 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -17971,9 +19900,16 @@ export class ApiClient extends AbstractAxiosClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" consent_collection?: { + payment_method_reuse_agreement?: { + position: "auto" | "hidden" + } promotions?: "auto" | "none" terms_of_service?: "none" | "required" } @@ -18002,6 +19938,11 @@ export class ApiClient extends AbstractAxiosClient { type: "dropdown" | "numeric" | "text" }[] custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -18020,6 +19961,7 @@ export class ApiClient extends AbstractAxiosClient { } customer_creation?: "always" | "if_required" expand?: string[] + inactive_message?: string invoice_creation?: { enabled: boolean invoice_data?: { @@ -18032,6 +19974,10 @@ export class ApiClient extends AbstractAxiosClient { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined @@ -18062,7 +20008,14 @@ export class ApiClient extends AbstractAxiosClient { on_behalf_of?: string payment_intent_data?: { capture_method?: "automatic" | "automatic_async" | "manual" + description?: string + metadata?: { + [key: string]: string | undefined + } setup_future_usage?: "off_session" | "on_session" + statement_descriptor?: string + statement_descriptor_suffix?: string + transfer_group?: string } payment_method_collection?: "always" | "if_required" payment_method_types?: ( @@ -18092,12 +20045,18 @@ export class ApiClient extends AbstractAxiosClient { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] phone_number_collection?: { enabled: boolean } + restrictions?: { + completed_sessions: { + limit: number + } + } shipping_address_collection?: { allowed_countries: ( | "AC" @@ -18345,7 +20304,21 @@ export class ApiClient extends AbstractAxiosClient { submit_type?: "auto" | "book" | "donate" | "pay" subscription_data?: { description?: string + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number + trial_settings?: { + end_behavior: { + missing_payment_method: "cancel" | "create_invoice" | "pause" + } + } } tax_id_collection?: { enabled: boolean @@ -18420,6 +20393,10 @@ export class ApiClient extends AbstractAxiosClient { allow_promotion_codes?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" custom_fields?: @@ -18448,6 +20425,11 @@ export class ApiClient extends AbstractAxiosClient { }[] | "" custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -18466,6 +20448,7 @@ export class ApiClient extends AbstractAxiosClient { } customer_creation?: "always" | "if_required" expand?: string[] + inactive_message?: string | "" invoice_creation?: { enabled: boolean invoice_data?: { @@ -18478,6 +20461,10 @@ export class ApiClient extends AbstractAxiosClient { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined @@ -18505,6 +20492,17 @@ export class ApiClient extends AbstractAxiosClient { metadata?: { [key: string]: string | undefined } + payment_intent_data?: { + description?: string | "" + metadata?: + | { + [key: string]: string | undefined + } + | "" + statement_descriptor?: string | "" + statement_descriptor_suffix?: string | "" + transfer_group?: string | "" + } payment_method_collection?: "always" | "if_required" payment_method_types?: | ( @@ -18534,10 +20532,18 @@ export class ApiClient extends AbstractAxiosClient { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] | "" + restrictions?: + | { + completed_sessions: { + limit: number + } + } + | "" shipping_address_collection?: | { allowed_countries: ( @@ -18781,6 +20787,26 @@ export class ApiClient extends AbstractAxiosClient { )[] } | "" + subscription_data?: { + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } + metadata?: + | { + [key: string]: string | undefined + } + | "" + trial_settings?: + | { + end_behavior: { + missing_payment_method: "cancel" | "create_invoice" | "pause" + } + } + | "" + } } }, timeout?: number, @@ -18955,6 +20981,11 @@ export class ApiClient extends AbstractAxiosClient { preference?: "none" | "off" | "on" } } + customer_balance?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } eps?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19033,6 +21064,11 @@ export class ApiClient extends AbstractAxiosClient { preference?: "none" | "off" | "on" } } + revolut_pay?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } sepa_debit?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19053,6 +21089,11 @@ export class ApiClient extends AbstractAxiosClient { preference?: "none" | "off" | "on" } } + zip?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } } } = {}, timeout?: number, @@ -19177,6 +21218,11 @@ export class ApiClient extends AbstractAxiosClient { preference?: "none" | "off" | "on" } } + customer_balance?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } eps?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19254,6 +21300,11 @@ export class ApiClient extends AbstractAxiosClient { preference?: "none" | "off" | "on" } } + revolut_pay?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } sepa_debit?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19274,6 +21325,11 @@ export class ApiClient extends AbstractAxiosClient { preference?: "none" | "off" | "on" } } + zip?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } } }, timeout?: number, @@ -19479,14 +21535,17 @@ export class ApiClient extends AbstractAxiosClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -19571,6 +21630,9 @@ export class ApiClient extends AbstractAxiosClient { cvc?: string exp_month: number exp_year: number + networks?: { + preferred?: "cartes_bancaires" | "mastercard" | "visa" + } number: string } | { @@ -19648,6 +21710,7 @@ export class ApiClient extends AbstractAxiosClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -19669,6 +21732,7 @@ export class ApiClient extends AbstractAxiosClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -19696,6 +21760,7 @@ export class ApiClient extends AbstractAxiosClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } payment_method?: string @@ -19706,12 +21771,14 @@ export class ApiClient extends AbstractAxiosClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type?: | "acss_debit" | "affirm" @@ -19733,14 +21800,17 @@ export class ApiClient extends AbstractAxiosClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -19824,6 +21894,9 @@ export class ApiClient extends AbstractAxiosClient { card?: { exp_month?: number exp_year?: number + networks?: { + preferred?: "" | "cartes_bancaires" | "mastercard" | "visa" + } } expand?: string[] link?: EmptyObject @@ -19834,6 +21907,7 @@ export class ApiClient extends AbstractAxiosClient { | "" us_bank_account?: { account_holder_type?: "company" | "individual" + account_type?: "checking" | "savings" } } }, @@ -20199,6 +22273,7 @@ export class ApiClient extends AbstractAxiosClient { [key: string]: string | undefined } | "" + meter?: string nickname?: string product?: | { @@ -20356,6 +22431,7 @@ export class ApiClient extends AbstractAxiosClient { product?: string recurring?: { interval?: "day" | "month" | "week" | "year" + meter?: string usage_type?: "licensed" | "metered" } startingAfter?: string @@ -20458,6 +22534,7 @@ export class ApiClient extends AbstractAxiosClient { aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" interval: "day" | "month" | "week" | "year" interval_count?: number + meter?: string usage_type?: "licensed" | "metered" } tax_behavior?: "exclusive" | "inclusive" | "unspecified" @@ -21145,6 +23222,10 @@ export class ApiClient extends AbstractAxiosClient { application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" customer?: string @@ -21154,6 +23235,7 @@ export class ApiClient extends AbstractAxiosClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -21166,8 +23248,19 @@ export class ApiClient extends AbstractAxiosClient { header?: string | "" invoice_settings?: { days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } line_items?: { + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" price?: string price_data?: { currency: string @@ -21190,6 +23283,9 @@ export class ApiClient extends AbstractAxiosClient { subscription_data?: { description?: string effective_date?: "current_period_end" | number | "" + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number | "" } test_clock?: string @@ -21257,6 +23353,10 @@ export class ApiClient extends AbstractAxiosClient { application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" customer?: string @@ -21266,6 +23366,7 @@ export class ApiClient extends AbstractAxiosClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -21274,8 +23375,19 @@ export class ApiClient extends AbstractAxiosClient { header?: string | "" invoice_settings?: { days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } line_items?: { + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string price?: string price_data?: { @@ -21299,6 +23411,9 @@ export class ApiClient extends AbstractAxiosClient { subscription_data?: { description?: string | "" effective_date?: "current_period_end" | number | "" + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number | "" } transfer_data?: @@ -21526,6 +23641,14 @@ export class ApiClient extends AbstractAxiosClient { async getRadarEarlyFraudWarnings( p: { charge?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number endingBefore?: string expand?: string[] limit?: number @@ -21549,6 +23672,7 @@ export class ApiClient extends AbstractAxiosClient { }) const query = this._query({ charge: p["charge"], + created: p["created"], ending_before: p["endingBefore"], expand: p["expand"], limit: p["limit"], @@ -22157,6 +24281,8 @@ export class ApiClient extends AbstractAxiosClient { | "anticipation_repayment" | "charge" | "charge_failure" + | "climate_order_purchase" + | "climate_order_refund" | "connect_collection_transfer" | "connect_reserved_funds" | "contribution" @@ -22172,7 +24298,6 @@ export class ApiClient extends AbstractAxiosClient { | "issuing_dispute" | "issuing_transaction" | "network_cost" - | "obligation" | "other_adjustment" | "partial_capture_reversal" | "payout" @@ -22187,6 +24312,7 @@ export class ApiClient extends AbstractAxiosClient { | "topup_reversal" | "transfer" | "transfer_reversal" + | "unreconciled_customer_funds" timezone?: | "Africa/Abidjan" | "Africa/Accra" @@ -23118,6 +25244,7 @@ export class ApiClient extends AbstractAxiosClient { enabled: boolean } confirm?: boolean + confirmation_token?: string customer?: string description?: string expand?: string[] @@ -23248,6 +25375,7 @@ export class ApiClient extends AbstractAxiosClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23269,6 +25397,7 @@ export class ApiClient extends AbstractAxiosClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -23296,6 +25425,7 @@ export class ApiClient extends AbstractAxiosClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -23305,12 +25435,14 @@ export class ApiClient extends AbstractAxiosClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -23331,14 +25463,17 @@ export class ApiClient extends AbstractAxiosClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -23389,8 +25524,24 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -23406,9 +25557,12 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -23599,6 +25753,7 @@ export class ApiClient extends AbstractAxiosClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23620,6 +25775,7 @@ export class ApiClient extends AbstractAxiosClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -23647,6 +25803,7 @@ export class ApiClient extends AbstractAxiosClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -23656,12 +25813,14 @@ export class ApiClient extends AbstractAxiosClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -23682,14 +25841,17 @@ export class ApiClient extends AbstractAxiosClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -23740,8 +25902,24 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -23757,9 +25935,12 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -23825,6 +26006,7 @@ export class ApiClient extends AbstractAxiosClient { intent: string requestBody?: { client_secret?: string + confirmation_token?: string expand?: string[] mandate_data?: | { @@ -23956,6 +26138,7 @@ export class ApiClient extends AbstractAxiosClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23977,6 +26160,7 @@ export class ApiClient extends AbstractAxiosClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -24004,6 +26188,7 @@ export class ApiClient extends AbstractAxiosClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -24013,12 +26198,14 @@ export class ApiClient extends AbstractAxiosClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -24039,14 +26226,17 @@ export class ApiClient extends AbstractAxiosClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -24097,8 +26287,24 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -24114,9 +26320,12 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -24836,6 +27045,13 @@ export class ApiClient extends AbstractAxiosClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] metadata?: { [key: string]: string | undefined @@ -24949,6 +27165,13 @@ export class ApiClient extends AbstractAxiosClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] metadata?: | { @@ -25160,6 +27383,10 @@ export class ApiClient extends AbstractAxiosClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25172,7 +27399,12 @@ export class ApiClient extends AbstractAxiosClient { default_payment_method?: string description?: string | "" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } on_behalf_of?: string | "" transfer_data?: @@ -25192,6 +27424,11 @@ export class ApiClient extends AbstractAxiosClient { | "" phases?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25206,6 +27443,10 @@ export class ApiClient extends AbstractAxiosClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25220,9 +27461,21 @@ export class ApiClient extends AbstractAxiosClient { default_payment_method?: string default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" end_date?: number invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } items: { billing_thresholds?: @@ -25230,6 +27483,13 @@ export class ApiClient extends AbstractAxiosClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -25319,6 +27579,10 @@ export class ApiClient extends AbstractAxiosClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25331,7 +27595,12 @@ export class ApiClient extends AbstractAxiosClient { default_payment_method?: string description?: string | "" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } on_behalf_of?: string | "" transfer_data?: @@ -25350,6 +27619,11 @@ export class ApiClient extends AbstractAxiosClient { | "" phases?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25364,6 +27638,10 @@ export class ApiClient extends AbstractAxiosClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25377,9 +27655,21 @@ export class ApiClient extends AbstractAxiosClient { default_payment_method?: string default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" end_date?: number | "now" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } items: { billing_thresholds?: @@ -25387,6 +27677,13 @@ export class ApiClient extends AbstractAxiosClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -25595,6 +27892,11 @@ export class ApiClient extends AbstractAxiosClient { p: { requestBody: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25606,12 +27908,23 @@ export class ApiClient extends AbstractAxiosClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } backdate_start_date?: number billing_cycle_anchor?: number + billing_cycle_anchor_config?: { + day_of_month: number + hour?: number + minute?: number + month?: number + second?: number + } billing_thresholds?: | { amount_gte?: number @@ -25629,13 +27942,34 @@ export class ApiClient extends AbstractAxiosClient { default_source?: string default_tax_rates?: string[] | "" description?: string + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -25703,7 +28037,7 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -25718,6 +28052,7 @@ export class ApiClient extends AbstractAxiosClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -25727,7 +28062,7 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -25748,12 +28083,14 @@ export class ApiClient extends AbstractAxiosClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -25924,6 +28261,11 @@ export class ApiClient extends AbstractAxiosClient { subscriptionExposedId: string requestBody?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25935,9 +28277,13 @@ export class ApiClient extends AbstractAxiosClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "now" | "unchanged" billing_thresholds?: @@ -25968,7 +28314,21 @@ export class ApiClient extends AbstractAxiosClient { default_source?: string | "" default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { @@ -25977,6 +28337,13 @@ export class ApiClient extends AbstractAxiosClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -26053,7 +28420,7 @@ export class ApiClient extends AbstractAxiosClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -26068,6 +28435,7 @@ export class ApiClient extends AbstractAxiosClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -26077,7 +28445,7 @@ export class ApiClient extends AbstractAxiosClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -26098,12 +28466,14 @@ export class ApiClient extends AbstractAxiosClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -26277,6 +28647,7 @@ export class ApiClient extends AbstractAxiosClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -26382,6 +28753,378 @@ export class ApiClient extends AbstractAxiosClient { }) } + async getTaxRegistrations( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "all" | "expired" | "scheduled" + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_tax_registration[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/tax/registrations` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postTaxRegistrations( + p: { + requestBody: { + active_from: "now" | number + country: string + country_options: { + ae?: { + type: "standard" + } + at?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + au?: { + type: "standard" + } + be?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + bg?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ca?: { + province_standard?: { + province: string + } + type: "province_standard" | "simplified" | "standard" + } + ch?: { + type: "standard" + } + cl?: { + type: "simplified" + } + co?: { + type: "simplified" + } + cy?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + cz?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + de?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + dk?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ee?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + es?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + fi?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + fr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + gb?: { + type: "standard" + } + gr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + hr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + hu?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + id?: { + type: "simplified" + } + ie?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + is?: { + type: "standard" + } + it?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + jp?: { + type: "standard" + } + kr?: { + type: "simplified" + } + lt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + lu?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + lv?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + mt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + mx?: { + type: "simplified" + } + my?: { + type: "simplified" + } + nl?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + no?: { + type: "standard" + } + nz?: { + type: "standard" + } + pl?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + pt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ro?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sa?: { + type: "simplified" + } + se?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sg?: { + type: "standard" + } + si?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sk?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + th?: { + type: "simplified" + } + tr?: { + type: "simplified" + } + us?: { + local_amusement_tax?: { + jurisdiction: string + } + local_lease_tax?: { + jurisdiction: string + } + state: string + type: + | "local_amusement_tax" + | "local_lease_tax" + | "state_communications_tax" + | "state_sales_tax" + } + vn?: { + type: "simplified" + } + za?: { + type: "standard" + } + } + expand?: string[] + expires_at?: number + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/tax/registrations` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getTaxRegistrationsId( + p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/tax/registrations/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postTaxRegistrationsId( + p: { + id: string + requestBody?: { + active_from?: "now" | number + expand?: string[] + expires_at?: "now" | number | "" + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/tax/registrations/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async getTaxSettings( p: { expand?: string[] @@ -26663,6 +29406,205 @@ export class ApiClient extends AbstractAxiosClient { }) } + async getTaxIds( + p: { + endingBefore?: string + expand?: string[] + limit?: number + owner?: { + account?: string + customer?: string + type: "account" | "application" | "customer" | "self" + } + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise< + AxiosResponse<{ + data: t_tax_id[] + has_more: boolean + object: "list" + url: string + }> + > { + const url = `/v1/tax_ids` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + owner: p["owner"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postTaxIds( + p: { + requestBody: { + expand?: string[] + owner?: { + account?: string + customer?: string + type: "account" | "application" | "customer" | "self" + } + type: + | "ad_nrt" + | "ae_trn" + | "ar_cuit" + | "au_abn" + | "au_arn" + | "bg_uic" + | "bo_tin" + | "br_cnpj" + | "br_cpf" + | "ca_bn" + | "ca_gst_hst" + | "ca_pst_bc" + | "ca_pst_mb" + | "ca_pst_sk" + | "ca_qst" + | "ch_vat" + | "cl_tin" + | "cn_tin" + | "co_nit" + | "cr_tin" + | "do_rcn" + | "ec_ruc" + | "eg_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" + | "jp_trn" + | "ke_pin" + | "kr_brn" + | "li_uid" + | "mx_rfc" + | "my_frp" + | "my_itn" + | "my_sst" + | "no_vat" + | "no_voec" + | "nz_gst" + | "pe_ruc" + | "ph_tin" + | "ro_tin" + | "rs_pib" + | "ru_inn" + | "ru_kpp" + | "sa_vat" + | "sg_gst" + | "sg_uen" + | "si_tin" + | "sv_nit" + | "th_vat" + | "tr_tin" + | "tw_vat" + | "ua_vat" + | "us_ein" + | "uy_ruc" + | "ve_rif" + | "vn_tin" + | "za_vat" + value: string + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/tax_ids` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async deleteTaxIdsId( + p: { + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/tax_ids/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "DELETE", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async getTaxIdsId( + p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/tax_ids/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url + query, + baseURL: this.basePath, + method: "GET", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async getTaxRates( p: { active?: boolean @@ -26744,7 +29686,6 @@ export class ApiClient extends AbstractAxiosClient { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" } }, @@ -26823,7 +29764,6 @@ export class ApiClient extends AbstractAxiosClient { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" } }, @@ -26897,6 +29837,12 @@ export class ApiClient extends AbstractAxiosClient { splashscreen?: string | "" } expand?: string[] + name?: string + offline?: + | { + enabled: boolean + } + | "" tipping?: | { aud?: { @@ -27060,6 +30006,12 @@ export class ApiClient extends AbstractAxiosClient { } | "" expand?: string[] + name?: string + offline?: + | { + enabled: boolean + } + | "" tipping?: | { aud?: { @@ -27372,6 +30324,7 @@ export class ApiClient extends AbstractAxiosClient { | "bbpos_chipper2x" | "bbpos_wisepad3" | "bbpos_wisepos_e" + | "mobile_phone_reader" | "simulated_wisepos_e" | "stripe_m2" | "verifone_P400" @@ -27574,6 +30527,7 @@ export class ApiClient extends AbstractAxiosClient { expand?: string[] payment_intent: string process_config?: { + enable_customer_cancellation?: boolean skip_tipping?: boolean tipping?: { amount_eligible?: number @@ -27607,7 +30561,9 @@ export class ApiClient extends AbstractAxiosClient { requestBody: { customer_consent_collected: boolean expand?: string[] - process_config?: EmptyObject + process_config?: { + enable_customer_cancellation?: boolean + } setup_intent: string } }, @@ -27643,6 +30599,9 @@ export class ApiClient extends AbstractAxiosClient { } payment_intent?: string refund_application_fee?: boolean + refund_payment_config?: { + enable_customer_cancellation?: boolean + } reverse_transfer?: boolean } }, @@ -27704,6 +30663,266 @@ export class ApiClient extends AbstractAxiosClient { }) } + async postTestHelpersConfirmationTokens( + p: { + requestBody?: { + expand?: string[] + payment_method?: string + payment_method_data?: { + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + affirm?: EmptyObject + afterpay_clearpay?: EmptyObject + alipay?: EmptyObject + au_becs_debit?: { + account_number: string + bsb_number: string + } + bacs_debit?: { + account_number?: string + sort_code?: string + } + bancontact?: EmptyObject + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | "" + email?: string | "" + name?: string | "" + phone?: string | "" + } + blik?: EmptyObject + boleto?: { + tax_id: string + } + cashapp?: EmptyObject + customer_balance?: EmptyObject + eps?: { + 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" + } + fpx?: { + bank: + | "affin_bank" + | "agrobank" + | "alliance_bank" + | "ambank" + | "bank_islam" + | "bank_muamalat" + | "bank_of_china" + | "bank_rakyat" + | "bsn" + | "cimb" + | "deutsche_bank" + | "hong_leong_bank" + | "hsbc" + | "kfh" + | "maybank2e" + | "maybank2u" + | "ocbc" + | "pb_enterprise" + | "public_bank" + | "rhb" + | "standard_chartered" + | "uob" + } + giropay?: EmptyObject + grabpay?: EmptyObject + ideal?: { + bank?: + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "n26" + | "nn" + | "rabobank" + | "regiobank" + | "revolut" + | "sns_bank" + | "triodos_bank" + | "van_lanschot" + | "yoursafe" + } + interac_present?: EmptyObject + klarna?: { + dob?: { + day: number + month: number + year: number + } + } + konbini?: EmptyObject + link?: EmptyObject + metadata?: { + [key: string]: string | undefined + } + mobilepay?: EmptyObject + oxxo?: EmptyObject + p24?: { + 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" + | "velobank" + | "volkswagen_bank" + } + paynow?: EmptyObject + paypal?: EmptyObject + pix?: EmptyObject + promptpay?: EmptyObject + radar_options?: { + session?: string + } + revolut_pay?: EmptyObject + sepa_debit?: { + iban: string + } + sofort?: { + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" + } + swish?: EmptyObject + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "cashapp" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "link" + | "mobilepay" + | "oxxo" + | "p24" + | "paynow" + | "paypal" + | "pix" + | "promptpay" + | "revolut_pay" + | "sepa_debit" + | "sofort" + | "swish" + | "us_bank_account" + | "wechat_pay" + | "zip" + us_bank_account?: { + account_holder_type?: "company" | "individual" + account_number?: string + account_type?: "checking" | "savings" + financial_connections_account?: string + routing_number?: string + } + wechat_pay?: EmptyObject + zip?: EmptyObject + } + return_url?: string + setup_future_usage?: "off_session" | "on_session" + shipping?: { + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string | "" + } + } + } = {}, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/test_helpers/confirmation_tokens` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async postTestHelpersCustomersCustomerFundCashBalance( p: { customer: string @@ -28055,6 +31274,7 @@ export class ApiClient extends AbstractAxiosClient { postal_code?: string state?: string terminal_id?: string + url?: string } network_data?: { acquiring_institution_id?: string @@ -28062,8 +31282,22 @@ export class ApiClient extends AbstractAxiosClient { verification_data?: { address_line1_check?: "match" | "mismatch" | "not_provided" address_postal_code_check?: "match" | "mismatch" | "not_provided" + authentication_exemption?: { + claimed_by: "acquirer" | "issuer" + type: + | "low_value_transaction" + | "transaction_risk_analysis" + | "unknown" + } cvc_check?: "match" | "mismatch" | "not_provided" expiry_check?: "match" | "mismatch" | "not_provided" + three_d_secure?: { + result: + | "attempt_acknowledged" + | "authenticated" + | "failed" + | "required" + } } wallet?: "apple_pay" | "google_pay" | "samsung_pay" } @@ -28347,6 +31581,108 @@ export class ApiClient extends AbstractAxiosClient { }) } + async postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate( + p: { + personalizationDesign: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/test_helpers/issuing/personalization_designs/${p["personalizationDesign"]}/activate` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate( + p: { + personalizationDesign: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/test_helpers/issuing/personalization_designs/${p["personalizationDesign"]}/deactivate` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + + async postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject( + p: { + personalizationDesign: string + requestBody: { + expand?: string[] + rejection_reasons: { + card_logo?: ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_binary_image" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + carrier_text?: ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + } + } + }, + timeout?: number, + opts?: AxiosRequestConfig, + ): Promise> { + const url = `/v1/test_helpers/issuing/personalization_designs/${p["personalizationDesign"]}/reject` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this.axios.request({ + url: url, + baseURL: this.basePath, + method: "POST", + headers, + data: body, + ...(timeout ? { timeout } : {}), + ...(opts ?? {}), + }) + } + async postTestHelpersIssuingTransactionsCreateForceCapture( p: { requestBody: { @@ -28657,6 +31993,7 @@ export class ApiClient extends AbstractAxiosClient { postal_code?: string state?: string terminal_id?: string + url?: string } purchase_details?: { flight?: { @@ -29028,6 +32365,7 @@ export class ApiClient extends AbstractAxiosClient { postal_code?: string state?: string terminal_id?: string + url?: string } purchase_details?: { flight?: { @@ -29760,6 +33098,7 @@ export class ApiClient extends AbstractAxiosClient { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -29838,6 +33177,13 @@ export class ApiClient extends AbstractAxiosClient { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -29859,6 +33205,7 @@ export class ApiClient extends AbstractAxiosClient { account_type?: "checking" | "futsu" | "savings" | "toza" country: string currency?: string + payment_method?: string routing_number?: string } card?: @@ -29874,6 +33221,9 @@ export class ApiClient extends AbstractAxiosClient { exp_month: string exp_year: string name?: string + networks?: { + preferred?: "cartes_bancaires" | "mastercard" | "visa" + } number: string } | string @@ -29883,6 +33233,13 @@ export class ApiClient extends AbstractAxiosClient { } expand?: string[] person?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -29958,6 +33315,7 @@ export class ApiClient extends AbstractAxiosClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -31154,6 +34512,14 @@ export class ApiClient extends AbstractAxiosClient { async getTreasuryOutboundPayments( p: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string endingBefore?: string expand?: string[] @@ -31178,6 +34544,7 @@ export class ApiClient extends AbstractAxiosClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + created: p["created"], customer: p["customer"], ending_before: p["endingBefore"], expand: p["expand"], @@ -31952,6 +35319,8 @@ export class ApiClient extends AbstractAxiosClient { | "2022-08-01" | "2022-11-15" | "2023-08-16" + | "2023-10-16" + | "2024-04-10" connect?: boolean description?: string | "" enabled_events: ( @@ -31988,6 +35357,13 @@ export class ApiClient extends AbstractAxiosClient { | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" + | "climate.order.canceled" + | "climate.order.created" + | "climate.order.delayed" + | "climate.order.delivered" + | "climate.order.product_substituted" + | "climate.product.created" + | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" @@ -32022,6 +35398,8 @@ export class ApiClient extends AbstractAxiosClient { | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" + | "financial_connections.account.refreshed_ownership" + | "financial_connections.account.refreshed_transactions" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -32055,6 +35433,8 @@ export class ApiClient extends AbstractAxiosClient { | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" + | "issuing_token.created" + | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" @@ -32293,6 +35673,13 @@ export class ApiClient extends AbstractAxiosClient { | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" + | "climate.order.canceled" + | "climate.order.created" + | "climate.order.delayed" + | "climate.order.delivered" + | "climate.order.product_substituted" + | "climate.product.created" + | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" @@ -32327,6 +35714,8 @@ export class ApiClient extends AbstractAxiosClient { | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" + | "financial_connections.account.refreshed_ownership" + | "financial_connections.account.refreshed_transactions" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -32360,6 +35749,8 @@ export class ApiClient extends AbstractAxiosClient { | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" + | "issuing_token.created" + | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" diff --git a/integration-tests/typescript-axios/src/generated/stripe.yaml/models.ts b/integration-tests/typescript-axios/src/generated/stripe.yaml/models.ts index 3b2495ad..ee8de2ba 100644 --- a/integration-tests/typescript-axios/src/generated/stripe.yaml/models.ts +++ b/integration-tests/typescript-axios/src/generated/stripe.yaml/models.ts @@ -41,8 +41,15 @@ export type t_account = { type?: "custom" | "express" | "standard" } +export type t_account_annual_revenue = { + amount?: number | null + currency?: string | null + fiscal_year_end?: string | null +} + export type t_account_bacs_debit_payments_settings = { - display_name?: string + display_name?: string | null + service_user_number?: string | null } export type t_account_branding_settings = { @@ -53,6 +60,8 @@ export type t_account_branding_settings = { } export type t_account_business_profile = { + annual_revenue?: t_account_annual_revenue | null + estimated_worker_count?: number | null mcc?: string | null monthly_estimated_revenue?: t_account_monthly_estimated_revenue name?: string | null @@ -68,6 +77,7 @@ export type t_account_capabilities = { acss_debit_payments?: "active" | "inactive" | "pending" affirm_payments?: "active" | "inactive" | "pending" afterpay_clearpay_payments?: "active" | "inactive" | "pending" + amazon_pay_payments?: "active" | "inactive" | "pending" au_becs_debit_payments?: "active" | "inactive" | "pending" bacs_debit_payments?: "active" | "inactive" | "pending" bancontact_payments?: "active" | "inactive" | "pending" @@ -89,12 +99,15 @@ export type t_account_capabilities = { konbini_payments?: "active" | "inactive" | "pending" legacy_payments?: "active" | "inactive" | "pending" link_payments?: "active" | "inactive" | "pending" + mobilepay_payments?: "active" | "inactive" | "pending" oxxo_payments?: "active" | "inactive" | "pending" p24_payments?: "active" | "inactive" | "pending" paynow_payments?: "active" | "inactive" | "pending" promptpay_payments?: "active" | "inactive" | "pending" + revolut_pay_payments?: "active" | "inactive" | "pending" sepa_debit_payments?: "active" | "inactive" | "pending" sofort_payments?: "active" | "inactive" | "pending" + swish_payments?: "active" | "inactive" | "pending" tax_reporting_us_1099_k?: "active" | "inactive" | "pending" tax_reporting_us_1099_misc?: "active" | "inactive" | "pending" transfers?: "active" | "inactive" | "pending" @@ -157,6 +170,10 @@ export type t_account_future_requirements = { pending_verification?: string[] | null } +export type t_account_invoices_settings = { + default_account_tax_ids?: (string | t_tax_id)[] | null +} + export type t_account_link = { created: number expires_at: number @@ -202,10 +219,43 @@ export type t_account_requirements_alternative = { export type t_account_requirements_error = { code: | "invalid_address_city_state_postal_code" + | "invalid_address_highway_contract_box" + | "invalid_address_private_mailbox" + | "invalid_business_profile_name" + | "invalid_business_profile_name_denylisted" + | "invalid_company_name_denylisted" + | "invalid_dob_age_over_maximum" | "invalid_dob_age_under_18" + | "invalid_dob_age_under_minimum" + | "invalid_product_description_length" + | "invalid_product_description_url_match" | "invalid_representative_country" + | "invalid_statement_descriptor_business_mismatch" + | "invalid_statement_descriptor_denylisted" + | "invalid_statement_descriptor_length" + | "invalid_statement_descriptor_prefix_denylisted" + | "invalid_statement_descriptor_prefix_mismatch" | "invalid_street_address" + | "invalid_tax_id" + | "invalid_tax_id_format" | "invalid_tos_acceptance" + | "invalid_url_denylisted" + | "invalid_url_format" + | "invalid_url_web_presence_detected" + | "invalid_url_website_business_information_mismatch" + | "invalid_url_website_empty" + | "invalid_url_website_inaccessible" + | "invalid_url_website_inaccessible_geoblocked" + | "invalid_url_website_inaccessible_password_protected" + | "invalid_url_website_incomplete" + | "invalid_url_website_incomplete_cancellation_policy" + | "invalid_url_website_incomplete_customer_service_details" + | "invalid_url_website_incomplete_legal_restrictions" + | "invalid_url_website_incomplete_refund_policy" + | "invalid_url_website_incomplete_return_policy" + | "invalid_url_website_incomplete_terms_and_conditions" + | "invalid_url_website_incomplete_under_construction" + | "invalid_url_website_other" | "invalid_value_other" | "verification_directors_mismatch" | "verification_document_address_mismatch" @@ -247,6 +297,7 @@ export type t_account_requirements_error = { | "verification_failed_keyed_match" | "verification_failed_name_match" | "verification_failed_other" + | "verification_failed_representative_authority" | "verification_failed_residential_address" | "verification_failed_tax_id_match" | "verification_failed_tax_id_not_issued" @@ -277,6 +328,7 @@ export type t_account_settings = { card_issuing?: t_account_card_issuing_settings card_payments: t_account_card_payments_settings dashboard: t_account_dashboard_settings + invoices?: t_account_invoices_settings payments: t_account_payments_settings payouts?: t_account_payout_settings sepa_debit_payments?: t_account_sepa_debit_payments_settings @@ -384,13 +436,14 @@ export type t_apps_secret = { export type t_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } export type t_balance = { available: t_balance_amount[] connect_reserved?: t_balance_amount[] - instant_available?: t_balance_amount[] + instant_available?: t_balance_amount_net[] issuing?: t_balance_detail livemode: boolean object: "balance" @@ -409,6 +462,12 @@ export type t_balance_amount_by_source_type = { fpx?: number } +export type t_balance_amount_net = { + amount: number + currency: string + source_types?: t_balance_amount_by_source_type +} + export type t_balance_detail = { available: t_balance_amount[] } @@ -455,22 +514,23 @@ export type t_balance_transaction = { | "application_fee" | "application_fee_refund" | "charge" + | "climate_order_purchase" + | "climate_order_refund" | "connect_collection_transfer" | "contribution" | "issuing_authorization_hold" | "issuing_authorization_release" | "issuing_dispute" | "issuing_transaction" - | "obligation_inbound" | "obligation_outbound" - | "obligation_payout" - | "obligation_payout_failure" | "obligation_reversal_inbound" - | "obligation_reversal_outbound" | "payment" | "payment_failure_refund" + | "payment_network_reserve_hold" + | "payment_network_reserve_release" | "payment_refund" | "payment_reversal" + | "payment_unreconciled" | "payout" | "payout_cancel" | "payout_failure" @@ -543,6 +603,7 @@ export type t_bank_connections_resource_balance_api_resource_credit_balance = { export type t_bank_connections_resource_balance_refresh = { last_attempted_at: number + next_refresh_available_at?: number | null status: "failed" | "pending" | "succeeded" } @@ -555,6 +616,66 @@ export type t_bank_connections_resource_ownership_refresh = { status: "failed" | "pending" | "succeeded" } +export type t_bank_connections_resource_transaction_refresh = { + id: string + last_attempted_at: number + next_refresh_available_at?: number | null + status: "failed" | "pending" | "succeeded" +} + +export type t_bank_connections_resource_transaction_resource_status_transitions = + { + posted_at?: number | null + void_at?: number | null + } + +export type t_billing_meter = { + created: number + customer_mapping: t_billing_meter_resource_customer_mapping_settings + default_aggregation: t_billing_meter_resource_aggregation_settings + display_name: string + event_name: string + event_time_window?: "day" | "hour" | null + id: string + livemode: boolean + object: "billing.meter" + status: "active" | "inactive" + status_transitions: t_billing_meter_resource_billing_meter_status_transitions + updated: number + value_settings: t_billing_meter_resource_billing_meter_value +} + +export type t_billing_meter_event = { + created: number + event_name: string + identifier: string + livemode: boolean + object: "billing.meter_event" + payload: { + [key: string]: string | undefined + } + timestamp: number +} + +export type t_billing_meter_event_adjustment = { + cancel: t_billing_meter_resource_billing_meter_event_adjustment_cancel + event_name: string + livemode: boolean + object: "billing.meter_event_adjustment" + status: "complete" | "pending" + type: "cancel" +} + +export type t_billing_meter_event_summary = { + aggregated_value: number + end_time: number + id: string + livemode: boolean + meter: string + object: "billing.meter_event_summary" + start_time: number +} + export type t_billing_details = { address?: t_address | null email?: string | null @@ -562,6 +683,27 @@ export type t_billing_details = { phone?: string | null } +export type t_billing_meter_resource_aggregation_settings = { + formula: "count" | "sum" +} + +export type t_billing_meter_resource_billing_meter_event_adjustment_cancel = { + identifier: string +} + +export type t_billing_meter_resource_billing_meter_status_transitions = { + deactivated_at?: number | null +} + +export type t_billing_meter_resource_billing_meter_value = { + event_payload_key: string +} + +export type t_billing_meter_resource_customer_mapping_settings = { + event_payload_key: string + type: "by_id" +} + export type t_billing_portal_configuration = { active: boolean application?: string | t_application | t_deleted_application | null @@ -700,6 +842,7 @@ export type t_card = { [key: string]: string | undefined } | null name?: string | null + networks?: t_token_card_networks object: "card" status?: string | null tokenization_method?: string | null @@ -812,6 +955,7 @@ export type t_checkout_session = { billing_address_collection?: "auto" | "required" | null cancel_url?: string | null client_reference_id?: string | null + client_secret?: string | null consent?: t_payment_pages_checkout_session_consent | null consent_collection?: t_payment_pages_checkout_session_consent_collection | null created: number @@ -891,6 +1035,8 @@ export type t_checkout_session = { payment_status: "no_payment_required" | "paid" | "unpaid" phone_number_collection?: t_payment_pages_checkout_session_phone_number_collection recovered_from?: string | null + redirect_on_completion?: "always" | "if_required" | "never" + return_url?: string setup_intent?: string | t_setup_intent | null shipping_address_collection?: t_payment_pages_checkout_session_shipping_address_collection | null shipping_cost?: t_payment_pages_checkout_session_shipping_cost | null @@ -902,6 +1048,7 @@ export type t_checkout_session = { success_url?: string | null tax_id_collection?: t_payment_pages_checkout_session_tax_id_collection total_details?: t_payment_pages_checkout_session_total_details | null + ui_mode?: "embedded" | "hosted" | null url?: string | null } @@ -955,6 +1102,7 @@ export type t_checkout_card_installments_options = { export type t_checkout_card_payment_method_options = { installments?: t_checkout_card_installments_options + request_three_d_secure: "any" | "automatic" | "challenge" setup_future_usage?: "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -1036,10 +1184,19 @@ export type t_checkout_paynow_payment_method_options = { setup_future_usage?: "none" } +export type t_checkout_paypal_payment_method_options = { + capture_method?: "manual" + preferred_locale?: string | null + reference?: string | null + setup_future_usage?: "none" | "off_session" +} + export type t_checkout_pix_payment_method_options = { expires_after_seconds?: number | null } +export type t_checkout_revolut_pay_payment_method_options = EmptyObject + export type t_checkout_sepa_debit_payment_method_options = { setup_future_usage?: "none" | "off_session" | "on_session" } @@ -1067,9 +1224,12 @@ export type t_checkout_session_payment_method_options = { oxxo?: t_checkout_oxxo_payment_method_options p24?: t_checkout_p24_payment_method_options paynow?: t_checkout_paynow_payment_method_options + paypal?: t_checkout_paypal_payment_method_options pix?: t_checkout_pix_payment_method_options + revolut_pay?: t_checkout_revolut_pay_payment_method_options sepa_debit?: t_checkout_sepa_debit_payment_method_options sofort?: t_checkout_sofort_payment_method_options + swish?: t_checkout_swish_payment_method_options us_bank_account?: t_checkout_us_bank_account_payment_method_options } @@ -1077,12 +1237,216 @@ export type t_checkout_sofort_payment_method_options = { setup_future_usage?: "none" } +export type t_checkout_swish_payment_method_options = { + reference?: string | null +} + export type t_checkout_us_bank_account_payment_method_options = { financial_connections?: t_linked_account_options_us_bank_account setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" } +export type t_climate_order = { + amount_fees: number + amount_subtotal: number + amount_total: number + beneficiary?: t_climate_removals_beneficiary + canceled_at?: number | null + cancellation_reason?: "expired" | "product_unavailable" | "requested" | null + certificate?: string | null + confirmed_at?: number | null + created: number + currency: string + delayed_at?: number | null + delivered_at?: number | null + delivery_details: t_climate_removals_order_deliveries[] + expected_delivery_year: number + id: string + livemode: boolean + metadata: { + [key: string]: string | undefined + } + metric_tons: string + object: "climate.order" + product: string | t_climate_product + product_substituted_at?: number | null + status: "awaiting_funds" | "canceled" | "confirmed" | "delivered" | "open" +} + +export type t_climate_product = { + created: number + current_prices_per_metric_ton: { + [key: string]: t_climate_removals_products_price | undefined + } + delivery_year?: number | null + id: string + livemode: boolean + metric_tons_available: string + name: string + object: "climate.product" + suppliers: t_climate_supplier[] +} + +export type t_climate_supplier = { + id: string + info_url: string + livemode: boolean + locations: t_climate_removals_location[] + name: string + object: "climate.supplier" + removal_pathway: + | "biomass_carbon_removal_and_storage" + | "direct_air_capture" + | "enhanced_weathering" +} + +export type t_climate_removals_beneficiary = { + public_name: string +} + +export type t_climate_removals_location = { + city?: string | null + country: string + latitude?: number | null + longitude?: number | null + region?: string | null +} + +export type t_climate_removals_order_deliveries = { + delivered_at: number + location?: t_climate_removals_location | null + metric_tons: string + registry_url?: string | null + supplier: t_climate_supplier +} + +export type t_climate_removals_products_price = { + amount_fees: number + amount_subtotal: number + amount_total: number +} + +export type t_confirmation_token = { + created: number + expires_at?: number | null + id: string + livemode: boolean + mandate_data?: t_confirmation_tokens_resource_mandate_data | null + object: "confirmation_token" + payment_intent?: string | null + payment_method_preview?: t_confirmation_tokens_resource_payment_method_preview | null + return_url?: string | null + setup_future_usage?: "off_session" | "on_session" | null + setup_intent?: string | null + shipping?: t_confirmation_tokens_resource_shipping | null + use_stripe_sdk: boolean +} + +export type t_confirmation_tokens_resource_mandate_data = { + customer_acceptance: t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance +} + +export type t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance = + { + online?: t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online | null + type: string + } + +export type t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online = + { + ip_address?: string | null + user_agent?: string | null + } + +export type t_confirmation_tokens_resource_payment_method_preview = { + acss_debit?: t_payment_method_acss_debit + affirm?: t_payment_method_affirm + afterpay_clearpay?: t_payment_method_afterpay_clearpay + alipay?: t_payment_flows_private_payment_methods_alipay + au_becs_debit?: t_payment_method_au_becs_debit + bacs_debit?: t_payment_method_bacs_debit + bancontact?: t_payment_method_bancontact + billing_details: t_billing_details + blik?: t_payment_method_blik + boleto?: t_payment_method_boleto + card?: t_payment_method_card + card_present?: t_payment_method_card_present + cashapp?: t_payment_method_cashapp + customer_balance?: t_payment_method_customer_balance + eps?: t_payment_method_eps + fpx?: t_payment_method_fpx + giropay?: t_payment_method_giropay + grabpay?: t_payment_method_grabpay + ideal?: t_payment_method_ideal + interac_present?: t_payment_method_interac_present + klarna?: t_payment_method_klarna + konbini?: t_payment_method_konbini + link?: t_payment_method_link + mobilepay?: t_payment_method_mobilepay + oxxo?: t_payment_method_oxxo + p24?: t_payment_method_p24 + paynow?: t_payment_method_paynow + paypal?: t_payment_method_paypal + pix?: t_payment_method_pix + promptpay?: t_payment_method_promptpay + revolut_pay?: t_payment_method_revolut_pay + sepa_debit?: t_payment_method_sepa_debit + sofort?: t_payment_method_sofort + swish?: t_payment_method_swish + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "card" + | "card_present" + | "cashapp" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "interac_present" + | "klarna" + | "konbini" + | "link" + | "mobilepay" + | "oxxo" + | "p24" + | "paynow" + | "paypal" + | "pix" + | "promptpay" + | "revolut_pay" + | "sepa_debit" + | "sofort" + | "swish" + | "us_bank_account" + | "wechat_pay" + | "zip" + us_bank_account?: t_payment_method_us_bank_account + wechat_pay?: t_payment_method_wechat_pay + zip?: t_payment_method_zip +} + +export type t_confirmation_tokens_resource_shipping = { + address: t_address + name: string + phone?: string | null +} + +export type t_connect_account_reference = { + account?: string | t_account + type: "account" | "self" +} + export type t_connect_collection_transfer = { amount: number currency: string @@ -1092,12 +1456,49 @@ export type t_connect_collection_transfer = { object: "connect_collection_transfer" } +export type t_connect_embedded_account_config = { + enabled: boolean + features: t_connect_embedded_account_features +} + +export type t_connect_embedded_account_features = EmptyObject + export type t_connect_embedded_account_session_create_components = { - account_onboarding: t_connect_embedded_base_config_claim + account_onboarding: t_connect_embedded_account_config + documents: t_connect_embedded_base_config_claim + payment_details: t_connect_embedded_payments_config + payments: t_connect_embedded_payments_config + payouts: t_connect_embedded_payouts_config } export type t_connect_embedded_base_config_claim = { enabled: boolean + features: t_connect_embedded_base_features +} + +export type t_connect_embedded_base_features = EmptyObject + +export type t_connect_embedded_payments_config = { + enabled: boolean + features: t_connect_embedded_payments_features +} + +export type t_connect_embedded_payments_features = { + capture_payments: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management: boolean + refund_management: boolean +} + +export type t_connect_embedded_payouts_config = { + enabled: boolean + features: t_connect_embedded_payouts_features +} + +export type t_connect_embedded_payouts_features = { + edit_payout_schedule: boolean + instant_payouts: boolean + standard_payouts: boolean } export type t_country_spec = { @@ -1189,7 +1590,7 @@ export type t_credit_note = { | "product_unsatisfactory" | null refund?: string | t_refund | null - shipping_cost?: t_invoices_shipping_cost | null + shipping_cost?: t_invoices_resource_shipping_cost | null status: "issued" | "void" subtotal: number subtotal_excluding_tax?: number | null @@ -1382,6 +1783,11 @@ export type t_customer_balance_resource_cash_balance_transaction_resource_refund refund: string | t_refund } +export type t_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance = + { + balance_transaction: string | t_balance_transaction + } + export type t_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction = { payment_intent: string | t_payment_intent @@ -1428,6 +1834,7 @@ export type t_customer_cash_balance_transaction = { net_amount: number object: "customer_cash_balance_transaction" refunded_from_payment?: t_customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction + transferred_to_balance?: t_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance type: | "adjusted_for_overdraft" | "applied_to_payment" @@ -1436,10 +1843,34 @@ export type t_customer_cash_balance_transaction = { | "refunded_from_payment" | "return_canceled" | "return_initiated" + | "transferred_to_balance" | "unapplied_from_payment" unapplied_from_payment?: t_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction } +export type t_customer_session = { + client_secret: string + components?: t_customer_session_resource_components + created: number + customer: string | t_customer + expires_at: number + livemode: boolean + object: "customer_session" +} + +export type t_customer_session_resource_components = { + buy_button: t_customer_session_resource_components_resource_buy_button + pricing_table: t_customer_session_resource_components_resource_pricing_table +} + +export type t_customer_session_resource_components_resource_buy_button = { + enabled: boolean +} + +export type t_customer_session_resource_components_resource_pricing_table = { + enabled: boolean +} + export type t_customer_tax = { automatic_tax: | "failed" @@ -1517,6 +1948,7 @@ export type t_deleted_discount = { promotion_code?: string | t_promotion_code | null start: number subscription?: string | null + subscription_item?: string | null } export type t_deleted_external_account = t_deleted_bank_account | t_deleted_card @@ -1613,6 +2045,8 @@ export type t_deleted_webhook_endpoint = { object: "webhook_endpoint" } +export type t_destination_details_unimplemented = EmptyObject + export type t_discount = { checkout_session?: string | null coupon: t_coupon @@ -1625,6 +2059,7 @@ export type t_discount = { promotion_code?: string | t_promotion_code | null start: number subscription?: string | null + subscription_item?: string | null } export type t_discounts_resource_discount_amount = { @@ -1632,6 +2067,12 @@ export type t_discounts_resource_discount_amount = { discount: string | t_discount | t_deleted_discount } +export type t_discounts_resource_stackable_discount = { + coupon?: string | t_coupon | null + discount?: string | t_discount | null + promotion_code?: string | t_promotion_code | null +} + export type t_dispute = { amount: number balance_transactions: t_balance_transaction[] @@ -1849,7 +2290,9 @@ export type t_financial_connections_account = { | "mortgage" | "other" | "savings" + subscriptions?: "transactions"[] | null supported_payment_method_types: ("link" | "us_bank_account")[] + transaction_refresh?: t_bank_connections_resource_transaction_refresh | null } export type t_financial_connections_account_owner = { @@ -1889,10 +2332,25 @@ export type t_financial_connections_session = { livemode: boolean object: "financial_connections.session" permissions: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: ("balances" | "ownership")[] | null + prefetch?: ("balances" | "ownership" | "transactions")[] | null return_url?: string } +export type t_financial_connections_transaction = { + account: string + amount: number + currency: string + description: string + id: string + livemode: boolean + object: "financial_connections.transaction" + status: "pending" | "posted" | "void" + status_transitions: t_bank_connections_resource_transaction_resource_status_transitions + transacted_at: number + transaction_refresh: string + updated: number +} + export type t_financial_reporting_finance_report_run_run_parameters = { columns?: string[] connected_account?: string @@ -1904,6 +2362,47 @@ export type t_financial_reporting_finance_report_run_run_parameters = { timezone?: string } +export type t_forwarded_request_context = { + destination_duration: number + destination_ip_address: string +} + +export type t_forwarded_request_details = { + body: string + headers: t_forwarded_request_header[] + http_method: "POST" +} + +export type t_forwarded_request_header = { + name: string + value: string +} + +export type t_forwarded_response_details = { + body: string + headers: t_forwarded_request_header[] + status: number +} + +export type t_forwarding_request = { + config: string + created: number + id: string + livemode: boolean + object: "forwarding.request" + payment_method: string + replacements: ( + | "card_cvc" + | "card_expiry" + | "card_number" + | "cardholder_name" + )[] + request_context?: t_forwarded_request_context | null + request_details?: t_forwarded_request_details | null + response_details?: t_forwarded_response_details | null + url?: string | null +} + export type t_funding_instructions = { bank_transfer: t_funding_instructions_bank_transfer currency: string @@ -1918,12 +2417,29 @@ export type t_funding_instructions_bank_transfer = { type: "eu_bank_transfer" | "jp_bank_transfer" } +export type t_funding_instructions_bank_transfer_aba_record = { + account_number: string + bank_name: string + routing_number: string +} + export type t_funding_instructions_bank_transfer_financial_address = { + aba?: t_funding_instructions_bank_transfer_aba_record iban?: t_funding_instructions_bank_transfer_iban_record sort_code?: t_funding_instructions_bank_transfer_sort_code_record spei?: t_funding_instructions_bank_transfer_spei_record - supported_networks?: ("bacs" | "fps" | "sepa" | "spei" | "zengin")[] - type: "iban" | "sort_code" | "spei" | "zengin" + supported_networks?: ( + | "ach" + | "bacs" + | "domestic_wire_us" + | "fps" + | "sepa" + | "spei" + | "swift" + | "zengin" + )[] + swift?: t_funding_instructions_bank_transfer_swift_record + type: "aba" | "iban" | "sort_code" | "spei" | "swift" | "zengin" zengin?: t_funding_instructions_bank_transfer_zengin_record } @@ -1946,6 +2462,12 @@ export type t_funding_instructions_bank_transfer_spei_record = { clabe: string } +export type t_funding_instructions_bank_transfer_swift_record = { + account_number: string + bank_name: string + swift_code: string +} + export type t_funding_instructions_bank_transfer_zengin_record = { account_holder_name?: string | null account_number?: string | null @@ -2010,6 +2532,17 @@ export type t_gelato_document_report_error = { reason?: string | null } +export type t_gelato_email_report = { + email?: string | null + error?: t_gelato_email_report_error | null + status: "unverified" | "verified" +} + +export type t_gelato_email_report_error = { + code?: "email_unverified_other" | "email_verification_declined" | null + reason?: string | null +} + export type t_gelato_id_number_report = { dob?: t_gelato_data_id_number_report_date | null error?: t_gelato_id_number_report_error | null @@ -2029,6 +2562,22 @@ export type t_gelato_id_number_report_error = { reason?: string | null } +export type t_gelato_phone_report = { + error?: t_gelato_phone_report_error | null + phone?: string | null + status: "unverified" | "verified" +} + +export type t_gelato_phone_report_error = { + code?: "phone_unverified_other" | "phone_verification_declined" | null + reason?: string | null +} + +export type t_gelato_provided_details = { + email?: string + phone?: string +} + export type t_gelato_report_document_options = { allowed_types?: ("driving_license" | "id_card" | "passport")[] require_id_number?: boolean @@ -2062,6 +2611,10 @@ export type t_gelato_session_document_options = { require_matching_selfie?: boolean } +export type t_gelato_session_email_options = { + require_verification?: boolean +} + export type t_gelato_session_id_number_options = EmptyObject export type t_gelato_session_last_error = { @@ -2073,9 +2626,13 @@ export type t_gelato_session_last_error = { | "document_expired" | "document_type_not_supported" | "document_unverified_other" + | "email_unverified_other" + | "email_verification_declined" | "id_number_insufficient_document_data" | "id_number_mismatch" | "id_number_unverified_other" + | "phone_unverified_other" + | "phone_verification_declined" | "selfie_document_missing_photo" | "selfie_face_mismatch" | "selfie_manipulated" @@ -2085,6 +2642,10 @@ export type t_gelato_session_last_error = { reason?: string | null } +export type t_gelato_session_phone_options = { + require_verification?: boolean +} + export type t_gelato_verification_report_options = { document?: t_gelato_report_document_options id_number?: t_gelato_report_id_number_options @@ -2092,32 +2653,41 @@ export type t_gelato_verification_report_options = { export type t_gelato_verification_session_options = { document?: t_gelato_session_document_options + email?: t_gelato_session_email_options id_number?: t_gelato_session_id_number_options + phone?: t_gelato_session_phone_options } export type t_gelato_verified_outputs = { address?: t_address | null dob?: t_gelato_data_verified_outputs_date | null + email?: string | null first_name?: string | null id_number?: string | null id_number_type?: "br_cpf" | "sg_nric" | "us_ssn" | null last_name?: string | null + phone?: string | null } export type t_identity_verification_report = { + client_reference_id?: string | null created: number document?: t_gelato_document_report + email?: t_gelato_email_report id: string id_number?: t_gelato_id_number_report livemode: boolean object: "identity.verification_report" options?: t_gelato_verification_report_options + phone?: t_gelato_phone_report selfie?: t_gelato_selfie_report - type?: "document" | "id_number" + type: "document" | "id_number" | "verification_flow" + verification_flow?: string verification_session?: string | null } export type t_identity_verification_session = { + client_reference_id?: string | null client_secret?: string | null created: number id: string @@ -2129,10 +2699,12 @@ export type t_identity_verification_session = { } object: "identity.verification_session" options?: t_gelato_verification_session_options | null + provided_details?: t_gelato_provided_details | null redaction?: t_verification_session_redaction | null status: "canceled" | "processing" | "requires_input" | "verified" - type?: "document" | "id_number" | null + type: "document" | "id_number" | "verification_flow" url?: string | null + verification_flow?: string verified_outputs?: t_gelato_verified_outputs | null } @@ -2148,10 +2720,19 @@ export type t_inbound_transfers_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" routing_number?: string | null } +export type t_internal_card = { + brand?: string | null + country?: string | null + exp_month?: number | null + exp_year?: number | null + last4?: string | null +} + export type t_invoice = { account_country?: string | null account_name?: string | null @@ -2195,15 +2776,16 @@ export type t_invoice = { default_tax_rates: t_tax_rate[] description?: string | null discount?: t_discount | null - discounts?: (string | t_discount | t_deleted_discount)[] | null + discounts: (string | t_discount | t_deleted_discount)[] due_date?: number | null effective_at?: number | null ending_balance?: number | null footer?: string | null - from_invoice?: t_invoices_from_invoice | null + from_invoice?: t_invoices_resource_from_invoice | null hosted_invoice_url?: string | null id?: string invoice_pdf?: string | null + issuer: t_connect_account_reference last_finalization_error?: t_api_errors | null latest_revision?: string | t_invoice | null lines: { @@ -2230,14 +2812,13 @@ export type t_invoice = { pre_payment_credit_notes_amount: number quote?: string | t_quote | null receipt_number?: string | null - rendering?: t_invoices_invoice_rendering | null - rendering_options?: t_invoice_setting_rendering_options | null - shipping_cost?: t_invoices_shipping_cost | null + rendering?: t_invoices_resource_invoice_rendering | null + shipping_cost?: t_invoices_resource_shipping_cost | null shipping_details?: t_shipping | null starting_balance: number statement_descriptor?: string | null status?: "draft" | "open" | "paid" | "uncollectible" | "void" | null - status_transitions: t_invoices_status_transitions + status_transitions: t_invoices_resource_status_transitions subscription?: string | t_subscription | null subscription_details?: t_subscription_details_data | null subscription_proration_date?: number @@ -2289,7 +2870,7 @@ export type t_invoice_payment_method_options_bancontact = { export type t_invoice_payment_method_options_card = { installments?: t_invoice_installments_card - request_three_d_secure?: "any" | "automatic" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_invoice_payment_method_options_customer_balance = { @@ -2309,6 +2890,8 @@ export type t_invoice_payment_method_options_customer_balance_bank_transfer_eu_b export type t_invoice_payment_method_options_konbini = EmptyObject +export type t_invoice_payment_method_options_sepa_debit = EmptyObject + export type t_invoice_payment_method_options_us_bank_account = { financial_connections?: t_invoice_payment_method_options_us_bank_account_linked_account_options verification_method?: "automatic" | "instant" | "microdeposits" @@ -2317,7 +2900,7 @@ export type t_invoice_payment_method_options_us_bank_account = { export type t_invoice_payment_method_options_us_bank_account_linked_account_options = { permissions?: ("balances" | "payment_method" | "transactions")[] - prefetch?: "balances"[] | null + prefetch?: ("balances" | "transactions")[] | null } export type t_invoice_rendering_pdf = { @@ -2338,6 +2921,7 @@ export type t_invoice_setting_customer_setting = { export type t_invoice_setting_quote_setting = { days_until_due?: number | null + issuer: t_connect_account_reference } export type t_invoice_setting_rendering_options = { @@ -2345,11 +2929,15 @@ export type t_invoice_setting_rendering_options = { } export type t_invoice_setting_subscription_schedule_phase_setting = { + account_tax_ids?: (string | t_tax_id | t_deleted_tax_id)[] | null days_until_due?: number | null + issuer?: t_connect_account_reference | null } export type t_invoice_setting_subscription_schedule_setting = { + account_tax_ids?: (string | t_tax_id | t_deleted_tax_id)[] | null days_until_due?: number | null + issuer: t_connect_account_reference } export type t_invoice_tax_amount = { @@ -2413,22 +3001,13 @@ export type t_invoiceitem = { unit_amount_decimal?: string | null } -export type t_invoices_from_invoice = { - action: string - invoice: string | t_invoice -} - -export type t_invoices_invoice_rendering = { - amount_tax_display?: string | null - pdf?: t_invoice_rendering_pdf | null -} - export type t_invoices_payment_method_options = { acss_debit?: t_invoice_payment_method_options_acss_debit | null bancontact?: t_invoice_payment_method_options_bancontact | null card?: t_invoice_payment_method_options_card | null customer_balance?: t_invoice_payment_method_options_customer_balance | null konbini?: t_invoice_payment_method_options_konbini | null + sepa_debit?: t_invoice_payment_method_options_sepa_debit | null us_bank_account?: t_invoice_payment_method_options_us_bank_account | null } @@ -2447,12 +3026,14 @@ export type t_invoices_payment_settings = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -2464,6 +3045,16 @@ export type t_invoices_payment_settings = { | null } +export type t_invoices_resource_from_invoice = { + action: string + invoice: string | t_invoice +} + +export type t_invoices_resource_invoice_rendering = { + amount_tax_display?: string | null + pdf?: t_invoice_rendering_pdf | null +} + export type t_invoices_resource_invoice_tax_id = { type: | "ad_nrt" @@ -2511,6 +3102,7 @@ export type t_invoices_resource_invoice_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -2545,7 +3137,7 @@ export type t_invoices_resource_line_items_proration_details = { credited_items?: t_invoices_resource_line_items_credited_items | null } -export type t_invoices_shipping_cost = { +export type t_invoices_resource_shipping_cost = { amount_subtotal: number amount_tax: number amount_total: number @@ -2553,7 +3145,7 @@ export type t_invoices_shipping_cost = { taxes?: t_line_items_tax_amount[] } -export type t_invoices_status_transitions = { +export type t_invoices_resource_status_transitions = { finalized_at?: number | null marked_uncollectible_at?: number | null paid_at?: number | null @@ -2583,6 +3175,7 @@ export type t_issuing_authorization = { pending_request?: t_issuing_authorization_pending_request | null request_history: t_issuing_authorization_request[] status: "closed" | "pending" | "reversed" + token?: string | t_issuing_token | null transactions: t_issuing_transaction[] treasury?: t_issuing_authorization_treasury | null verification_data: t_issuing_authorization_verification_data @@ -2607,6 +3200,7 @@ export type t_issuing_card = { } number?: string object: "issuing.card" + personalization_design?: string | t_issuing_personalization_design | null replaced_by?: string | t_issuing_card | null replacement_for?: string | t_issuing_card | null replacement_reason?: "damaged" | "expired" | "lost" | "stolen" | null @@ -2655,6 +3249,34 @@ export type t_issuing_dispute = { treasury?: t_issuing_dispute_treasury | null } +export type t_issuing_personalization_design = { + card_logo?: string | t_file | null + carrier_text?: t_issuing_personalization_design_carrier_text | null + created: number + id: string + livemode: boolean + lookup_key?: string | null + metadata: { + [key: string]: string | undefined + } + name?: string | null + object: "issuing.personalization_design" + physical_bundle: string | t_issuing_physical_bundle + preferences: t_issuing_personalization_design_preferences + rejection_reasons: t_issuing_personalization_design_rejection_reasons + status: "active" | "inactive" | "rejected" | "review" +} + +export type t_issuing_physical_bundle = { + features?: t_issuing_physical_bundle_features + id: string + livemode: boolean + name: string + object: "issuing.physical_bundle" + status: "active" | "inactive" | "review" + type: "custom" | "standard" +} + export type t_issuing_settlement = { bin: string clearing_date: number @@ -2676,6 +3298,21 @@ export type t_issuing_settlement = { transaction_volume: number } +export type t_issuing_token = { + card: string | t_issuing_card + created: number + device_fingerprint?: string | null + id: string + last4?: string + livemode: boolean + network: "mastercard" | "visa" + network_data?: t_issuing_network_token_network_data + network_updated_at: number + object: "issuing.token" + status: "active" | "deleted" | "requested" | "suspended" + wallet_provider?: "apple_pay" | "google_pay" | "samsung_pay" +} + export type t_issuing_transaction = { amount: number amount_details?: t_issuing_transaction_amount_details | null @@ -2694,8 +3331,10 @@ export type t_issuing_transaction = { metadata: { [key: string]: string | undefined } + network_data?: t_issuing_transaction_network_data | null object: "issuing.transaction" purchase_details?: t_issuing_transaction_purchase_details | null + token?: string | t_issuing_token | null treasury?: t_issuing_transaction_treasury | null type: "capture" | "refund" wallet?: "apple_pay" | "google_pay" | "samsung_pay" | null @@ -2706,6 +3345,11 @@ export type t_issuing_authorization_amount_details = { cashback_amount?: number | null } +export type t_issuing_authorization_authentication_exemption = { + claimed_by: "acquirer" | "issuer" + type: "low_value_transaction" | "transaction_risk_analysis" | "unknown" +} + export type t_issuing_authorization_merchant_data = { category: string category_code: string @@ -2716,10 +3360,13 @@ export type t_issuing_authorization_merchant_data = { postal_code?: string | null state?: string | null terminal_id?: string | null + url?: string | null } export type t_issuing_authorization_network_data = { acquiring_institution_id?: string | null + system_trace_audit_number?: string | null + transaction_id?: string | null } export type t_issuing_authorization_pending_request = { @@ -2729,16 +3376,19 @@ export type t_issuing_authorization_pending_request = { is_amount_controllable: boolean merchant_amount: number merchant_currency: string + network_risk_score?: number | null } export type t_issuing_authorization_request = { amount: number amount_details?: t_issuing_authorization_amount_details | null approved: boolean + authorization_code?: string | null created: number currency: string merchant_amount: number merchant_currency: string + network_risk_score?: number | null reason: | "account_disabled" | "card_active" @@ -2755,6 +3405,11 @@ export type t_issuing_authorization_request = { | "webhook_error" | "webhook_timeout" reason_message?: string | null + requested_at?: number | null +} + +export type t_issuing_authorization_three_d_secure = { + result: "attempt_acknowledged" | "authenticated" | "failed" | "required" } export type t_issuing_authorization_treasury = { @@ -2766,8 +3421,11 @@ export type t_issuing_authorization_treasury = { export type t_issuing_authorization_verification_data = { address_line1_check: "match" | "mismatch" | "not_provided" address_postal_code_check: "match" | "mismatch" | "not_provided" + authentication_exemption?: t_issuing_authorization_authentication_exemption | null cvc_check: "match" | "mismatch" | "not_provided" expiry_check: "match" | "mismatch" | "not_provided" + postal_code?: string | null + three_d_secure?: t_issuing_authorization_three_d_secure | null } export type t_issuing_card_apple_pay = { @@ -3079,6 +3737,7 @@ export type t_issuing_card_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + allowed_merchant_countries?: string[] | null blocked_categories?: | ( | "ac_refrigeration_repair" @@ -3378,6 +4037,7 @@ export type t_issuing_card_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + blocked_merchant_countries?: string[] | null spending_limits?: t_issuing_card_spending_limit[] | null spending_limits_currency?: string | null } @@ -4037,6 +4697,7 @@ export type t_issuing_cardholder_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + allowed_merchant_countries?: string[] | null blocked_categories?: | ( | "ac_refrigeration_repair" @@ -4336,6 +4997,7 @@ export type t_issuing_cardholder_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + blocked_merchant_countries?: string[] | null spending_limits?: t_issuing_cardholder_spending_limit[] | null spending_limits_currency?: string | null } @@ -4791,6 +5453,128 @@ export type t_issuing_dispute_treasury = { received_debit: string } +export type t_issuing_network_token_address = { + line1: string + postal_code: string +} + +export type t_issuing_network_token_device = { + device_fingerprint?: string + ip_address?: string + location?: string + name?: string + phone_number?: string + type?: "other" | "phone" | "watch" +} + +export type t_issuing_network_token_mastercard = { + card_reference_id?: string + token_reference_id: string + token_requestor_id: string + token_requestor_name?: string +} + +export type t_issuing_network_token_network_data = { + device?: t_issuing_network_token_device + mastercard?: t_issuing_network_token_mastercard + type: "mastercard" | "visa" + visa?: t_issuing_network_token_visa + wallet_provider?: t_issuing_network_token_wallet_provider +} + +export type t_issuing_network_token_visa = { + card_reference_id: string + token_reference_id: string + token_requestor_id: string + token_risk_score?: string +} + +export type t_issuing_network_token_wallet_provider = { + account_id?: string + account_trust_score?: number + card_number_source?: "app" | "manual" | "on_file" | "other" + cardholder_address?: t_issuing_network_token_address + cardholder_name?: string + device_trust_score?: number + hashed_account_email_address?: string + reason_codes?: ( + | "account_card_too_new" + | "account_recently_changed" + | "account_too_new" + | "account_too_new_since_launch" + | "additional_device" + | "data_expired" + | "defer_id_v_decision" + | "device_recently_lost" + | "good_activity_history" + | "has_suspended_tokens" + | "high_risk" + | "inactive_account" + | "long_account_tenure" + | "low_account_score" + | "low_device_score" + | "low_phone_number_score" + | "network_service_error" + | "outside_home_territory" + | "provisioning_cardholder_mismatch" + | "provisioning_device_and_cardholder_mismatch" + | "provisioning_device_mismatch" + | "same_device_no_prior_authentication" + | "same_device_successful_prior_authentication" + | "software_update" + | "suspicious_activity" + | "too_many_different_cardholders" + | "too_many_recent_attempts" + | "too_many_recent_tokens" + )[] + suggested_decision?: "approve" | "decline" | "require_auth" + suggested_decision_version?: string +} + +export type t_issuing_personalization_design_carrier_text = { + footer_body?: string | null + footer_title?: string | null + header_body?: string | null + header_title?: string | null +} + +export type t_issuing_personalization_design_preferences = { + is_default: boolean + is_platform_default?: boolean | null +} + +export type t_issuing_personalization_design_rejection_reasons = { + card_logo?: + | ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_binary_image" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + | null + carrier_text?: + | ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + | null +} + +export type t_issuing_physical_bundle_features = { + card_logo: "optional" | "required" | "unsupported" + carrier_text: "optional" | "required" | "unsupported" + second_line: "optional" | "required" | "unsupported" +} + export type t_issuing_transaction_amount_details = { atm_fee?: number | null cashback_amount?: number | null @@ -4825,6 +5609,12 @@ export type t_issuing_transaction_lodging_data = { nights?: number | null } +export type t_issuing_transaction_network_data = { + authorization_code?: string | null + processing_date?: string | null + transaction_id?: string | null +} + export type t_issuing_transaction_purchase_details = { flight?: t_issuing_transaction_flight_data | null fuel?: t_issuing_transaction_fuel_data | null @@ -4890,6 +5680,7 @@ export type t_legal_entity_company = { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -4958,8 +5749,9 @@ export type t_line_item = { description?: string | null discount_amounts?: t_discounts_resource_discount_amount[] | null discountable: boolean - discounts?: (string | t_discount)[] | null + discounts: (string | t_discount)[] id: string + invoice?: string | null invoice_item?: string | t_invoiceitem livemode: boolean metadata: { @@ -5009,7 +5801,7 @@ export type t_line_items_tax_amount = { export type t_linked_account_options_us_bank_account = { permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: "balances"[] | null + prefetch?: ("balances" | "transactions")[] | null return_url?: string } @@ -5047,6 +5839,13 @@ export type t_mandate_au_becs_debit = { export type t_mandate_bacs_debit = { network_status: "accepted" | "pending" | "refused" | "revoked" reference: string + revocation_reason?: + | "account_closed" + | "bank_account_restricted" + | "bank_ownership_changed" + | "could_not_process" + | "debit_not_authorized" + | null url: string } @@ -5084,7 +5883,9 @@ export type t_mandate_single_use = { currency: string } -export type t_mandate_us_bank_account = EmptyObject +export type t_mandate_us_bank_account = { + collection_method?: "paper" +} export type t_networks = { available: string[] @@ -5126,6 +5927,7 @@ export type t_outbound_payments_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" | "us_domestic_wire" routing_number?: string | null } @@ -5142,6 +5944,7 @@ export type t_outbound_transfers_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" | "us_domestic_wire" routing_number?: string | null } @@ -5184,6 +5987,27 @@ export type t_payment_flows_private_payment_methods_alipay_details = { transaction_id?: string | null } +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization = + { + status: "disabled" | "enabled" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization = + { + status: "available" | "unavailable" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture = + { + maximum_amount_capturable: number + status: "available" | "unavailable" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_multicapture = + { + status: "available" | "unavailable" + } + export type t_payment_flows_private_payment_methods_klarna_dob = { day?: number | null month?: number | null @@ -5265,6 +6089,7 @@ export type t_payment_intent_next_action = { pix_display_qr_code?: t_payment_intent_next_action_pix_display_qr_code promptpay_display_qr_code?: t_payment_intent_next_action_promptpay_display_qr_code redirect_to_url?: t_payment_intent_next_action_redirect_to_url + swish_handle_redirect_or_display_qr_code?: t_payment_intent_next_action_swish_handle_redirect_or_display_qr_code type: string use_stripe_sdk?: EmptyObject verify_with_microdeposits?: t_payment_intent_next_action_verify_with_microdeposits @@ -5385,6 +6210,18 @@ export type t_payment_intent_next_action_redirect_to_url = { url?: string | null } +export type t_payment_intent_next_action_swish_handle_redirect_or_display_qr_code = + { + hosted_instructions_url: string + qr_code: t_payment_intent_next_action_swish_qr_code + } + +export type t_payment_intent_next_action_swish_qr_code = { + data: string + image_url_png: string + image_url_svg: string +} + export type t_payment_intent_next_action_verify_with_microdeposits = { arrival_date: number hosted_verification_url: string @@ -5480,6 +6317,9 @@ export type t_payment_intent_payment_method_options = { link?: | t_payment_intent_payment_method_options_link | t_payment_intent_type_specific_payment_method_options_client + mobilepay?: + | t_payment_intent_payment_method_options_mobilepay + | t_payment_intent_type_specific_payment_method_options_client oxxo?: | t_payment_method_options_oxxo | t_payment_intent_type_specific_payment_method_options_client @@ -5498,12 +6338,18 @@ export type t_payment_intent_payment_method_options = { promptpay?: | t_payment_method_options_promptpay | t_payment_intent_type_specific_payment_method_options_client + revolut_pay?: + | t_payment_method_options_revolut_pay + | t_payment_intent_type_specific_payment_method_options_client sepa_debit?: | t_payment_intent_payment_method_options_sepa_debit | t_payment_intent_type_specific_payment_method_options_client sofort?: | t_payment_method_options_sofort | t_payment_intent_type_specific_payment_method_options_client + swish?: + | t_payment_intent_payment_method_options_swish + | t_payment_intent_type_specific_payment_method_options_client us_bank_account?: | t_payment_intent_payment_method_options_us_bank_account | t_payment_intent_type_specific_payment_method_options_client @@ -5525,7 +6371,9 @@ export type t_payment_intent_payment_method_options_au_becs_debit = { setup_future_usage?: "none" | "off_session" | "on_session" } -export type t_payment_intent_payment_method_options_blik = EmptyObject +export type t_payment_intent_payment_method_options_blik = { + setup_future_usage?: "none" +} export type t_payment_intent_payment_method_options_card = { capture_method?: "manual" @@ -5544,7 +6392,12 @@ export type t_payment_intent_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | "challenge_only" | null + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" | null + require_cvc_recollection?: boolean setup_future_usage?: "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -5570,13 +6423,24 @@ export type t_payment_intent_payment_method_options_mandate_options_acss_debit = export type t_payment_intent_payment_method_options_mandate_options_sepa_debit = EmptyObject +export type t_payment_intent_payment_method_options_mobilepay = { + capture_method?: "manual" + setup_future_usage?: "none" +} + export type t_payment_intent_payment_method_options_sepa_debit = { mandate_options?: t_payment_intent_payment_method_options_mandate_options_sepa_debit setup_future_usage?: "none" | "off_session" | "on_session" } +export type t_payment_intent_payment_method_options_swish = { + reference?: string | null + setup_future_usage?: "none" +} + export type t_payment_intent_payment_method_options_us_bank_account = { financial_connections?: t_linked_account_options_us_bank_account + mandate_options?: t_payment_method_options_us_bank_account_mandate_options preferred_settlement_speed?: "fastest" | "standard" setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" | "microdeposits" @@ -5595,6 +6459,7 @@ export type t_payment_intent_processing_customer_notification = { export type t_payment_intent_type_specific_payment_method_options_client = { capture_method?: "manual" | "manual_preferred" installments?: t_payment_flows_installment_options + require_cvc_recollection?: boolean setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" | "microdeposits" } @@ -5614,6 +6479,7 @@ export type t_payment_link = { custom_text: t_payment_links_resource_custom_text customer_creation: "always" | "if_required" id: string + inactive_message?: string | null invoice_creation?: t_payment_links_resource_invoice_creation | null line_items?: { data: t_item[] @@ -5657,11 +6523,13 @@ export type t_payment_link = { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] | null phone_number_collection: t_payment_links_resource_phone_number_collection + restrictions?: t_payment_links_resource_restrictions | null shipping_address_collection?: t_payment_links_resource_shipping_address_collection | null shipping_options: t_payment_links_resource_shipping_option[] submit_type: "auto" | "book" | "donate" | "pay" @@ -5679,6 +6547,12 @@ export type t_payment_links_resource_after_completion = { export type t_payment_links_resource_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null +} + +export type t_payment_links_resource_completed_sessions = { + count: number + limit: number } export type t_payment_links_resource_completion_behavior_confirmation_page = { @@ -5690,17 +6564,18 @@ export type t_payment_links_resource_completion_behavior_redirect = { } export type t_payment_links_resource_consent_collection = { + payment_method_reuse_agreement?: t_payment_links_resource_payment_method_reuse_agreement | null promotions?: "auto" | "none" | null terms_of_service?: "none" | "required" | null } export type t_payment_links_resource_custom_fields = { - dropdown?: t_payment_links_resource_custom_fields_dropdown | null + dropdown?: t_payment_links_resource_custom_fields_dropdown key: string label: t_payment_links_resource_custom_fields_label - numeric?: t_payment_links_resource_custom_fields_numeric | null + numeric?: t_payment_links_resource_custom_fields_numeric optional: boolean - text?: t_payment_links_resource_custom_fields_text | null + text?: t_payment_links_resource_custom_fields_text type: "dropdown" | "numeric" | "text" } @@ -5729,6 +6604,7 @@ export type t_payment_links_resource_custom_fields_text = { } export type t_payment_links_resource_custom_text = { + after_submit?: t_payment_links_resource_custom_text_position | null shipping_address?: t_payment_links_resource_custom_text_position | null submit?: t_payment_links_resource_custom_text_position | null terms_of_service_acceptance?: t_payment_links_resource_custom_text_position | null @@ -5748,6 +6624,7 @@ export type t_payment_links_resource_invoice_settings = { custom_fields?: t_invoice_setting_custom_field[] | null description?: string | null footer?: string | null + issuer?: t_connect_account_reference | null metadata?: { [key: string]: string | undefined } | null @@ -5756,13 +6633,28 @@ export type t_payment_links_resource_invoice_settings = { export type t_payment_links_resource_payment_intent_data = { capture_method?: "automatic" | "automatic_async" | "manual" | null + description?: string | null + metadata: { + [key: string]: string | undefined + } setup_future_usage?: "off_session" | "on_session" | null + statement_descriptor?: string | null + statement_descriptor_suffix?: string | null + transfer_group?: string | null +} + +export type t_payment_links_resource_payment_method_reuse_agreement = { + position: "auto" | "hidden" } export type t_payment_links_resource_phone_number_collection = { enabled: boolean } +export type t_payment_links_resource_restrictions = { + completed_sessions: t_payment_links_resource_completed_sessions +} + export type t_payment_links_resource_shipping_address_collection = { allowed_countries: ( | "AC" @@ -6012,7 +6904,16 @@ export type t_payment_links_resource_shipping_option = { export type t_payment_links_resource_subscription_data = { description?: string | null + invoice_settings: t_payment_links_resource_subscription_data_invoice_settings + metadata: { + [key: string]: string | undefined + } trial_period_days?: number | null + trial_settings?: t_subscriptions_trials_resource_trial_settings | null +} + +export type t_payment_links_resource_subscription_data_invoice_settings = { + issuer: t_connect_account_reference } export type t_payment_links_resource_tax_id_collection = { @@ -6055,6 +6956,7 @@ export type t_payment_method = { metadata?: { [key: string]: string | undefined } | null + mobilepay?: t_payment_method_mobilepay object: "payment_method" oxxo?: t_payment_method_oxxo p24?: t_payment_method_p24 @@ -6063,8 +6965,10 @@ export type t_payment_method = { pix?: t_payment_method_pix promptpay?: t_payment_method_promptpay radar_options?: t_radar_radar_options + revolut_pay?: t_payment_method_revolut_pay sepa_debit?: t_payment_method_sepa_debit sofort?: t_payment_method_sofort + swish?: t_payment_method_swish type: | "acss_debit" | "affirm" @@ -6088,14 +6992,17 @@ export type t_payment_method = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -6140,6 +7047,7 @@ export type t_payment_method_card = { brand: string checks?: t_payment_method_card_checks | null country?: string | null + display_brand?: string | null exp_month: number exp_year: number fingerprint?: string | null @@ -6267,13 +7175,13 @@ export type t_payment_method_configuration = { card?: t_payment_method_config_resource_payment_method_properties cartes_bancaires?: t_payment_method_config_resource_payment_method_properties cashapp?: t_payment_method_config_resource_payment_method_properties + customer_balance?: t_payment_method_config_resource_payment_method_properties eps?: t_payment_method_config_resource_payment_method_properties fpx?: t_payment_method_config_resource_payment_method_properties giropay?: t_payment_method_config_resource_payment_method_properties google_pay?: t_payment_method_config_resource_payment_method_properties grabpay?: t_payment_method_config_resource_payment_method_properties id: string - id_bank_transfer?: t_payment_method_config_resource_payment_method_properties ideal?: t_payment_method_config_resource_payment_method_properties is_default: boolean jcb?: t_payment_method_config_resource_payment_method_properties @@ -6281,22 +7189,20 @@ export type t_payment_method_configuration = { konbini?: t_payment_method_config_resource_payment_method_properties link?: t_payment_method_config_resource_payment_method_properties livemode: boolean - multibanco?: t_payment_method_config_resource_payment_method_properties name: string - netbanking?: t_payment_method_config_resource_payment_method_properties object: "payment_method_configuration" oxxo?: t_payment_method_config_resource_payment_method_properties p24?: t_payment_method_config_resource_payment_method_properties parent?: string | null - pay_by_bank?: t_payment_method_config_resource_payment_method_properties paynow?: t_payment_method_config_resource_payment_method_properties paypal?: t_payment_method_config_resource_payment_method_properties promptpay?: t_payment_method_config_resource_payment_method_properties + revolut_pay?: t_payment_method_config_resource_payment_method_properties sepa_debit?: t_payment_method_config_resource_payment_method_properties sofort?: t_payment_method_config_resource_payment_method_properties - upi?: t_payment_method_config_resource_payment_method_properties us_bank_account?: t_payment_method_config_resource_payment_method_properties wechat_pay?: t_payment_method_config_resource_payment_method_properties + zip?: t_payment_method_config_resource_payment_method_properties } export type t_payment_method_customer_balance = EmptyObject @@ -6326,6 +7232,7 @@ export type t_payment_method_details = { klarna?: t_payment_method_details_klarna konbini?: t_payment_method_details_konbini link?: t_payment_method_details_link + mobilepay?: t_payment_method_details_mobilepay multibanco?: t_payment_method_details_multibanco oxxo?: t_payment_method_details_oxxo p24?: t_payment_method_details_p24 @@ -6333,9 +7240,11 @@ export type t_payment_method_details = { paypal?: t_payment_method_details_paypal pix?: t_payment_method_details_pix promptpay?: t_payment_method_details_promptpay + revolut_pay?: t_payment_method_details_revolut_pay sepa_debit?: t_payment_method_details_sepa_debit sofort?: t_payment_method_details_sofort stripe_account?: t_payment_method_details_stripe_account + swish?: t_payment_method_details_swish type: string us_bank_account?: t_payment_method_details_us_bank_account wechat?: t_payment_method_details_wechat @@ -6407,18 +7316,24 @@ export type t_payment_method_details_boleto = { } export type t_payment_method_details_card = { + amount_authorized?: number | null brand?: string | null + capture_before?: number checks?: t_payment_method_details_card_checks | null country?: string | null exp_month: number exp_year: number + extended_authorization?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization fingerprint?: string | null funding?: string | null + incremental_authorization?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization installments?: t_payment_method_details_card_installments | null last4?: string | null mandate?: string | null + multicapture?: t_payment_flows_private_payment_methods_card_details_api_resource_multicapture network?: string | null network_token?: t_payment_method_details_card_network_token | null + overcapture?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture three_d_secure?: t_three_d_secure_details_charge | null wallet?: t_payment_method_details_card_wallet | null } @@ -6458,6 +7373,7 @@ export type t_payment_method_details_card_present = { incremental_authorization_supported: boolean last4?: string | null network?: string | null + offline?: t_payment_method_details_card_present_offline | null overcapture_supported: boolean read_method?: | "contact_emv" @@ -6469,6 +7385,10 @@ export type t_payment_method_details_card_present = { receipt?: t_payment_method_details_card_present_receipt | null } +export type t_payment_method_details_card_present_offline = { + stored_at?: number | null +} + export type t_payment_method_details_card_present_receipt = { account_type?: "checking" | "credit" | "prepaid" | "unknown" application_cryptogram?: string | null @@ -6614,6 +7534,7 @@ export type t_payment_method_details_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -6632,6 +7553,7 @@ export type t_payment_method_details_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -6698,6 +7620,10 @@ export type t_payment_method_details_link = { country?: string | null } +export type t_payment_method_details_mobilepay = { + card?: t_internal_card | null +} + export type t_payment_method_details_multibanco = { entity?: string | null reference?: string | null @@ -6733,6 +7659,7 @@ export type t_payment_method_details_p24 = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" | null reference?: string | null @@ -6759,6 +7686,8 @@ export type t_payment_method_details_promptpay = { reference?: string | null } +export type t_payment_method_details_revolut_pay = EmptyObject + export type t_payment_method_details_sepa_debit = { bank_code?: string | null branch_code?: string | null @@ -6782,12 +7711,20 @@ export type t_payment_method_details_sofort = { export type t_payment_method_details_stripe_account = EmptyObject +export type t_payment_method_details_swish = { + fingerprint?: string | null + payment_reference?: string | null + verified_phone_last4?: string | null +} + export type t_payment_method_details_us_bank_account = { account_holder_type?: "company" | "individual" | null account_type?: "checking" | "savings" | null bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate + payment_reference?: string | null routing_number?: string | null } @@ -6895,6 +7832,7 @@ export type t_payment_method_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -6913,6 +7851,7 @@ export type t_payment_method_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -6953,6 +7892,8 @@ export type t_payment_method_link = { email?: string | null } +export type t_payment_method_mobilepay = EmptyObject + export type t_payment_method_options_affirm = { capture_method?: "manual" preferred_locale?: string @@ -7103,11 +8044,17 @@ export type t_payment_method_options_promptpay = { setup_future_usage?: "none" } +export type t_payment_method_options_revolut_pay = EmptyObject + export type t_payment_method_options_sofort = { preferred_language?: "de" | "en" | "es" | "fr" | "it" | "nl" | "pl" | null setup_future_usage?: "none" | "off_session" } +export type t_payment_method_options_us_bank_account_mandate_options = { + collection_method?: "paper" +} + export type t_payment_method_options_wechat_pay = { app_id?: string | null client?: "android" | "ios" | "web" | null @@ -7146,6 +8093,7 @@ export type t_payment_method_p24 = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" | null } @@ -7161,6 +8109,8 @@ export type t_payment_method_pix = EmptyObject export type t_payment_method_promptpay = EmptyObject +export type t_payment_method_revolut_pay = EmptyObject + export type t_payment_method_sepa_debit = { bank_code?: string | null branch_code?: string | null @@ -7174,6 +8124,8 @@ export type t_payment_method_sofort = { country?: string | null } +export type t_payment_method_swish = EmptyObject + export type t_payment_method_us_bank_account = { account_holder_type?: "company" | "individual" | null account_type?: "checking" | "savings" | null @@ -7232,6 +8184,7 @@ export type t_payment_pages_checkout_session_after_expiration_recovery = { export type t_payment_pages_checkout_session_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } @@ -7241,6 +8194,7 @@ export type t_payment_pages_checkout_session_consent = { } export type t_payment_pages_checkout_session_consent_collection = { + payment_method_reuse_agreement?: t_payment_pages_checkout_session_payment_method_reuse_agreement | null promotions?: "auto" | "none" | null terms_of_service?: "none" | "required" | null } @@ -7253,12 +8207,12 @@ export type t_payment_pages_checkout_session_currency_conversion = { } export type t_payment_pages_checkout_session_custom_fields = { - dropdown?: t_payment_pages_checkout_session_custom_fields_dropdown | null + dropdown?: t_payment_pages_checkout_session_custom_fields_dropdown key: string label: t_payment_pages_checkout_session_custom_fields_label - numeric?: t_payment_pages_checkout_session_custom_fields_numeric | null + numeric?: t_payment_pages_checkout_session_custom_fields_numeric optional: boolean - text?: t_payment_pages_checkout_session_custom_fields_text | null + text?: t_payment_pages_checkout_session_custom_fields_text type: "dropdown" | "numeric" | "text" } @@ -7290,6 +8244,7 @@ export type t_payment_pages_checkout_session_custom_fields_text = { } export type t_payment_pages_checkout_session_custom_text = { + after_submit?: t_payment_pages_checkout_session_custom_text_position | null shipping_address?: t_payment_pages_checkout_session_custom_text_position | null submit?: t_payment_pages_checkout_session_custom_text_position | null terms_of_service_acceptance?: t_payment_pages_checkout_session_custom_text_position | null @@ -7318,12 +8273,17 @@ export type t_payment_pages_checkout_session_invoice_settings = { custom_fields?: t_invoice_setting_custom_field[] | null description?: string | null footer?: string | null + issuer?: t_connect_account_reference | null metadata?: { [key: string]: string | undefined } | null rendering_options?: t_invoice_setting_rendering_options | null } +export type t_payment_pages_checkout_session_payment_method_reuse_agreement = { + position: "auto" | "hidden" +} + export type t_payment_pages_checkout_session_phone_number_collection = { enabled: boolean } @@ -7630,6 +8590,7 @@ export type t_payment_pages_checkout_session_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -7720,6 +8681,7 @@ export type t_period = { export type t_person = { account: string + additional_tos_acceptances?: t_person_additional_tos_acceptances address?: t_address address_kana?: t_legal_entity_japan_address | null address_kanji?: t_legal_entity_japan_address | null @@ -7753,6 +8715,16 @@ export type t_person = { verification?: t_legal_entity_person_verification } +export type t_person_additional_tos_acceptance = { + date?: number | null + ip?: string | null + user_agent?: string | null +} + +export type t_person_additional_tos_acceptances = { + account: t_person_additional_tos_acceptance +} + export type t_person_future_requirements = { alternatives?: t_account_requirements_alternative[] | null currently_due: string[] @@ -7765,6 +8737,7 @@ export type t_person_future_requirements = { export type t_person_relationship = { director?: boolean | null executive?: boolean | null + legal_guardian?: boolean | null owner?: boolean | null percent_ownership?: number | null representative?: boolean | null @@ -7795,6 +8768,7 @@ export type t_plan = { metadata?: { [key: string]: string | undefined } | null + meter?: string | null nickname?: string | null object: "plan" product?: string | t_product | t_deleted_product | null @@ -7844,7 +8818,6 @@ export type t_portal_features = { invoice_history: t_portal_invoice_list payment_method_update: t_portal_payment_method_update subscription_cancel: t_portal_subscription_cancel - subscription_pause: t_portal_subscription_pause subscription_update: t_portal_subscription_update } @@ -7943,10 +8916,6 @@ export type t_portal_subscription_cancellation_reason = { )[] } -export type t_portal_subscription_pause = { - enabled: boolean -} - export type t_portal_subscription_update = { default_allowed_updates: ("price" | "promotion_code" | "quantity")[] enabled: boolean @@ -8000,7 +8969,7 @@ export type t_product = { created: number default_price?: string | t_price | null description?: string | null - features: t_product_feature[] + features: t_product_marketing_feature[] id: string images: string[] livemode: boolean @@ -8018,8 +8987,8 @@ export type t_product = { url?: string | null } -export type t_product_feature = { - name: string +export type t_product_marketing_feature = { + name?: string } export type t_promotion_code = { @@ -8074,7 +9043,7 @@ export type t_quote = { header?: string | null id: string invoice?: string | t_invoice | t_deleted_invoice | null - invoice_settings?: t_invoice_setting_quote_setting | null + invoice_settings: t_invoice_setting_quote_setting line_items?: { data: t_item[] has_more: boolean @@ -8100,6 +9069,7 @@ export type t_quote = { export type t_quotes_resource_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } @@ -8130,6 +9100,9 @@ export type t_quotes_resource_status_transitions = { export type t_quotes_resource_subscription_data_subscription_data = { description?: string | null effective_date?: number | null + metadata?: { + [key: string]: string | undefined + } | null trial_period_days?: number | null } @@ -8242,6 +9215,7 @@ export type t_recurring = { aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" | null interval: "day" | "month" | "week" | "year" interval_count: number + meter?: string | null usage_type: "licensed" | "metered" } @@ -8252,6 +9226,7 @@ export type t_refund = { created: number currency: string description?: string + destination_details?: t_refund_destination_details failure_balance_transaction?: string | t_balance_transaction failure_reason?: string id: string @@ -8274,6 +9249,50 @@ export type t_refund = { transfer_reversal?: string | t_transfer_reversal | null } +export type t_refund_destination_details = { + affirm?: t_destination_details_unimplemented + afterpay_clearpay?: t_destination_details_unimplemented + alipay?: t_destination_details_unimplemented + au_bank_transfer?: t_destination_details_unimplemented + blik?: t_refund_destination_details_generic + br_bank_transfer?: t_refund_destination_details_generic + card?: t_refund_destination_details_card + cashapp?: t_destination_details_unimplemented + customer_cash_balance?: t_destination_details_unimplemented + eps?: t_destination_details_unimplemented + eu_bank_transfer?: t_refund_destination_details_generic + gb_bank_transfer?: t_refund_destination_details_generic + giropay?: t_destination_details_unimplemented + grabpay?: t_destination_details_unimplemented + jp_bank_transfer?: t_refund_destination_details_generic + klarna?: t_destination_details_unimplemented + mx_bank_transfer?: t_refund_destination_details_generic + p24?: t_refund_destination_details_generic + paynow?: t_destination_details_unimplemented + paypal?: t_destination_details_unimplemented + pix?: t_destination_details_unimplemented + revolut?: t_destination_details_unimplemented + sofort?: t_destination_details_unimplemented + swish?: t_refund_destination_details_generic + th_bank_transfer?: t_refund_destination_details_generic + type: string + us_bank_transfer?: t_refund_destination_details_generic + wechat_pay?: t_destination_details_unimplemented + zip?: t_destination_details_unimplemented +} + +export type t_refund_destination_details_card = { + reference?: string + reference_status?: string + reference_type?: string + type: "pending" | "refund" | "reversal" +} + +export type t_refund_destination_details_generic = { + reference?: string | null + reference_status?: string | null +} + export type t_refund_next_action = { display_details?: t_refund_next_action_display_details | null type: string @@ -8362,6 +9381,7 @@ export type t_scheduled_query_run = { export type t_schedules_phase_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_secret_service_resource_scope = { @@ -8432,7 +9452,7 @@ export type t_setup_attempt_payment_method_details_boleto = EmptyObject export type t_setup_attempt_payment_method_details_card = { brand?: string | null - checks?: t_payment_method_details_card_checks | null + checks?: t_setup_attempt_payment_method_details_card_checks | null country?: string | null exp_month?: number | null exp_year?: number | null @@ -8444,8 +9464,15 @@ export type t_setup_attempt_payment_method_details_card = { wallet?: t_setup_attempt_payment_method_details_card_wallet | null } +export type t_setup_attempt_payment_method_details_card_checks = { + address_line1_check?: string | null + address_postal_code_check?: string | null + cvc_check?: string | null +} + export type t_setup_attempt_payment_method_details_card_present = { generated_card?: string | t_payment_method | null + offline?: t_payment_method_details_card_present_offline | null } export type t_setup_attempt_payment_method_details_card_wallet = { @@ -8466,6 +9493,7 @@ export type t_setup_attempt_payment_method_details_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -8484,6 +9512,7 @@ export type t_setup_attempt_payment_method_details_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -8583,6 +9612,9 @@ export type t_setup_intent_payment_method_options = { | t_setup_intent_payment_method_options_acss_debit | t_setup_intent_type_specific_payment_method_options_client card?: t_setup_intent_payment_method_options_card + card_present?: + | t_setup_intent_payment_method_options_card_present + | t_setup_intent_type_specific_payment_method_options_client link?: | t_setup_intent_payment_method_options_link | t_setup_intent_type_specific_payment_method_options_client @@ -8618,7 +9650,7 @@ export type t_setup_intent_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | "challenge_only" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_setup_intent_payment_method_options_card_mandate_options = { @@ -8634,6 +9666,8 @@ export type t_setup_intent_payment_method_options_card_mandate_options = { supported_types?: "india"[] | null } +export type t_setup_intent_payment_method_options_card_present = EmptyObject + export type t_setup_intent_payment_method_options_link = EmptyObject export type t_setup_intent_payment_method_options_mandate_options_acss_debit = { @@ -8657,6 +9691,7 @@ export type t_setup_intent_payment_method_options_sepa_debit = { export type t_setup_intent_payment_method_options_us_bank_account = { financial_connections?: t_linked_account_options_us_bank_account + mandate_options?: t_payment_method_options_us_bank_account_mandate_options verification_method?: "automatic" | "instant" | "microdeposits" } @@ -9136,6 +10171,7 @@ export type t_subscription = { application_fee_percent?: number | null automatic_tax: t_subscription_automatic_tax billing_cycle_anchor: number + billing_cycle_anchor_config?: t_subscriptions_resource_billing_cycle_anchor_config | null billing_thresholds?: t_subscription_billing_thresholds | null cancel_at?: number | null cancel_at_period_end: boolean @@ -9153,6 +10189,7 @@ export type t_subscription = { default_tax_rates?: t_tax_rate[] | null description?: string | null discount?: t_discount | null + discounts: (string | t_discount)[] ended_at?: number | null id: string items: { @@ -9194,6 +10231,7 @@ export type t_subscription = { export type t_subscription_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_subscription_billing_thresholds = { @@ -9210,6 +10248,7 @@ export type t_subscription_details_data = { export type t_subscription_item = { billing_thresholds?: t_subscription_item_billing_thresholds | null created: number + discounts: (string | t_discount)[] id: string metadata: { [key: string]: string | undefined @@ -9240,7 +10279,7 @@ export type t_subscription_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_subscription_pending_invoice_item_interval = { @@ -9272,6 +10311,7 @@ export type t_subscription_schedule = { } export type t_subscription_schedule_add_invoice_item = { + discounts: t_discounts_resource_stackable_discount[] price: string | t_price | t_deleted_price quantity?: number | null tax_rates?: t_tax_rate[] | null @@ -9279,6 +10319,7 @@ export type t_subscription_schedule_add_invoice_item = { export type t_subscription_schedule_configuration_item = { billing_thresholds?: t_subscription_item_billing_thresholds | null + discounts: t_discounts_resource_stackable_discount[] metadata?: { [key: string]: string | undefined } | null @@ -9304,6 +10345,7 @@ export type t_subscription_schedule_phase_configuration = { default_payment_method?: string | t_payment_method | null default_tax_rates?: t_tax_rate[] | null description?: string | null + discounts: t_discounts_resource_stackable_discount[] end_date: number invoice_settings?: t_invoice_setting_subscription_schedule_phase_setting | null items: t_subscription_schedule_configuration_item[] @@ -9325,13 +10367,14 @@ export type t_subscription_schedules_resource_default_settings = { collection_method?: "charge_automatically" | "send_invoice" | null default_payment_method?: string | t_payment_method | null description?: string | null - invoice_settings?: t_invoice_setting_subscription_schedule_setting | null + invoice_settings: t_invoice_setting_subscription_schedule_setting on_behalf_of?: string | t_account | null transfer_data?: t_subscription_transfer_data | null } export type t_subscription_schedules_resource_default_settings_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_subscription_transfer_data = { @@ -9339,6 +10382,14 @@ export type t_subscription_transfer_data = { destination: string | t_account } +export type t_subscriptions_resource_billing_cycle_anchor_config = { + day_of_month: number + hour?: number | null + minute?: number | null + month?: number | null + second?: number | null +} + export type t_subscriptions_resource_pause_collection = { behavior: "keep_as_draft" | "mark_uncollectible" | "void" resumes_at?: number | null @@ -9350,6 +10401,7 @@ export type t_subscriptions_resource_payment_method_options = { card?: t_subscription_payment_method_options_card | null customer_balance?: t_invoice_payment_method_options_customer_balance | null konbini?: t_invoice_payment_method_options_konbini | null + sepa_debit?: t_invoice_payment_method_options_sepa_debit | null us_bank_account?: t_invoice_payment_method_options_us_bank_account | null } @@ -9367,12 +10419,14 @@ export type t_subscriptions_resource_payment_settings = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -9437,6 +10491,18 @@ export type t_tax_calculation_line_item = { tax_code: string } +export type t_tax_registration = { + active_from: number + country: string + country_options: t_tax_product_registrations_resource_country_options + created: number + expires_at?: number | null + id: string + livemode: boolean + object: "tax.registration" + status: "active" | "expired" | "scheduled" +} + export type t_tax_settings = { defaults: t_tax_product_resource_tax_settings_defaults head_office?: t_tax_product_resource_tax_settings_head_office | null @@ -9503,6 +10569,13 @@ export type t_tax_deducted_at_source = { tax_deduction_account_number: string } +export type t_tax_i_ds_owner = { + account?: string | t_account + application?: string | t_application + customer?: string | t_customer + type: "account" | "application" | "customer" | "self" +} + export type t_tax_id = { country?: string | null created: number @@ -9510,6 +10583,7 @@ export type t_tax_id = { id: string livemode: boolean object: "tax_id" + owner?: t_tax_i_ds_owner | null type: | "ad_nrt" | "ae_trn" @@ -9556,6 +10630,7 @@ export type t_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -9588,6 +10663,107 @@ export type t_tax_id_verification = { verified_name?: string | null } +export type t_tax_product_registrations_resource_country_options = { + ae?: t_tax_product_registrations_resource_country_options_default + at?: t_tax_product_registrations_resource_country_options_europe + au?: t_tax_product_registrations_resource_country_options_default + be?: t_tax_product_registrations_resource_country_options_europe + bg?: t_tax_product_registrations_resource_country_options_europe + ca?: t_tax_product_registrations_resource_country_options_canada + ch?: t_tax_product_registrations_resource_country_options_default + cl?: t_tax_product_registrations_resource_country_options_simplified + co?: t_tax_product_registrations_resource_country_options_simplified + cy?: t_tax_product_registrations_resource_country_options_europe + cz?: t_tax_product_registrations_resource_country_options_europe + de?: t_tax_product_registrations_resource_country_options_europe + dk?: t_tax_product_registrations_resource_country_options_europe + ee?: t_tax_product_registrations_resource_country_options_europe + es?: t_tax_product_registrations_resource_country_options_europe + fi?: t_tax_product_registrations_resource_country_options_europe + fr?: t_tax_product_registrations_resource_country_options_europe + gb?: t_tax_product_registrations_resource_country_options_default + gr?: t_tax_product_registrations_resource_country_options_europe + hr?: t_tax_product_registrations_resource_country_options_europe + hu?: t_tax_product_registrations_resource_country_options_europe + id?: t_tax_product_registrations_resource_country_options_simplified + ie?: t_tax_product_registrations_resource_country_options_europe + is?: t_tax_product_registrations_resource_country_options_default + it?: t_tax_product_registrations_resource_country_options_europe + jp?: t_tax_product_registrations_resource_country_options_default + kr?: t_tax_product_registrations_resource_country_options_simplified + lt?: t_tax_product_registrations_resource_country_options_europe + lu?: t_tax_product_registrations_resource_country_options_europe + lv?: t_tax_product_registrations_resource_country_options_europe + mt?: t_tax_product_registrations_resource_country_options_europe + mx?: t_tax_product_registrations_resource_country_options_simplified + my?: t_tax_product_registrations_resource_country_options_simplified + nl?: t_tax_product_registrations_resource_country_options_europe + no?: t_tax_product_registrations_resource_country_options_default + nz?: t_tax_product_registrations_resource_country_options_default + pl?: t_tax_product_registrations_resource_country_options_europe + pt?: t_tax_product_registrations_resource_country_options_europe + ro?: t_tax_product_registrations_resource_country_options_europe + sa?: t_tax_product_registrations_resource_country_options_simplified + se?: t_tax_product_registrations_resource_country_options_europe + sg?: t_tax_product_registrations_resource_country_options_default + si?: t_tax_product_registrations_resource_country_options_europe + sk?: t_tax_product_registrations_resource_country_options_europe + th?: t_tax_product_registrations_resource_country_options_simplified + tr?: t_tax_product_registrations_resource_country_options_simplified + us?: t_tax_product_registrations_resource_country_options_united_states + vn?: t_tax_product_registrations_resource_country_options_simplified + za?: t_tax_product_registrations_resource_country_options_default +} + +export type t_tax_product_registrations_resource_country_options_ca_province_standard = + { + province: string + } + +export type t_tax_product_registrations_resource_country_options_canada = { + province_standard?: t_tax_product_registrations_resource_country_options_ca_province_standard + type: "province_standard" | "simplified" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_default = { + type: "standard" +} + +export type t_tax_product_registrations_resource_country_options_eu_standard = { + place_of_supply_scheme: "small_seller" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_europe = { + standard?: t_tax_product_registrations_resource_country_options_eu_standard + type: "ioss" | "oss_non_union" | "oss_union" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_simplified = { + type: "simplified" +} + +export type t_tax_product_registrations_resource_country_options_united_states = + { + local_amusement_tax?: t_tax_product_registrations_resource_country_options_us_local_amusement_tax + local_lease_tax?: t_tax_product_registrations_resource_country_options_us_local_lease_tax + state: string + type: + | "local_amusement_tax" + | "local_lease_tax" + | "state_communications_tax" + | "state_sales_tax" + } + +export type t_tax_product_registrations_resource_country_options_us_local_amusement_tax = + { + jurisdiction: string + } + +export type t_tax_product_registrations_resource_country_options_us_local_lease_tax = + { + jurisdiction: string + } + export type t_tax_product_resource_customer_details = { address?: t_tax_product_resource_postal_address | null address_source?: "billing" | "shipping" | null @@ -9643,6 +10819,7 @@ export type t_tax_product_resource_customer_details_resource_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -9827,6 +11004,14 @@ export type t_tax_rate = { id: string inclusive: boolean jurisdiction?: string | null + jurisdiction_level?: + | "city" + | "country" + | "county" + | "district" + | "multiple" + | "state" + | null livemode: boolean metadata?: { [key: string]: string | undefined @@ -9846,7 +11031,6 @@ export type t_tax_rate = { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" | null } @@ -9856,7 +11040,9 @@ export type t_terminal_configuration = { id: string is_account_default?: boolean | null livemode: boolean + name?: string | null object: "terminal.configuration" + offline?: t_terminal_configuration_configuration_resource_offline_config tipping?: t_terminal_configuration_configuration_resource_tipping verifone_p400?: t_terminal_configuration_configuration_resource_device_type_specific_config } @@ -9886,6 +11072,7 @@ export type t_terminal_reader = { | "bbpos_chipper2x" | "bbpos_wisepad3" | "bbpos_wisepos_e" + | "mobile_phone_reader" | "simulated_wisepos_e" | "stripe_m2" | "verifone_P400" @@ -9899,7 +11086,7 @@ export type t_terminal_reader = { } object: "terminal.reader" serial_number: string - status?: string | null + status?: "offline" | "online" | null } export type t_terminal_configuration_configuration_resource_currency_specific_config = @@ -9914,6 +11101,10 @@ export type t_terminal_configuration_configuration_resource_device_type_specific splashscreen?: string | t_file } +export type t_terminal_configuration_configuration_resource_offline_config = { + enabled?: boolean | null +} + export type t_terminal_configuration_configuration_resource_tipping = { aud?: t_terminal_configuration_configuration_resource_currency_specific_config cad?: t_terminal_configuration_configuration_resource_currency_specific_config @@ -9945,6 +11136,7 @@ export type t_terminal_reader_reader_resource_line_item = { } export type t_terminal_reader_reader_resource_process_config = { + enable_customer_cancellation?: boolean skip_tipping?: boolean tipping?: t_terminal_reader_reader_resource_tipping_config } @@ -9954,7 +11146,9 @@ export type t_terminal_reader_reader_resource_process_payment_intent_action = { process_config?: t_terminal_reader_reader_resource_process_config } -export type t_terminal_reader_reader_resource_process_setup_config = EmptyObject +export type t_terminal_reader_reader_resource_process_setup_config = { + enable_customer_cancellation?: boolean +} export type t_terminal_reader_reader_resource_process_setup_intent_action = { generated_card?: string @@ -9987,9 +11181,14 @@ export type t_terminal_reader_reader_resource_refund_payment_action = { reason?: "duplicate" | "fraudulent" | "requested_by_customer" refund?: string | t_refund refund_application_fee?: boolean + refund_payment_config?: t_terminal_reader_reader_resource_refund_payment_config reverse_transfer?: boolean } +export type t_terminal_reader_reader_resource_refund_payment_config = { + enable_customer_cancellation?: boolean +} + export type t_terminal_reader_reader_resource_set_reader_display_action = { cart?: t_terminal_reader_reader_resource_cart | null type: "cart" @@ -10012,6 +11211,7 @@ export type t_test_helpers_test_clock = { export type t_three_d_secure_details = { authentication_flow?: "challenge" | "frictionless" | null + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" | null result?: | "attempt_acknowledged" | "authenticated" @@ -10029,11 +11229,15 @@ export type t_three_d_secure_details = { | "protocol_error" | "rejected" | null + transaction_id?: string | null version?: "1.0.2" | "2.1.0" | "2.2.0" | null } export type t_three_d_secure_details_charge = { authentication_flow?: "challenge" | "frictionless" | null + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" | null + exemption_indicator?: "low_risk" | "none" | null + exemption_indicator_applied?: boolean result?: | "attempt_acknowledged" | "authenticated" @@ -10051,6 +11255,7 @@ export type t_three_d_secure_details_charge = { | "protocol_error" | "rejected" | null + transaction_id?: string | null version?: "1.0.2" | "2.1.0" | "2.2.0" | null } @@ -10070,6 +11275,10 @@ export type t_token = { used: boolean } +export type t_token_card_networks = { + preferred?: string | null +} + export type t_topup = { amount: number balance_transaction?: string | t_balance_transaction | null @@ -10670,6 +11879,7 @@ export type t_treasury_received_debits_resource_linked_flows = { inbound_transfer?: string | null issuing_authorization?: string | null issuing_transaction?: string | null + payout?: string | null } export type t_treasury_received_debits_resource_reversal_details = { diff --git a/integration-tests/typescript-fetch/src/generated/api.github.com.yaml/client.ts b/integration-tests/typescript-fetch/src/generated/api.github.com.yaml/client.ts index b2bfd128..9ca56077 100644 --- a/integration-tests/typescript-fetch/src/generated/api.github.com.yaml/client.ts +++ b/integration-tests/typescript-fetch/src/generated/api.github.com.yaml/client.ts @@ -66,6 +66,7 @@ import { t_code_scanning_default_setup_update_response, t_code_scanning_organization_alert_items, t_code_scanning_ref, + t_code_scanning_ref_full, t_code_scanning_sarifs_receipt, t_code_scanning_sarifs_status, t_code_search_result_item, @@ -75,6 +76,7 @@ import { t_codespace_machine, t_codespace_with_full_repository, t_codespaces_org_secret, + t_codespaces_permissions_check_for_devcontainer, t_codespaces_public_key, t_codespaces_secret, t_codespaces_user_public_key, @@ -97,6 +99,7 @@ import { t_copilot_organization_details, t_copilot_seat_details, t_custom_deployment_rule_app, + t_custom_property_value, t_dependabot_alert, t_dependabot_alert_with_repository, t_dependabot_public_key, @@ -107,6 +110,7 @@ import { t_deployment, t_deployment_branch_policy, t_deployment_branch_policy_name_pattern, + t_deployment_branch_policy_name_pattern_with_type, t_deployment_branch_policy_settings, t_deployment_protection_rule, t_deployment_reviewer_type, @@ -164,16 +168,20 @@ import { t_minimal_repository, t_oidc_custom_sub, t_oidc_custom_sub_repo, + t_org_custom_property, t_org_hook, t_org_membership, + t_org_repo_custom_property_values, t_org_ruleset_conditions, t_organization_actions_secret, t_organization_actions_variable, t_organization_dependabot_secret, + t_organization_fine_grained_permission, t_organization_full, t_organization_invitation, t_organization_programmatic_access_grant, t_organization_programmatic_access_grant_request, + t_organization_role, t_organization_secret_scanning_alert, t_organization_simple, t_package, @@ -183,11 +191,13 @@ import { t_page_build, t_page_build_status, t_page_deployment, + t_pages_deployment_status, t_pages_health_check, t_participation_stats, t_pending_deployment, t_porter_author, t_porter_large_file, + t_prevent_self_review, t_private_user, t_private_vulnerability_report_create, t_project, @@ -229,6 +239,8 @@ import { t_review_custom_gates_comment_required, t_review_custom_gates_state_required, t_root, + t_rule_suite, + t_rule_suites, t_runner, t_runner_application, t_runner_label, @@ -238,6 +250,7 @@ import { t_secret_scanning_alert_resolution_comment, t_secret_scanning_alert_state, t_secret_scanning_location, + t_security_advisory_ecosystems, t_selected_actions, t_short_blob, t_short_branch, @@ -310,19 +323,7 @@ export class ApiClient extends AbstractFetchClient { ghsaId?: string type?: "reviewed" | "malware" | "unreviewed" cveId?: string - ecosystem?: - | "actions" - | "composer" - | "erlang" - | "go" - | "maven" - | "npm" - | "nuget" - | "other" - | "pip" - | "pub" - | "rubygems" - | "rust" + ecosystem?: t_security_advisory_ecosystems severity?: "unknown" | "low" | "medium" | "high" | "critical" cwes?: string | string[] isWithdrawn?: boolean @@ -985,6 +986,7 @@ export class ApiClient extends AbstractFetchClient { perPage?: number before?: string after?: string + validity?: string }, timeout?: number, opts?: RequestInit, @@ -1013,6 +1015,7 @@ export class ApiClient extends AbstractFetchClient { per_page: p["perPage"], before: p["before"], after: p["after"], + validity: p["validity"], }) return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) @@ -1978,6 +1981,18 @@ export class ApiClient extends AbstractFetchClient { return this._fetch(url, { method: "PATCH", ...(opts ?? {}) }, timeout) } + async activityMarkThreadAsDone( + p: { + threadId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = this.basePath + `/notifications/threads/${p["threadId"]}` + + return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) + } + async activityGetThreadSubscriptionForAuthenticatedUser( p: { threadId: number @@ -3516,6 +3531,7 @@ export class ApiClient extends AbstractFetchClient { | Res<401, t_basic_error> | Res<403, t_basic_error> | Res<404, t_basic_error> + | Res<422, void> | Res<500, t_basic_error> > > { @@ -3553,7 +3569,7 @@ export class ApiClient extends AbstractFetchClient { return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) } - async copilotAddCopilotForBusinessSeatsForTeams( + async copilotAddCopilotSeatsForTeams( p: { org: string requestBody: { @@ -3625,7 +3641,7 @@ export class ApiClient extends AbstractFetchClient { ) } - async copilotAddCopilotForBusinessSeatsForUsers( + async copilotAddCopilotSeatsForUsers( p: { org: string requestBody: { @@ -4339,7 +4355,7 @@ export class ApiClient extends AbstractFetchClient { requestBody?: { email?: string invitee_id?: number - role?: "admin" | "direct_member" | "billing_manager" + role?: "admin" | "direct_member" | "billing_manager" | "reinstate" team_ids?: number[] } }, @@ -4575,7 +4591,7 @@ export class ApiClient extends AbstractFetchClient { return this._fetch(url, { method: "POST", ...(opts ?? {}) }, timeout) } - async copilotGetCopilotSeatAssignmentDetailsForUser( + async copilotGetCopilotSeatDetailsForUser( p: { org: string username: string @@ -4801,6 +4817,285 @@ export class ApiClient extends AbstractFetchClient { return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) } + async orgsListOrganizationFineGrainedPermissions( + p: { + org: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_organization_fine_grained_permission[]> + | Res<404, t_basic_error> + | Res<422, t_validation_error> + > + > { + const url = + this.basePath + `/orgs/${p["org"]}/organization-fine-grained-permissions` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async orgsListOrgRoles( + p: { + org: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + roles?: t_organization_role[] + total_count?: number + } + > + | Res<404, t_basic_error> + | Res<422, t_validation_error> + > + > { + const url = this.basePath + `/orgs/${p["org"]}/organization-roles` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async orgsCreateCustomOrganizationRole( + p: { + org: string + requestBody: { + description?: string + name: string + permissions: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<201, t_organization_role> + | Res<404, t_basic_error> + | Res<409, t_basic_error> + | Res<422, t_validation_error> + > + > { + const url = this.basePath + `/orgs/${p["org"]}/organization-roles` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async orgsRevokeAllOrgRolesTeam( + p: { + org: string + teamSlug: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/orgs/${p["org"]}/organization-roles/teams/${p["teamSlug"]}` + + return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) + } + + async orgsAssignTeamToOrgRole( + p: { + org: string + teamSlug: string + roleId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res<404, void> | Res<422, void>> + > { + const url = + this.basePath + + `/orgs/${p["org"]}/organization-roles/teams/${p["teamSlug"]}/${p["roleId"]}` + + return this._fetch(url, { method: "PUT", ...(opts ?? {}) }, timeout) + } + + async orgsRevokeOrgRoleTeam( + p: { + org: string + teamSlug: string + roleId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/orgs/${p["org"]}/organization-roles/teams/${p["teamSlug"]}/${p["roleId"]}` + + return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) + } + + async orgsRevokeAllOrgRolesUser( + p: { + org: string + username: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/orgs/${p["org"]}/organization-roles/users/${p["username"]}` + + return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) + } + + async orgsAssignUserToOrgRole( + p: { + org: string + username: string + roleId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res<404, void> | Res<422, void>> + > { + const url = + this.basePath + + `/orgs/${p["org"]}/organization-roles/users/${p["username"]}/${p["roleId"]}` + + return this._fetch(url, { method: "PUT", ...(opts ?? {}) }, timeout) + } + + async orgsRevokeOrgRoleUser( + p: { + org: string + username: string + roleId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/orgs/${p["org"]}/organization-roles/users/${p["username"]}/${p["roleId"]}` + + return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) + } + + async orgsGetOrgRole( + p: { + org: string + roleId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_organization_role> + | Res<404, t_basic_error> + | Res<422, t_validation_error> + > + > { + const url = + this.basePath + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async orgsPatchCustomOrganizationRole( + p: { + org: string + roleId: number + requestBody: { + description?: string + name?: string + permissions?: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_organization_role> + | Res<404, t_basic_error> + | Res<409, t_basic_error> + | Res<422, t_validation_error> + > + > { + const url = + this.basePath + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "PATCH", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async orgsDeleteCustomOrganizationRole( + p: { + org: string + roleId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}` + + return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) + } + + async orgsListOrgRoleTeams( + p: { + org: string + roleId: number + perPage?: number + page?: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res<404, void> | Res<422, void>> + > { + const url = + this.basePath + + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}/teams` + const query = this._query({ per_page: p["perPage"], page: p["page"] }) + + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async orgsListOrgRoleUsers( + p: { + org: string + roleId: number + perPage?: number + page?: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_simple_user[]> | Res<404, void> | Res<422, void> + > + > { + const url = + this.basePath + + `/orgs/${p["org"]}/organization-roles/${p["roleId"]}/users` + const query = this._query({ per_page: p["perPage"], page: p["page"] }) + + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + } + async orgsListOutsideCollaborators( p: { org: string @@ -5439,21 +5734,195 @@ export class ApiClient extends AbstractFetchClient { ) } - async orgsListPublicMembers( + async orgsGetAllCustomProperties( p: { org: string - perPage?: number - page?: number }, timeout?: number, opts?: RequestInit, - ): Promise>> { - const url = this.basePath + `/orgs/${p["org"]}/public_members` - const query = this._query({ per_page: p["perPage"], page: p["page"] }) - - return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) - } - + ): Promise< + TypedFetchResponse< + | Res<200, t_org_custom_property[]> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + > + > { + const url = this.basePath + `/orgs/${p["org"]}/properties/schema` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async orgsCreateOrUpdateCustomProperties( + p: { + org: string + requestBody: { + properties: t_org_custom_property[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_org_custom_property[]> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + > + > { + const url = this.basePath + `/orgs/${p["org"]}/properties/schema` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "PATCH", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async orgsGetCustomProperty( + p: { + org: string + customPropertyName: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_org_custom_property> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + > + > { + const url = + this.basePath + + `/orgs/${p["org"]}/properties/schema/${p["customPropertyName"]}` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async orgsCreateOrUpdateCustomProperty( + p: { + org: string + customPropertyName: string + requestBody: { + allowed_values?: string[] | null + default_value?: string | string[] | null + description?: string | null + required?: boolean + value_type: "string" | "single_select" + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_org_custom_property> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + > + > { + const url = + this.basePath + + `/orgs/${p["org"]}/properties/schema/${p["customPropertyName"]}` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "PUT", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async orgsRemoveCustomProperty( + p: { + org: string + customPropertyName: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<204, void> | Res<403, t_basic_error> | Res<404, t_basic_error> + > + > { + const url = + this.basePath + + `/orgs/${p["org"]}/properties/schema/${p["customPropertyName"]}` + + return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) + } + + async orgsListCustomPropertiesValuesForRepos( + p: { + org: string + perPage?: number + page?: number + repositoryQuery?: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_org_repo_custom_property_values[]> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + > + > { + const url = this.basePath + `/orgs/${p["org"]}/properties/values` + const query = this._query({ + per_page: p["perPage"], + page: p["page"], + repository_query: p["repositoryQuery"], + }) + + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async orgsCreateOrUpdateCustomPropertiesValuesForRepos( + p: { + org: string + requestBody: { + properties: t_custom_property_value[] + repository_names: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<204, void> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + | Res<422, t_validation_error> + > + > { + const url = this.basePath + `/orgs/${p["org"]}/properties/values` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "PATCH", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async orgsListPublicMembers( + p: { + org: string + perPage?: number + page?: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = this.basePath + `/orgs/${p["org"]}/public_members` + const query = this._query({ per_page: p["perPage"], page: p["page"] }) + + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + } + async orgsCheckPublicMembershipForUser( p: { org: string @@ -5529,6 +5998,9 @@ export class ApiClient extends AbstractFetchClient { allow_rebase_merge?: boolean allow_squash_merge?: boolean auto_init?: boolean + custom_properties?: { + [key: string]: unknown | undefined + } delete_branch_on_merge?: boolean description?: string gitignore_template?: string @@ -5554,7 +6026,7 @@ export class ApiClient extends AbstractFetchClient { opts?: RequestInit, ): Promise< TypedFetchResponse< - | Res<201, t_repository> + | Res<201, t_full_repository> | Res<403, t_basic_error> | Res<422, t_validation_error> > @@ -5623,6 +6095,57 @@ export class ApiClient extends AbstractFetchClient { ) } + async reposGetOrgRuleSuites( + p: { + org: string + repositoryName?: number + timePeriod?: "hour" | "day" | "week" | "month" + actorName?: string + ruleSuiteResult?: "pass" | "fail" | "bypass" | "all" + perPage?: number + page?: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_rule_suites> + | Res<404, t_basic_error> + | Res<500, t_basic_error> + > + > { + const url = this.basePath + `/orgs/${p["org"]}/rulesets/rule-suites` + const query = this._query({ + repository_name: p["repositoryName"], + time_period: p["timePeriod"], + actor_name: p["actorName"], + rule_suite_result: p["ruleSuiteResult"], + per_page: p["perPage"], + page: p["page"], + }) + + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async reposGetOrgRuleSuite( + p: { + org: string + ruleSuiteId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_rule_suite> | Res<404, t_basic_error> | Res<500, t_basic_error> + > + > { + const url = + this.basePath + + `/orgs/${p["org"]}/rulesets/rule-suites/${p["ruleSuiteId"]}` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + async reposGetOrgRuleset( p: { org: string @@ -5704,6 +6227,7 @@ export class ApiClient extends AbstractFetchClient { perPage?: number before?: string after?: string + validity?: string }, timeout?: number, opts?: RequestInit, @@ -5732,6 +6256,7 @@ export class ApiClient extends AbstractFetchClient { per_page: p["perPage"], before: p["before"], after: p["after"], + validity: p["validity"], }) return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) @@ -8401,6 +8926,24 @@ export class ApiClient extends AbstractFetchClient { ) } + async actionsForceCancelWorkflowRun( + p: { + owner: string + repo: string + runId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res<409, t_basic_error>> + > { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/actions/runs/${p["runId"]}/force-cancel` + + return this._fetch(url, { method: "POST", ...(opts ?? {}) }, timeout) + } + async actionsListJobsForWorkflowRun( p: { owner: string @@ -9049,15 +9592,13 @@ export class ApiClient extends AbstractFetchClient { p: { owner: string repo: string - page?: number }, timeout?: number, opts?: RequestInit, ): Promise>> { const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/autolinks` - const query = this._query({ page: p["page"] }) - return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) } async reposCreateAutolink( @@ -10156,7 +10697,13 @@ export class ApiClient extends AbstractFetchClient { title?: string } started_at?: string - status?: "queued" | "in_progress" | "completed" + status?: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" } }, timeout?: number, @@ -10749,7 +11296,7 @@ export class ApiClient extends AbstractFetchClient { requestBody: { checkout_uri?: string commit_sha: t_code_scanning_analysis_commit_sha - ref: t_code_scanning_ref + ref: t_code_scanning_ref_full sarif: t_code_scanning_analysis_sarif_file started_at?: string tool_name?: string @@ -11021,6 +11568,43 @@ export class ApiClient extends AbstractFetchClient { return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) } + async codespacesCheckPermissionsForDevcontainer( + p: { + owner: string + repo: string + ref: string + devcontainerPath: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_codespaces_permissions_check_for_devcontainer> + | Res<401, t_basic_error> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + | Res<422, t_validation_error> + | Res< + 503, + { + code?: string + documentation_url?: string + message?: string + } + > + > + > { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/codespaces/permissions_check` + const query = this._query({ + ref: p["ref"], + devcontainer_path: p["devcontainerPath"], + }) + + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + } + async codespacesListRepoSecrets( p: { owner: string @@ -11449,7 +12033,9 @@ export class ApiClient extends AbstractFetchClient { opts?: RequestInit, ): Promise< TypedFetchResponse< - Res<200, t_branch_short[]> | Res<422, t_validation_error> + | Res<200, t_branch_short[]> + | Res<409, t_basic_error> + | Res<422, t_validation_error> > > { const url = @@ -11522,7 +12108,11 @@ export class ApiClient extends AbstractFetchClient { }, timeout?: number, opts?: RequestInit, - ): Promise>> { + ): Promise< + TypedFetchResponse< + Res<200, t_pull_request_simple[]> | Res<409, t_basic_error> + > + > { const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/commits/${p["commitSha"]}/pulls` @@ -11545,6 +12135,7 @@ export class ApiClient extends AbstractFetchClient { TypedFetchResponse< | Res<200, t_commit> | Res<404, t_basic_error> + | Res<409, t_basic_error> | Res<422, t_validation_error> | Res<500, t_basic_error> | Res< @@ -12389,9 +12980,11 @@ export class ApiClient extends AbstractFetchClient { timeout?: number, opts?: RequestInit, ): Promise< - TypedFetchResponse | Res<422, t_validation_error>> - > { - const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/dispatches` + TypedFetchResponse< + Res<204, void> | Res<404, t_basic_error> | Res<422, t_validation_error> + > + > { + const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/dispatches` const headers = this._headers({ "Content-Type": "application/json" }) const body = JSON.stringify(p.requestBody) @@ -12451,6 +13044,7 @@ export class ApiClient extends AbstractFetchClient { environmentName: string requestBody?: { deployment_branch_policy?: t_deployment_branch_policy_settings + prevent_self_review?: t_prevent_self_review reviewers?: | { id?: number @@ -12528,7 +13122,7 @@ export class ApiClient extends AbstractFetchClient { owner: string repo: string environmentName: string - requestBody: t_deployment_branch_policy_name_pattern + requestBody: t_deployment_branch_policy_name_pattern_with_type }, timeout?: number, opts?: RequestInit, @@ -12722,6 +13316,228 @@ export class ApiClient extends AbstractFetchClient { return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) } + async actionsListEnvironmentSecrets( + p: { + owner: string + repo: string + environmentName: string + perPage?: number + page?: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res< + 200, + { + secrets: t_actions_secret[] + total_count: number + } + > + > + > { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets` + const query = this._query({ per_page: p["perPage"], page: p["page"] }) + + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async actionsGetEnvironmentPublicKey( + p: { + owner: string + repo: string + environmentName: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/public-key` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async actionsGetEnvironmentSecret( + p: { + owner: string + repo: string + environmentName: string + secretName: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async actionsCreateOrUpdateEnvironmentSecret( + p: { + owner: string + repo: string + environmentName: string + secretName: string + requestBody: { + encrypted_value: string + key_id: string + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise | Res<204, void>>> { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "PUT", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async actionsDeleteEnvironmentSecret( + p: { + owner: string + repo: string + environmentName: string + secretName: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` + + return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) + } + + async actionsListEnvironmentVariables( + p: { + owner: string + repo: string + environmentName: string + perPage?: number + page?: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res< + 200, + { + total_count: number + variables: t_actions_variable[] + } + > + > + > { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables` + const query = this._query({ per_page: p["perPage"], page: p["page"] }) + + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async actionsCreateEnvironmentVariable( + p: { + owner: string + repo: string + environmentName: string + requestBody: { + name: string + value: string + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async actionsGetEnvironmentVariable( + p: { + owner: string + repo: string + environmentName: string + name: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables/${p["name"]}` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async actionsUpdateEnvironmentVariable( + p: { + owner: string + repo: string + name: string + environmentName: string + requestBody: { + name?: string + value?: string + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables/${p["name"]}` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "PATCH", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async actionsDeleteEnvironmentVariable( + p: { + owner: string + repo: string + name: string + environmentName: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise>> { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/environments/${p["environmentName"]}/variables/${p["name"]}` + + return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) + } + async activityListRepoEvents( p: { owner: string @@ -12839,6 +13655,7 @@ export class ApiClient extends AbstractFetchClient { | Res<200, t_blob> | Res<403, t_basic_error> | Res<404, t_basic_error> + | Res<409, t_basic_error> | Res<422, t_validation_error> > > { @@ -12876,6 +13693,7 @@ export class ApiClient extends AbstractFetchClient { TypedFetchResponse< | Res<201, t_git_commit> | Res<404, t_basic_error> + | Res<409, t_basic_error> | Res<422, t_validation_error> > > { @@ -12899,7 +13717,9 @@ export class ApiClient extends AbstractFetchClient { timeout?: number, opts?: RequestInit, ): Promise< - TypedFetchResponse | Res<404, t_basic_error>> + TypedFetchResponse< + Res<200, t_git_commit> | Res<404, t_basic_error> | Res<409, t_basic_error> + > > { const url = this.basePath + @@ -12916,7 +13736,9 @@ export class ApiClient extends AbstractFetchClient { }, timeout?: number, opts?: RequestInit, - ): Promise>> { + ): Promise< + TypedFetchResponse | Res<409, t_basic_error>> + > { const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/git/matching-refs/${p["ref"]}` @@ -12933,7 +13755,9 @@ export class ApiClient extends AbstractFetchClient { timeout?: number, opts?: RequestInit, ): Promise< - TypedFetchResponse | Res<404, t_basic_error>> + TypedFetchResponse< + Res<200, t_git_ref> | Res<404, t_basic_error> | Res<409, t_basic_error> + > > { const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/git/ref/${p["ref"]}` @@ -12953,7 +13777,11 @@ export class ApiClient extends AbstractFetchClient { timeout?: number, opts?: RequestInit, ): Promise< - TypedFetchResponse | Res<422, t_validation_error>> + TypedFetchResponse< + | Res<201, t_git_ref> + | Res<409, t_basic_error> + | Res<422, t_validation_error> + > > { const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/git/refs` const headers = this._headers({ "Content-Type": "application/json" }) @@ -12979,7 +13807,11 @@ export class ApiClient extends AbstractFetchClient { timeout?: number, opts?: RequestInit, ): Promise< - TypedFetchResponse | Res<422, t_validation_error>> + TypedFetchResponse< + | Res<200, t_git_ref> + | Res<409, t_basic_error> + | Res<422, t_validation_error> + > > { const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/git/refs/${p["ref"]}` @@ -13002,7 +13834,9 @@ export class ApiClient extends AbstractFetchClient { timeout?: number, opts?: RequestInit, ): Promise< - TypedFetchResponse | Res<422, t_validation_error>> + TypedFetchResponse< + Res<204, void> | Res<409, t_basic_error> | Res<422, t_validation_error> + > > { const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/git/refs/${p["ref"]}` @@ -13029,7 +13863,11 @@ export class ApiClient extends AbstractFetchClient { timeout?: number, opts?: RequestInit, ): Promise< - TypedFetchResponse | Res<422, t_validation_error>> + TypedFetchResponse< + | Res<201, t_git_tag> + | Res<409, t_basic_error> + | Res<422, t_validation_error> + > > { const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/git/tags` const headers = this._headers({ "Content-Type": "application/json" }) @@ -13051,7 +13889,9 @@ export class ApiClient extends AbstractFetchClient { timeout?: number, opts?: RequestInit, ): Promise< - TypedFetchResponse | Res<404, t_basic_error>> + TypedFetchResponse< + Res<200, t_git_tag> | Res<404, t_basic_error> | Res<409, t_basic_error> + > > { const url = this.basePath + @@ -13082,6 +13922,7 @@ export class ApiClient extends AbstractFetchClient { | Res<201, t_git_tree> | Res<403, t_basic_error> | Res<404, t_basic_error> + | Res<409, t_basic_error> | Res<422, t_validation_error> > > { @@ -13109,6 +13950,7 @@ export class ApiClient extends AbstractFetchClient { TypedFetchResponse< | Res<200, t_git_tree> | Res<404, t_basic_error> + | Res<409, t_basic_error> | Res<422, t_validation_error> > > { @@ -13144,10 +13986,8 @@ export class ApiClient extends AbstractFetchClient { active?: boolean config?: { content_type?: t_webhook_config_content_type - digest?: string insecure_ssl?: t_webhook_config_insecure_ssl secret?: t_webhook_config_secret - token?: string url?: t_webhook_config_url } events?: string[] @@ -13198,14 +14038,7 @@ export class ApiClient extends AbstractFetchClient { requestBody: { active?: boolean add_events?: string[] - config?: { - address?: string - content_type?: t_webhook_config_content_type - insecure_ssl?: t_webhook_config_insecure_ssl - room?: string - secret?: t_webhook_config_secret - url: t_webhook_config_url - } + config?: t_webhook_config events?: string[] remove_events?: string[] } @@ -14794,13 +15627,17 @@ export class ApiClient extends AbstractFetchClient { p: { owner: string repo: string + ref?: t_code_scanning_ref }, timeout?: number, opts?: RequestInit, - ): Promise>> { + ): Promise< + TypedFetchResponse | Res<404, t_basic_error>> + > { const url = this.basePath + `/repos/${p["owner"]}/${p["repo"]}/license` + const query = this._query({ ref: p["ref"] }) - return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) } async reposMergeUpstream( @@ -15230,7 +16067,8 @@ export class ApiClient extends AbstractFetchClient { owner: string repo: string requestBody: { - artifact_url: string + artifact_id?: number + artifact_url?: string environment?: string oidc_token: string pages_build_version: string @@ -15247,7 +16085,7 @@ export class ApiClient extends AbstractFetchClient { > > { const url = - this.basePath + `/repos/${p["owner"]}/${p["repo"]}/pages/deployment` + this.basePath + `/repos/${p["owner"]}/${p["repo"]}/pages/deployments` const headers = this._headers({ "Content-Type": "application/json" }) const body = JSON.stringify(p.requestBody) @@ -15258,6 +16096,42 @@ export class ApiClient extends AbstractFetchClient { ) } + async reposGetPagesDeployment( + p: { + owner: string + repo: string + pagesDeploymentId: number | string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_pages_deployment_status> | Res<404, t_basic_error> + > + > { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/pages/deployments/${p["pagesDeploymentId"]}` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async reposCancelPagesDeployment( + p: { + owner: string + repo: string + pagesDeploymentId: number | string + }, + timeout?: number, + opts?: RequestInit, + ): Promise | Res<404, t_basic_error>>> { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/pages/deployments/${p["pagesDeploymentId"]}/cancel` + + return this._fetch(url, { method: "POST", ...(opts ?? {}) }, timeout) + } + async reposGetPagesHealthCheck( p: { owner: string @@ -15279,6 +16153,31 @@ export class ApiClient extends AbstractFetchClient { return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) } + async reposCheckPrivateVulnerabilityReporting( + p: { + owner: string + repo: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + enabled: boolean + } + > + | Res<422, t_scim_error> + > + > { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/private-vulnerability-reporting` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + async reposEnablePrivateVulnerabilityReporting( p: { owner: string @@ -15371,6 +16270,56 @@ export class ApiClient extends AbstractFetchClient { ) } + async reposGetCustomPropertiesValues( + p: { + owner: string + repo: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_custom_property_value[]> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + > + > { + const url = + this.basePath + `/repos/${p["owner"]}/${p["repo"]}/properties/values` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async reposCreateOrUpdateCustomPropertiesValues( + p: { + owner: string + repo: string + requestBody: { + properties: t_custom_property_value[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<204, void> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + | Res<422, t_validation_error> + > + > { + const url = + this.basePath + `/repos/${p["owner"]}/${p["repo"]}/properties/values` + const headers = this._headers({ "Content-Type": "application/json" }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "PATCH", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async pullsList( p: { owner: string @@ -15629,6 +16578,7 @@ export class ApiClient extends AbstractFetchClient { | Res<200, t_pull_request> | Res<304, void> | Res<404, t_basic_error> + | Res<406, t_basic_error> | Res<500, t_basic_error> | Res< 503, @@ -16772,6 +17722,60 @@ export class ApiClient extends AbstractFetchClient { ) } + async reposGetRepoRuleSuites( + p: { + owner: string + repo: string + ref?: string + timePeriod?: "hour" | "day" | "week" | "month" + actorName?: string + ruleSuiteResult?: "pass" | "fail" | "bypass" | "all" + perPage?: number + page?: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<200, t_rule_suites> + | Res<404, t_basic_error> + | Res<500, t_basic_error> + > + > { + const url = + this.basePath + `/repos/${p["owner"]}/${p["repo"]}/rulesets/rule-suites` + const query = this._query({ + ref: p["ref"], + time_period: p["timePeriod"], + actor_name: p["actorName"], + rule_suite_result: p["ruleSuiteResult"], + per_page: p["perPage"], + page: p["page"], + }) + + return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) + } + + async reposGetRepoRuleSuite( + p: { + owner: string + repo: string + ruleSuiteId: number + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_rule_suite> | Res<404, t_basic_error> | Res<500, t_basic_error> + > + > { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/rulesets/rule-suites/${p["ruleSuiteId"]}` + + return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) + } + async reposGetRepoRuleset( p: { owner: string @@ -16865,6 +17869,7 @@ export class ApiClient extends AbstractFetchClient { perPage?: number before?: string after?: string + validity?: string }, timeout?: number, opts?: RequestInit, @@ -16894,6 +17899,7 @@ export class ApiClient extends AbstractFetchClient { per_page: p["perPage"], before: p["before"], after: p["after"], + validity: p["validity"], }) return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) @@ -17175,6 +18181,30 @@ export class ApiClient extends AbstractFetchClient { return this._fetch(url, { method: "POST", ...(opts ?? {}) }, timeout) } + async securityAdvisoriesCreateFork( + p: { + owner: string + repo: string + ghsaId: string + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res<202, t_full_repository> + | Res<400, t_scim_error> + | Res<403, t_basic_error> + | Res<404, t_basic_error> + | Res<422, t_validation_error> + > + > { + const url = + this.basePath + + `/repos/${p["owner"]}/${p["repo"]}/security-advisories/${p["ghsaId"]}/forks` + + return this._fetch(url, { method: "POST", ...(opts ?? {}) }, timeout) + } + async activityListStargazersForRepo( p: { owner: string @@ -17212,6 +18242,7 @@ export class ApiClient extends AbstractFetchClient { } > | Res<204, void> + | Res<422, void> > > { const url = @@ -17726,7 +18757,7 @@ export class ApiClient extends AbstractFetchClient { }, timeout?: number, opts?: RequestInit, - ): Promise>> { + ): Promise>> { const url = this.basePath + `/repos/${p["templateOwner"]}/${p["templateRepo"]}/generate` @@ -17759,218 +18790,6 @@ export class ApiClient extends AbstractFetchClient { return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) } - async actionsListEnvironmentSecrets( - p: { - repositoryId: number - environmentName: string - perPage?: number - page?: number - }, - timeout?: number, - opts?: RequestInit, - ): Promise< - TypedFetchResponse< - Res< - 200, - { - secrets: t_actions_secret[] - total_count: number - } - > - > - > { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets` - const query = this._query({ per_page: p["perPage"], page: p["page"] }) - - return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) - } - - async actionsGetEnvironmentPublicKey( - p: { - repositoryId: number - environmentName: string - }, - timeout?: number, - opts?: RequestInit, - ): Promise>> { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/public-key` - - return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) - } - - async actionsGetEnvironmentSecret( - p: { - repositoryId: number - environmentName: string - secretName: string - }, - timeout?: number, - opts?: RequestInit, - ): Promise>> { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` - - return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) - } - - async actionsCreateOrUpdateEnvironmentSecret( - p: { - repositoryId: number - environmentName: string - secretName: string - requestBody: { - encrypted_value: string - key_id: string - } - }, - timeout?: number, - opts?: RequestInit, - ): Promise | Res<204, void>>> { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` - const headers = this._headers({ "Content-Type": "application/json" }) - const body = JSON.stringify(p.requestBody) - - return this._fetch( - url, - { method: "PUT", headers, body, ...(opts ?? {}) }, - timeout, - ) - } - - async actionsDeleteEnvironmentSecret( - p: { - repositoryId: number - environmentName: string - secretName: string - }, - timeout?: number, - opts?: RequestInit, - ): Promise>> { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/secrets/${p["secretName"]}` - - return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) - } - - async actionsListEnvironmentVariables( - p: { - repositoryId: number - environmentName: string - perPage?: number - page?: number - }, - timeout?: number, - opts?: RequestInit, - ): Promise< - TypedFetchResponse< - Res< - 200, - { - total_count: number - variables: t_actions_variable[] - } - > - > - > { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables` - const query = this._query({ per_page: p["perPage"], page: p["page"] }) - - return this._fetch(url + query, { method: "GET", ...(opts ?? {}) }, timeout) - } - - async actionsCreateEnvironmentVariable( - p: { - repositoryId: number - environmentName: string - requestBody: { - name: string - value: string - } - }, - timeout?: number, - opts?: RequestInit, - ): Promise>> { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables` - const headers = this._headers({ "Content-Type": "application/json" }) - const body = JSON.stringify(p.requestBody) - - return this._fetch( - url, - { method: "POST", headers, body, ...(opts ?? {}) }, - timeout, - ) - } - - async actionsGetEnvironmentVariable( - p: { - repositoryId: number - environmentName: string - name: string - }, - timeout?: number, - opts?: RequestInit, - ): Promise>> { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables/${p["name"]}` - - return this._fetch(url, { method: "GET", ...(opts ?? {}) }, timeout) - } - - async actionsUpdateEnvironmentVariable( - p: { - repositoryId: number - name: string - environmentName: string - requestBody: { - name?: string - value?: string - } - }, - timeout?: number, - opts?: RequestInit, - ): Promise>> { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables/${p["name"]}` - const headers = this._headers({ "Content-Type": "application/json" }) - const body = JSON.stringify(p.requestBody) - - return this._fetch( - url, - { method: "PATCH", headers, body, ...(opts ?? {}) }, - timeout, - ) - } - - async actionsDeleteEnvironmentVariable( - p: { - repositoryId: number - name: string - environmentName: string - }, - timeout?: number, - opts?: RequestInit, - ): Promise>> { - const url = - this.basePath + - `/repositories/${p["repositoryId"]}/environments/${p["environmentName"]}/variables/${p["name"]}` - - return this._fetch(url, { method: "DELETE", ...(opts ?? {}) }, timeout) - } - async searchCode( p: { q: string @@ -20866,7 +21685,7 @@ export class ApiClient extends AbstractFetchClient { opts?: RequestInit, ): Promise< TypedFetchResponse< - | Res<201, t_repository> + | Res<201, t_full_repository> | Res<304, void> | Res<400, t_scim_error> | Res<401, t_basic_error> diff --git a/integration-tests/typescript-fetch/src/generated/api.github.com.yaml/models.ts b/integration-tests/typescript-fetch/src/generated/api.github.com.yaml/models.ts index 850136f4..0eda0d0f 100644 --- a/integration-tests/typescript-fetch/src/generated/api.github.com.yaml/models.ts +++ b/integration-tests/typescript-fetch/src/generated/api.github.com.yaml/models.ts @@ -177,6 +177,7 @@ export type t_api_overview = { api?: string[] dependabot?: string[] domains?: { + actions?: string[] codespaces?: string[] copilot?: string[] packages?: string[] @@ -203,15 +204,26 @@ export type t_app_permissions = { actions?: "read" | "write" administration?: "read" | "write" checks?: "read" | "write" + codespaces?: "read" | "write" contents?: "read" | "write" + dependabot_secrets?: "read" | "write" deployments?: "read" | "write" + email_addresses?: "read" | "write" environments?: "read" | "write" + followers?: "read" | "write" + git_ssh_keys?: "read" | "write" + gpg_keys?: "read" | "write" + interaction_limits?: "read" | "write" issues?: "read" | "write" members?: "read" | "write" metadata?: "read" | "write" organization_administration?: "read" | "write" organization_announcement_banners?: "read" | "write" + organization_copilot_seat_management?: "write" + organization_custom_org_roles?: "read" | "write" + organization_custom_properties?: "read" | "write" | "admin" organization_custom_roles?: "read" | "write" + organization_events?: "read" organization_hooks?: "read" | "write" organization_packages?: "read" | "write" organization_personal_access_token_requests?: "read" | "write" @@ -223,13 +235,16 @@ export type t_app_permissions = { organization_user_blocking?: "read" | "write" packages?: "read" | "write" pages?: "read" | "write" + profile?: "write" pull_requests?: "read" | "write" + repository_custom_properties?: "read" | "write" repository_hooks?: "read" | "write" repository_projects?: "read" | "write" | "admin" secret_scanning_alerts?: "read" | "write" secrets?: "read" | "write" security_events?: "read" | "write" single_file?: "read" | "write" + starring?: "read" | "write" statuses?: "read" | "write" team_discussions?: "read" | "write" vulnerability_alerts?: "read" | "write" @@ -569,7 +584,13 @@ export type t_check_run = { } pull_requests: t_pull_request_minimal[] started_at: string | null - status: "queued" | "in_progress" | "completed" + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" url: string } @@ -600,7 +621,14 @@ export type t_check_suite = { repository: t_minimal_repository rerequestable?: boolean runs_rerequestable?: boolean - status: "queued" | "in_progress" | "completed" | null + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" + | null updated_at: string | null url: string | null } @@ -785,6 +813,7 @@ export type t_code_scanning_alert_rule_summary = { description?: string id?: string | null name?: string + security_severity_level?: "low" | "medium" | "high" | "critical" | null severity?: "none" | "note" | "warning" | "error" | null tags?: string[] | null } @@ -860,6 +889,7 @@ export type t_code_scanning_analysis_tool_version = string | null export type t_code_scanning_analysis_url = string export type t_code_scanning_codeql_database = { + commit_oid?: string | null content_type: string created_at: string id: number @@ -902,7 +932,7 @@ export type t_code_scanning_default_setup_update = { | "swift" )[] query_suite?: "default" | "extended" - state: "configured" | "not-configured" + state?: "configured" | "not-configured" } export type t_code_scanning_default_setup_update_response = { @@ -922,7 +952,7 @@ export type t_code_scanning_organization_alert_items = { most_recent_instance: t_code_scanning_alert_instance number: t_alert_number repository: t_simple_repository - rule: t_code_scanning_alert_rule + rule: t_code_scanning_alert_rule_summary state: t_code_scanning_alert_state tool: t_code_scanning_analysis_tool updated_at?: t_alert_updated_at @@ -931,6 +961,8 @@ export type t_code_scanning_organization_alert_items = { export type t_code_scanning_ref = string +export type t_code_scanning_ref_full = string + export type t_code_scanning_sarifs_receipt = { id?: t_code_scanning_analysis_sarif_id readonly url?: string @@ -1117,6 +1149,10 @@ export type t_codespaces_org_secret = { visibility: "all" | "private" | "selected" } +export type t_codespaces_permissions_check_for_devcontainer = { + accepted: boolean +} + export type t_codespaces_public_key = { created_at?: string id?: number @@ -1447,6 +1483,9 @@ export type t_converted_note_to_issue_issue_event = { } export type t_copilot_organization_details = { + cli?: "enabled" | "disabled" | "unconfigured" + ide_chat?: "enabled" | "disabled" | "unconfigured" + platform_chat?: "enabled" | "disabled" | "unconfigured" public_code_suggestions: "allow" | "block" | "unconfigured" | "unknown" seat_breakdown: t_copilot_seat_breakdown seat_management_setting: @@ -1467,9 +1506,7 @@ export type t_copilot_seat_breakdown = { } export type t_copilot_seat_details = { - assignee: { - [key: string]: unknown | undefined - } + assignee: t_simple_user | t_team | t_organization assigning_team?: t_team | null created_at: string last_activity_at?: string | null @@ -1485,6 +1522,11 @@ export type t_custom_deployment_rule_app = { slug: string } +export type t_custom_property_value = { + property_name: string + value: string | string[] | null +} + export type t_demilestoned_issue_event = { actor: t_simple_user commit_id: string | null @@ -1706,12 +1748,18 @@ export type t_deployment_branch_policy = { id?: number name?: string node_id?: string + type?: "branch" | "tag" } export type t_deployment_branch_policy_name_pattern = { name: string } +export type t_deployment_branch_policy_name_pattern_with_type = { + name: string + type?: "branch" | "tag" +} + export type t_deployment_branch_policy_settings = { custom_branch_policies: boolean protected_branches: boolean @@ -1830,6 +1878,7 @@ export type t_environment = { | { id: number node_id: string + prevent_self_review?: boolean reviewers?: { reviewer?: t_simple_user | t_team type?: t_deployment_reviewer_type @@ -1986,6 +2035,9 @@ export type t_full_repository = { contents_url: string contributors_url: string created_at: string + custom_properties?: { + [key: string]: unknown | undefined + } default_branch: string delete_branch_on_merge?: boolean deployments_url: string @@ -2003,7 +2055,7 @@ export type t_full_repository = { git_tags_url: string git_url: string has_discussions: boolean - has_downloads: boolean + has_downloads?: boolean has_issues: boolean has_pages: boolean has_projects: boolean @@ -2360,18 +2412,7 @@ export type t_gpg_key = { export type t_hook = { active: boolean - config: { - content_type?: t_webhook_config_content_type - digest?: string - email?: string - insecure_ssl?: t_webhook_config_insecure_ssl - password?: string - room?: string - secret?: t_webhook_config_secret - subdomain?: string - token?: string - url?: t_webhook_config_url - } + config: t_webhook_config created_at: string deliveries_url?: string events: string[] @@ -2802,7 +2843,13 @@ export type t_job = { runner_id: number | null runner_name: string | null started_at: string - status: "queued" | "in_progress" | "completed" + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" steps?: { completed_at?: string | null conclusion: string | null @@ -3524,12 +3571,10 @@ export type t_nullable_repository = { milestones_url: string mirror_url: string | null name: string - network_count?: number node_id: string notifications_url: string open_issues: number open_issues_count: number - organization?: t_nullable_simple_user owner: t_simple_user permissions?: { admin: boolean @@ -3550,127 +3595,12 @@ export type t_nullable_repository = { stargazers_url: string starred_at?: string statuses_url: string - subscribers_count?: number subscribers_url: string subscription_url: string svn_url: string tags_url: string teams_url: string temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK" - merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" - squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - use_squash_pr_title_as_default?: boolean - visibility?: string - watchers_count?: number - } | null topics?: string[] trees_url: string updated_at: string | null @@ -3756,6 +3686,16 @@ export type t_oidc_custom_sub_repo = { use_default: boolean } +export type t_org_custom_property = { + allowed_values?: string[] | null + default_value?: string | string[] | null + description?: string | null + property_name: string + required?: boolean + value_type: "string" | "single_select" + values_editable_by?: "org_actors" | "org_and_repo_actors" | null +} + export type t_org_hook = { active: boolean config: { @@ -3787,11 +3727,58 @@ export type t_org_membership = { user: t_nullable_simple_user } +export type t_org_repo_custom_property_values = { + properties: t_custom_property_value[] + repository_full_name: string + repository_id: number + repository_name: string +} + export type t_org_ruleset_conditions = | (t_repository_ruleset_conditions & t_repository_ruleset_conditions_repository_name_target) | (t_repository_ruleset_conditions & t_repository_ruleset_conditions_repository_id_target) + | (t_repository_ruleset_conditions & + t_repository_ruleset_conditions_repository_property_target) + +export type t_organization = { + avatar_url: string + blog?: string + company?: string + created_at: string + description: string | null + email?: string + events_url: string + followers: number + following: number + has_organization_projects: boolean + has_repository_projects: boolean + hooks_url: string + html_url: string + id: number + is_verified?: boolean + issues_url: string + location?: string + login: string + members_url: string + name?: string + node_id: string + plan?: { + filled_seats?: number + name?: string + private_repos?: number + seats?: number + space?: number + } + public_gists: number + public_members_url: string + public_repos: number + repos_url: string + type: string + updated_at: string + url: string +} export type t_organization_actions_secret = { created_at: string @@ -3818,6 +3805,11 @@ export type t_organization_dependabot_secret = { visibility: "all" | "private" | "selected" } +export type t_organization_fine_grained_permission = { + description: string + name: string +} + export type t_organization_full = { advanced_security_enabled_for_new_repositories?: boolean archived_at: string | null @@ -3944,6 +3936,16 @@ export type t_organization_programmatic_access_grant_request = { token_last_used_at: string | null } +export type t_organization_role = { + created_at: string + description?: string | null + id: number + name: string + organization: t_nullable_simple_user + permissions: string[] + updated_at: string +} + export type t_organization_secret_scanning_alert = { created_at?: t_alert_created_at html_url?: t_alert_html_url @@ -3963,6 +3965,7 @@ export type t_organization_secret_scanning_alert = { state?: t_secret_scanning_alert_state updated_at?: t_nullable_alert_updated_at url?: t_alert_url + validity?: "active" | "inactive" | "unknown" } export type t_organization_simple = { @@ -4062,11 +4065,27 @@ export type t_page_build_status = { } export type t_page_deployment = { + id: number | string page_url: string preview_url?: string status_url: string } +export type t_pages_deployment_status = { + status?: + | "deployment_in_progress" + | "syncing_files" + | "finished_file_sync" + | "updating_pages" + | "purging_cdn" + | "deployment_cancelled" + | "deployment_failed" + | "deployment_content_failed" + | "deployment_attempt_error" + | "deployment_lost" + | "succeed" +} + export type t_pages_health_check = { alt_domain?: { caa_error?: string | null @@ -4193,6 +4212,8 @@ export type t_porter_large_file = { size: number } +export type t_prevent_self_review = boolean + export type t_private_user = { avatar_url: string bio: string | null @@ -4248,6 +4269,7 @@ export type t_private_vulnerability_report_create = { cwe_ids?: string[] | null description: string severity?: "critical" | "high" | "medium" | "low" | null + start_private_fork?: boolean summary: string vulnerabilities?: | { @@ -5280,12 +5302,10 @@ export type t_repository = { milestones_url: string mirror_url: string | null name: string - network_count?: number node_id: string notifications_url: string open_issues: number open_issues_count: number - organization?: t_nullable_simple_user owner: t_simple_user permissions?: { admin: boolean @@ -5306,127 +5326,12 @@ export type t_repository = { stargazers_url: string starred_at?: string statuses_url: string - subscribers_count?: number subscribers_url: string subscription_url: string svn_url: string tags_url: string teams_url: string temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK" - merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" - squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - use_squash_pr_title_as_default?: boolean - visibility?: string - watchers_count?: number - } | null topics?: string[] trees_url: string updated_at: string | null @@ -5480,7 +5385,7 @@ export type t_repository_advisory = { } | null summary: string readonly updated_at: string | null - url: string + readonly url: string vulnerabilities: t_repository_advisory_vulnerability[] | null readonly withdrawn_at: string | null } @@ -5497,6 +5402,7 @@ export type t_repository_advisory_create = { cwe_ids?: string[] | null description: string severity?: "critical" | "high" | "medium" | "low" | null + start_private_fork?: boolean summary: string vulnerabilities: { package: { @@ -5586,6 +5492,7 @@ export type t_repository_rule = | t_repository_rule_committer_email_pattern | t_repository_rule_branch_name_pattern | t_repository_rule_tag_name_pattern + | t_repository_rule_workflows export type t_repository_rule_branch_name_pattern = { parameters?: { @@ -5651,6 +5558,7 @@ export type t_repository_rule_detailed = | (t_repository_rule_committer_email_pattern & t_repository_rule_ruleset_info) | (t_repository_rule_branch_name_pattern & t_repository_rule_ruleset_info) | (t_repository_rule_tag_name_pattern & t_repository_rule_ruleset_info) + | (t_repository_rule_workflows & t_repository_rule_ruleset_info) export type t_repository_rule_enforcement = "disabled" | "active" | "evaluate" @@ -5663,6 +5571,13 @@ export type t_repository_rule_params_status_check_configuration = { integration_id?: number } +export type t_repository_rule_params_workflow_file_reference = { + path: string + ref?: string + repository_id: number + sha?: string +} + export type t_repository_rule_pull_request = { parameters?: { dismiss_stale_reviews_on_push: boolean @@ -5720,6 +5635,13 @@ export type t_repository_rule_update = { type: "update" } +export type t_repository_rule_workflows = { + parameters?: { + workflows: t_repository_rule_params_workflow_file_reference[] + } + type: "workflows" +} + export type t_repository_ruleset = { _links?: { html?: { @@ -5730,7 +5652,7 @@ export type t_repository_ruleset = { } } bypass_actors?: t_repository_ruleset_bypass_actor[] - conditions?: t_repository_ruleset_conditions | t_org_ruleset_conditions + conditions?: t_repository_ruleset_conditions | t_org_ruleset_conditions | null created_at?: string current_user_can_bypass?: "always" | "pull_requests_only" | "never" enforcement: t_repository_rule_enforcement @@ -5771,6 +5693,18 @@ export type t_repository_ruleset_conditions_repository_name_target = { } } +export type t_repository_ruleset_conditions_repository_property_spec = { + name: string + property_values: string[] +} + +export type t_repository_ruleset_conditions_repository_property_target = { + repository_property: { + exclude?: t_repository_ruleset_conditions_repository_property_spec[] + include?: t_repository_ruleset_conditions_repository_property_spec[] + } +} + export type t_repository_subscription = { created_at: string ignored: boolean @@ -5888,7 +5822,7 @@ export type t_root = { followers_url: string following_url: string gists_url: string - hub_url: string + hub_url?: string issue_search_url: string issues_url: string keys_url: string @@ -5910,6 +5844,45 @@ export type t_root = { user_url: string } +export type t_rule_suite = { + actor_id?: number | null + actor_name?: string | null + after_sha?: string + before_sha?: string + evaluation_result?: "pass" | "fail" + id?: number + pushed_at?: string + ref?: string + repository_id?: number + repository_name?: string + result?: "pass" | "fail" | "bypass" + rule_evaluations?: { + details?: string + enforcement?: "active" | "evaluate" | "deleted ruleset" + result?: "pass" | "fail" + rule_source?: { + id?: number | null + name?: string | null + type?: string + } + rule_type?: string + }[] +} + +export type t_rule_suites = { + actor_id?: number + actor_name?: string + after_sha?: string + before_sha?: string + evaluation_result?: "pass" | "fail" + id?: number + pushed_at?: string + ref?: string + repository_id?: number + repository_name?: string + result?: "pass" | "fail" | "bypass" +}[] + export type t_runner = { busy: boolean id: number @@ -5973,6 +5946,7 @@ export type t_secret_scanning_alert = { state?: t_secret_scanning_alert_state updated_at?: t_nullable_alert_updated_at url?: t_alert_url + validity?: "active" | "inactive" | "unknown" } export type t_secret_scanning_alert_resolution = @@ -5987,12 +5961,34 @@ export type t_secret_scanning_alert_resolution_comment = string | null export type t_secret_scanning_alert_state = "open" | "resolved" export type t_secret_scanning_location = { - details: + details?: | t_secret_scanning_location_commit + | t_secret_scanning_location_wiki_commit | t_secret_scanning_location_issue_title | t_secret_scanning_location_issue_body | t_secret_scanning_location_issue_comment - type: "commit" | "issue_title" | "issue_body" | "issue_comment" + | t_secret_scanning_location_discussion_title + | t_secret_scanning_location_discussion_body + | t_secret_scanning_location_discussion_comment + | t_secret_scanning_location_pull_request_title + | t_secret_scanning_location_pull_request_body + | t_secret_scanning_location_pull_request_comment + | t_secret_scanning_location_pull_request_review + | t_secret_scanning_location_pull_request_review_comment + type?: + | "commit" + | "wiki_commit" + | "issue_title" + | "issue_body" + | "issue_comment" + | "discussion_title" + | "discussion_body" + | "discussion_comment" + | "pull_request_title" + | "pull_request_body" + | "pull_request_comment" + | "pull_request_review" + | "pull_request_review_comment" } export type t_secret_scanning_location_commit = { @@ -6007,6 +6003,18 @@ export type t_secret_scanning_location_commit = { start_line: number } +export type t_secret_scanning_location_discussion_body = { + discussion_body_url: string +} + +export type t_secret_scanning_location_discussion_comment = { + discussion_comment_url: string +} + +export type t_secret_scanning_location_discussion_title = { + discussion_title_url: string +} + export type t_secret_scanning_location_issue_body = { issue_body_url: string } @@ -6019,6 +6027,38 @@ export type t_secret_scanning_location_issue_title = { issue_title_url: string } +export type t_secret_scanning_location_pull_request_body = { + pull_request_body_url: string +} + +export type t_secret_scanning_location_pull_request_comment = { + pull_request_comment_url: string +} + +export type t_secret_scanning_location_pull_request_review = { + pull_request_review_url: string +} + +export type t_secret_scanning_location_pull_request_review_comment = { + pull_request_review_comment_url: string +} + +export type t_secret_scanning_location_pull_request_title = { + pull_request_title_url: string +} + +export type t_secret_scanning_location_wiki_commit = { + blob_sha: string + commit_sha: string + commit_url: string + end_column: number + end_line: number + page_url: string + path: string + start_column: number + start_line: number +} + export type t_security_advisory_credit_types = | "analyst" | "finder" @@ -6597,7 +6637,6 @@ export type t_team_repository = { tags_url: string teams_url: string temp_clone_token?: string - template_repository?: t_nullable_repository topics?: string[] trees_url: string updated_at: string | null diff --git a/integration-tests/typescript-fetch/src/generated/stripe.yaml/client.ts b/integration-tests/typescript-fetch/src/generated/stripe.yaml/client.ts index 7cc4a294..36e24b8c 100644 --- a/integration-tests/typescript-fetch/src/generated/stripe.yaml/client.ts +++ b/integration-tests/typescript-fetch/src/generated/stripe.yaml/client.ts @@ -13,6 +13,10 @@ import { t_balance, t_balance_transaction, t_bank_account, + t_billing_meter, + t_billing_meter_event, + t_billing_meter_event_adjustment, + t_billing_meter_event_summary, t_billing_portal_configuration, t_billing_portal_session, t_capability, @@ -20,6 +24,10 @@ import { t_cash_balance, t_charge, t_checkout_session, + t_climate_order, + t_climate_product, + t_climate_supplier, + t_confirmation_token, t_country_spec, t_coupon, t_credit_note, @@ -27,6 +35,7 @@ import { t_customer, t_customer_balance_transaction, t_customer_cash_balance_transaction, + t_customer_session, t_deleted_account, t_deleted_apple_pay_domain, t_deleted_coupon, @@ -61,6 +70,8 @@ import { t_financial_connections_account, t_financial_connections_account_owner, t_financial_connections_session, + t_financial_connections_transaction, + t_forwarding_request, t_funding_instructions, t_identity_verification_report, t_identity_verification_session, @@ -70,7 +81,10 @@ import { t_issuing_card, t_issuing_cardholder, t_issuing_dispute, + t_issuing_personalization_design, + t_issuing_physical_bundle, t_issuing_settlement, + t_issuing_token, t_issuing_transaction, t_item, t_line_item, @@ -111,6 +125,7 @@ import { t_tax_code, t_tax_id, t_tax_rate, + t_tax_registration, t_tax_settings, t_tax_transaction, t_tax_transaction_line_item, @@ -182,6 +197,10 @@ export class ApiClient extends AbstractFetchClient { requestBody: { account: string collect?: "currently_due" | "eventually_due" + collection_options?: { + fields: "currently_due" | "eventually_due" + future_requirements?: "include" | "omit" + } expand?: string[] refresh_url?: string return_url?: string @@ -213,6 +232,37 @@ export class ApiClient extends AbstractFetchClient { components: { account_onboarding?: { enabled: boolean + features?: EmptyObject + } + documents?: { + enabled: boolean + features?: EmptyObject + } + payment_details?: { + enabled: boolean + features?: { + capture_payments?: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management?: boolean + refund_management?: boolean + } + } + payments?: { + enabled: boolean + features?: { + capture_payments?: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management?: boolean + refund_management?: boolean + } + } + payouts?: { + enabled: boolean + features?: { + edit_payout_schedule?: boolean + instant_payouts?: boolean + standard_payouts?: boolean + } } } expand?: string[] @@ -310,6 +360,12 @@ export class ApiClient extends AbstractFetchClient { } | string business_profile?: { + annual_revenue?: { + amount: number + currency: string + fiscal_year_end: string + } + estimated_worker_count?: number mcc?: string monthly_estimated_revenue?: { amount: number @@ -345,6 +401,9 @@ export class ApiClient extends AbstractFetchClient { afterpay_clearpay_payments?: { requested?: boolean } + amazon_pay_payments?: { + requested?: boolean + } au_becs_debit_payments?: { requested?: boolean } @@ -408,6 +467,9 @@ export class ApiClient extends AbstractFetchClient { link_payments?: { requested?: boolean } + mobilepay_payments?: { + requested?: boolean + } oxxo_payments?: { requested?: boolean } @@ -420,12 +482,18 @@ export class ApiClient extends AbstractFetchClient { promptpay_payments?: { requested?: boolean } + revolut_pay_payments?: { + requested?: boolean + } sepa_debit_payments?: { requested?: boolean } sofort_payments?: { requested?: boolean } + swish_payments?: { + requested?: boolean + } tax_reporting_us_1099_k?: { requested?: boolean } @@ -504,6 +572,7 @@ export class ApiClient extends AbstractFetchClient { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -610,6 +679,13 @@ export class ApiClient extends AbstractFetchClient { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -628,6 +704,9 @@ export class ApiClient extends AbstractFetchClient { } | "" settings?: { + bacs_debit_payments?: { + display_name?: string + } branding?: { icon?: string logo?: string @@ -761,6 +840,12 @@ export class ApiClient extends AbstractFetchClient { requestBody?: { account_token?: string business_profile?: { + annual_revenue?: { + amount: number + currency: string + fiscal_year_end: string + } + estimated_worker_count?: number mcc?: string monthly_estimated_revenue?: { amount: number @@ -796,6 +881,9 @@ export class ApiClient extends AbstractFetchClient { afterpay_clearpay_payments?: { requested?: boolean } + amazon_pay_payments?: { + requested?: boolean + } au_becs_debit_payments?: { requested?: boolean } @@ -859,6 +947,9 @@ export class ApiClient extends AbstractFetchClient { link_payments?: { requested?: boolean } + mobilepay_payments?: { + requested?: boolean + } oxxo_payments?: { requested?: boolean } @@ -871,12 +962,18 @@ export class ApiClient extends AbstractFetchClient { promptpay_payments?: { requested?: boolean } + revolut_pay_payments?: { + requested?: boolean + } sepa_debit_payments?: { requested?: boolean } sofort_payments?: { requested?: boolean } + swish_payments?: { + requested?: boolean + } tax_reporting_us_1099_k?: { requested?: boolean } @@ -955,6 +1052,7 @@ export class ApiClient extends AbstractFetchClient { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -1060,6 +1158,13 @@ export class ApiClient extends AbstractFetchClient { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -1078,6 +1183,9 @@ export class ApiClient extends AbstractFetchClient { } | "" settings?: { + bacs_debit_payments?: { + display_name?: string + } branding?: { icon?: string logo?: string @@ -1100,6 +1208,9 @@ export class ApiClient extends AbstractFetchClient { statement_descriptor_prefix_kana?: string | "" statement_descriptor_prefix_kanji?: string | "" } + invoices?: { + default_account_tax_ids?: string[] | "" + } payments?: { statement_descriptor?: string statement_descriptor_kana?: string @@ -1406,6 +1517,7 @@ export class ApiClient extends AbstractFetchClient { endingBefore?: string expand?: string[] limit?: number + object?: "bank_account" | "card" startingAfter?: string requestBody?: EmptyObject }, @@ -1433,6 +1545,7 @@ export class ApiClient extends AbstractFetchClient { ending_before: p["endingBefore"], expand: p["expand"], limit: p["limit"], + object: p["object"], starting_after: p["startingAfter"], }) const body = JSON.stringify(p.requestBody) @@ -1632,6 +1745,7 @@ export class ApiClient extends AbstractFetchClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean representative?: boolean } @@ -1678,6 +1792,13 @@ export class ApiClient extends AbstractFetchClient { p: { account: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -1755,6 +1876,7 @@ export class ApiClient extends AbstractFetchClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -1848,6 +1970,13 @@ export class ApiClient extends AbstractFetchClient { account: string person: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -1925,6 +2054,7 @@ export class ApiClient extends AbstractFetchClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -1971,6 +2101,7 @@ export class ApiClient extends AbstractFetchClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean representative?: boolean } @@ -2017,6 +2148,13 @@ export class ApiClient extends AbstractFetchClient { p: { account: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -2094,6 +2232,7 @@ export class ApiClient extends AbstractFetchClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -2187,6 +2326,13 @@ export class ApiClient extends AbstractFetchClient { account: string person: string requestBody?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -2264,6 +2410,7 @@ export class ApiClient extends AbstractFetchClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -3024,6 +3171,304 @@ export class ApiClient extends AbstractFetchClient { ) } + async postBillingMeterEventAdjustments( + p: { + requestBody: { + cancel: { + identifier: string + } + event_name: string + expand?: string[] + type?: "cancel" + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_billing_meter_event_adjustment> | Res + > + > { + const url = this.basePath + `/v1/billing/meter_event_adjustments` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postBillingMeterEvents( + p: { + requestBody: { + event_name: string + expand?: string[] + identifier?: string + payload: { + [key: string]: string | undefined + } + timestamp: number + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_billing_meter_event> | Res + > + > { + const url = this.basePath + `/v1/billing/meter_events` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getBillingMeters( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "inactive" + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_billing_meter[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/billing/meters` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postBillingMeters( + p: { + requestBody: { + customer_mapping?: { + event_payload_key: string + type: "by_id" + } + default_aggregation: { + formula: "count" | "sum" + } + display_name: string + event_name: string + event_time_window?: "day" | "hour" + expand?: string[] + value_settings?: { + event_payload_key: string + } + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/billing/meters` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getBillingMetersId( + p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/billing/meters/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postBillingMetersId( + p: { + id: string + requestBody?: { + display_name?: string + expand?: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/billing/meters/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postBillingMetersIdDeactivate( + p: { + id: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/billing/meters/${p["id"]}/deactivate` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getBillingMetersIdEventSummaries( + p: { + customer: string + endTime: number + endingBefore?: string + expand?: string[] + id: string + limit?: number + startTime: number + startingAfter?: string + valueGroupingWindow?: "hour" + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_billing_meter_event_summary[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/billing/meters/${p["id"]}/event_summaries` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + customer: p["customer"], + end_time: p["endTime"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + start_time: p["startTime"], + starting_after: p["startingAfter"], + value_grouping_window: p["valueGroupingWindow"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postBillingMetersIdReactivate( + p: { + id: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/billing/meters/${p["id"]}/reactivate` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async getBillingPortalConfigurations( p: { active?: boolean @@ -3121,9 +3566,6 @@ export class ApiClient extends AbstractFetchClient { mode?: "at_period_end" | "immediately" proration_behavior?: "always_invoice" | "create_prorations" | "none" } - subscription_pause?: { - enabled?: boolean - } subscription_update?: { default_allowed_updates: | ("price" | "promotion_code" | "quantity")[] @@ -3246,9 +3688,6 @@ export class ApiClient extends AbstractFetchClient { mode?: "at_period_end" | "immediately" proration_behavior?: "always_invoice" | "create_prorations" | "none" } - subscription_pause?: { - enabled?: boolean - } subscription_update?: { default_allowed_updates?: | ("price" | "promotion_code" | "quantity")[] @@ -4004,6 +4443,14 @@ export class ApiClient extends AbstractFetchClient { async getCheckoutSessions( p: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string customerDetails?: { email: string @@ -4014,6 +4461,7 @@ export class ApiClient extends AbstractFetchClient { paymentIntent?: string paymentLink?: string startingAfter?: string + status?: "complete" | "expired" | "open" subscription?: string requestBody?: EmptyObject } = {}, @@ -4038,6 +4486,7 @@ export class ApiClient extends AbstractFetchClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + created: p["created"], customer: p["customer"], customer_details: p["customerDetails"], ending_before: p["endingBefore"], @@ -4046,6 +4495,7 @@ export class ApiClient extends AbstractFetchClient { payment_intent: p["paymentIntent"], payment_link: p["paymentLink"], starting_after: p["startingAfter"], + status: p["status"], subscription: p["subscription"], }) const body = JSON.stringify(p.requestBody) @@ -4059,7 +4509,7 @@ export class ApiClient extends AbstractFetchClient { async postCheckoutSessions( p: { - requestBody: { + requestBody?: { after_expiration?: { recovery?: { allow_promotion_codes?: boolean @@ -4069,11 +4519,18 @@ export class ApiClient extends AbstractFetchClient { allow_promotion_codes?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" cancel_url?: string client_reference_id?: string consent_collection?: { + payment_method_reuse_agreement?: { + position: "auto" | "hidden" + } promotions?: "auto" | "none" terms_of_service?: "none" | "required" } @@ -4102,6 +4559,11 @@ export class ApiClient extends AbstractFetchClient { type: "dropdown" | "numeric" | "text" }[] custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -4144,6 +4606,10 @@ export class ApiClient extends AbstractFetchClient { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: { [key: string]: string | undefined } @@ -4307,6 +4773,7 @@ export class ApiClient extends AbstractFetchClient { installments?: { enabled?: boolean } + request_three_d_secure?: "any" | "automatic" | "challenge" setup_future_usage?: "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -4405,12 +4872,18 @@ export class ApiClient extends AbstractFetchClient { pix?: { expires_after_seconds?: number } + revolut_pay?: { + setup_future_usage?: "none" | "off_session" + } sepa_debit?: { setup_future_usage?: "none" | "off_session" | "on_session" } sofort?: { setup_future_usage?: "none" } + swish?: { + reference?: string + } us_bank_account?: { financial_connections?: { permissions?: ( @@ -4419,7 +4892,7 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" @@ -4457,8 +4930,10 @@ export class ApiClient extends AbstractFetchClient { | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -4466,6 +4941,8 @@ export class ApiClient extends AbstractFetchClient { phone_number_collection?: { enabled: boolean } + redirect_on_completion?: "always" | "if_required" | "never" + return_url?: string setup_intent_data?: { description?: string metadata?: { @@ -4754,6 +5231,12 @@ export class ApiClient extends AbstractFetchClient { billing_cycle_anchor?: number default_tax_rates?: string[] description?: string + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } metadata?: { [key: string]: string | undefined } @@ -4771,12 +5254,13 @@ export class ApiClient extends AbstractFetchClient { } } } - success_url: string + success_url?: string tax_id_collection?: { enabled: boolean } + ui_mode?: "embedded" | "hosted" } - }, + } = {}, timeout?: number, opts?: RequestInit, ): Promise< @@ -4890,6 +5374,330 @@ export class ApiClient extends AbstractFetchClient { ) } + async getClimateOrders( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_climate_order[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/climate/orders` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postClimateOrders( + p: { + requestBody: { + amount?: number + beneficiary?: { + public_name: string + } + currency?: string + expand?: string[] + metadata?: { + [key: string]: string | undefined + } + metric_tons?: string + product: string + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/climate/orders` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getClimateOrdersOrder( + p: { + expand?: string[] + order: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/climate/orders/${p["order"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postClimateOrdersOrder( + p: { + order: string + requestBody?: { + beneficiary?: + | { + public_name: string | "" + } + | "" + expand?: string[] + metadata?: { + [key: string]: string | undefined + } + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/climate/orders/${p["order"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postClimateOrdersOrderCancel( + p: { + order: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/climate/orders/${p["order"]}/cancel` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getClimateProducts( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_climate_product[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/climate/products` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getClimateProductsProduct( + p: { + expand?: string[] + product: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/climate/products/${p["product"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getClimateSuppliers( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_climate_supplier[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/climate/suppliers` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getClimateSuppliersSupplier( + p: { + expand?: string[] + supplier: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/climate/suppliers/${p["supplier"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getConfirmationTokensConfirmationToken( + p: { + confirmationToken: string + expand?: string[] + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_confirmation_token> | Res + > + > { + const url = + this.basePath + `/v1/confirmation_tokens/${p["confirmationToken"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async getCountrySpecs( p: { endingBefore?: string @@ -5146,6 +5954,14 @@ export class ApiClient extends AbstractFetchClient { async getCreditNotes( p: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string endingBefore?: string expand?: string[] @@ -5175,6 +5991,7 @@ export class ApiClient extends AbstractFetchClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + created: p["created"], customer: p["customer"], ending_before: p["endingBefore"], expand: p["expand"], @@ -5204,6 +6021,13 @@ export class ApiClient extends AbstractFetchClient { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -5256,6 +6080,13 @@ export class ApiClient extends AbstractFetchClient { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -5325,6 +6156,13 @@ export class ApiClient extends AbstractFetchClient { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -5518,6 +6356,39 @@ export class ApiClient extends AbstractFetchClient { ) } + async postCustomerSessions( + p: { + requestBody: { + components: { + buy_button?: { + enabled: boolean + } + pricing_table?: { + enabled: boolean + } + } + customer: string + expand?: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/customer_sessions` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async getCustomers( p: { created?: @@ -5644,6 +6515,7 @@ export class ApiClient extends AbstractFetchClient { source?: string tax?: { ip_address?: string | "" + validate_location?: "deferred" | "immediately" } tax_exempt?: "" | "exempt" | "none" | "reverse" tax_id_data?: { @@ -5693,6 +6565,7 @@ export class ApiClient extends AbstractFetchClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -5936,6 +6809,7 @@ export class ApiClient extends AbstractFetchClient { source?: string tax?: { ip_address?: string | "" + validate_location?: "deferred" | "immediately" } tax_exempt?: "" | "exempt" | "none" | "reverse" } @@ -6816,14 +7690,17 @@ export class ApiClient extends AbstractFetchClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -7191,6 +8068,11 @@ export class ApiClient extends AbstractFetchClient { customer: string requestBody?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -7202,9 +8084,13 @@ export class ApiClient extends AbstractFetchClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } backdate_start_date?: number billing_cycle_anchor?: number @@ -7223,13 +8109,34 @@ export class ApiClient extends AbstractFetchClient { default_payment_method?: string default_source?: string default_tax_rates?: string[] | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -7296,7 +8203,7 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -7311,6 +8218,7 @@ export class ApiClient extends AbstractFetchClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -7320,7 +8228,7 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -7341,12 +8249,14 @@ export class ApiClient extends AbstractFetchClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -7462,6 +8372,11 @@ export class ApiClient extends AbstractFetchClient { subscriptionExposedId: string requestBody?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -7473,9 +8388,13 @@ export class ApiClient extends AbstractFetchClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "now" | "unchanged" billing_thresholds?: @@ -7505,7 +8424,21 @@ export class ApiClient extends AbstractFetchClient { default_payment_method?: string default_source?: string | "" default_tax_rates?: string[] | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { @@ -7514,6 +8447,13 @@ export class ApiClient extends AbstractFetchClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -7589,7 +8529,7 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -7604,6 +8544,7 @@ export class ApiClient extends AbstractFetchClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -7613,7 +8554,7 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -7634,12 +8575,14 @@ export class ApiClient extends AbstractFetchClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -7844,6 +8787,7 @@ export class ApiClient extends AbstractFetchClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -8742,7 +9686,7 @@ export class ApiClient extends AbstractFetchClient { account: string requestBody: { expand?: string[] - features: ("balance" | "ownership")[] + features: ("balance" | "ownership" | "transactions")[] } }, timeout?: number, @@ -8767,6 +9711,66 @@ export class ApiClient extends AbstractFetchClient { ) } + async postFinancialConnectionsAccountsAccountSubscribe( + p: { + account: string + requestBody: { + expand?: string[] + features: "transactions"[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_financial_connections_account> | Res + > + > { + const url = + this.basePath + + `/v1/financial_connections/accounts/${p["account"]}/subscribe` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postFinancialConnectionsAccountsAccountUnsubscribe( + p: { + account: string + requestBody: { + expand?: string[] + features: "transactions"[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_financial_connections_account> | Res + > + > { + const url = + this.basePath + + `/v1/financial_connections/accounts/${p["account"]}/unsubscribe` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async postFinancialConnectionsSessions( p: { requestBody: { @@ -8785,7 +9789,7 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: ("balances" | "ownership")[] + prefetch?: ("balances" | "ownership" | "transactions")[] return_url?: string } }, @@ -8837,8 +9841,215 @@ export class ApiClient extends AbstractFetchClient { ) } + async getFinancialConnectionsTransactions( + p: { + account: string + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + transactedAt?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + transactionRefresh?: { + after: string + } + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_financial_connections_transaction[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/financial_connections/transactions` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + account: p["account"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + transacted_at: p["transactedAt"], + transaction_refresh: p["transactionRefresh"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getFinancialConnectionsTransactionsTransaction( + p: { + expand?: string[] + transaction: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_financial_connections_transaction> | Res + > + > { + const url = + this.basePath + + `/v1/financial_connections/transactions/${p["transaction"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getForwardingRequests( + p: { + created?: { + gt?: number + gte?: number + lt?: number + lte?: number + } + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_forwarding_request[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/forwarding/requests` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + created: p["created"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postForwardingRequests( + p: { + requestBody: { + config: string + expand?: string[] + payment_method: string + replacements: ( + | "card_cvc" + | "card_expiry" + | "card_number" + | "cardholder_name" + )[] + request?: { + body?: string + headers?: { + name: string + value: string + }[] + } + url: string + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_forwarding_request> | Res + > + > { + const url = this.basePath + `/v1/forwarding/requests` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getForwardingRequestsId( + p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_forwarding_request> | Res + > + > { + const url = this.basePath + `/v1/forwarding/requests/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async getIdentityVerificationReports( p: { + clientReferenceId?: string created?: | { gt?: number @@ -8876,6 +10087,7 @@ export class ApiClient extends AbstractFetchClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + client_reference_id: p["clientReferenceId"], created: p["created"], ending_before: p["endingBefore"], expand: p["expand"], @@ -8923,6 +10135,7 @@ export class ApiClient extends AbstractFetchClient { async getIdentityVerificationSessions( p: { + clientReferenceId?: string created?: | { gt?: number @@ -8959,6 +10172,7 @@ export class ApiClient extends AbstractFetchClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + client_reference_id: p["clientReferenceId"], created: p["created"], ending_before: p["endingBefore"], expand: p["expand"], @@ -8977,7 +10191,8 @@ export class ApiClient extends AbstractFetchClient { async postIdentityVerificationSessions( p: { - requestBody: { + requestBody?: { + client_reference_id?: string expand?: string[] metadata?: { [key: string]: string | undefined @@ -8991,11 +10206,26 @@ export class ApiClient extends AbstractFetchClient { require_matching_selfie?: boolean } | "" + email?: + | { + require_verification?: boolean + } + | "" + phone?: + | { + require_verification?: boolean + } + | "" + } + provided_details?: { + email?: string + phone?: string } return_url?: string - type: "document" | "id_number" + type?: "document" | "id_number" + verification_flow?: string } - }, + } = {}, timeout?: number, opts?: RequestInit, ): Promise< @@ -9061,6 +10291,20 @@ export class ApiClient extends AbstractFetchClient { require_matching_selfie?: boolean } | "" + email?: + | { + require_verification?: boolean + } + | "" + phone?: + | { + require_verification?: boolean + } + | "" + } + provided_details?: { + email?: string + phone?: string } type?: "document" | "id_number" } @@ -9214,6 +10458,7 @@ export class ApiClient extends AbstractFetchClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -9323,6 +10568,7 @@ export class ApiClient extends AbstractFetchClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -9446,6 +10692,10 @@ export class ApiClient extends AbstractFetchClient { auto_advance?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" currency?: string @@ -9465,6 +10715,7 @@ export class ApiClient extends AbstractFetchClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" due_date?: number @@ -9475,11 +10726,16 @@ export class ApiClient extends AbstractFetchClient { action: "revision" invoice: string } + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined } | "" + number?: string on_behalf_of?: string payment_settings?: { default_mandate?: string | "" @@ -9512,7 +10768,7 @@ export class ApiClient extends AbstractFetchClient { } | "" } - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -9527,6 +10783,7 @@ export class ApiClient extends AbstractFetchClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -9536,7 +10793,7 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -9557,12 +10814,14 @@ export class ApiClient extends AbstractFetchClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -9573,21 +10832,13 @@ export class ApiClient extends AbstractFetchClient { )[] | "" } - pending_invoice_items_behavior?: - | "exclude" - | "include" - | "include_and_require" + pending_invoice_items_behavior?: "exclude" | "include" rendering?: { amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" pdf?: { page_size?: "a4" | "auto" | "letter" } } - rendering_options?: - | { - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" - } - | "" shipping_cost?: { shipping_rate?: string shipping_rate_data?: { @@ -9709,246 +10960,10 @@ export class ApiClient extends AbstractFetchClient { p: { automaticTax?: { enabled: boolean - } - coupon?: string - currency?: string - customer?: string - customerDetails?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | "" - shipping?: - | { - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - | "" - tax?: { - ip_address?: string | "" - } - tax_exempt?: "" | "exempt" | "none" | "reverse" - tax_ids?: { - type: - | "ad_nrt" - | "ae_trn" - | "ar_cuit" - | "au_abn" - | "au_arn" - | "bg_uic" - | "bo_tin" - | "br_cnpj" - | "br_cpf" - | "ca_bn" - | "ca_gst_hst" - | "ca_pst_bc" - | "ca_pst_mb" - | "ca_pst_sk" - | "ca_qst" - | "ch_vat" - | "cl_tin" - | "cn_tin" - | "co_nit" - | "cr_tin" - | "do_rcn" - | "ec_ruc" - | "eg_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" - | "jp_trn" - | "ke_pin" - | "kr_brn" - | "li_uid" - | "mx_rfc" - | "my_frp" - | "my_itn" - | "my_sst" - | "no_vat" - | "nz_gst" - | "pe_ruc" - | "ph_tin" - | "ro_tin" - | "rs_pib" - | "ru_inn" - | "ru_kpp" - | "sa_vat" - | "sg_gst" - | "sg_uen" - | "si_tin" - | "sv_nit" - | "th_vat" - | "tr_tin" - | "tw_vat" - | "ua_vat" - | "us_ein" - | "uy_ruc" - | "ve_rif" - | "vn_tin" - | "za_vat" - value: string - }[] - } - discounts?: - | { - coupon?: string - discount?: string - }[] - | "" - expand?: string[] - invoiceItems?: { - amount?: number - currency?: string - description?: string - discountable?: boolean - discounts?: - | { - coupon?: string - discount?: string - }[] - | "" - invoiceitem?: string - metadata?: - | { - [key: string]: string | undefined - } - | "" - period?: { - end: number - start: number - } - price?: string - price_data?: { - currency: string - product: string - tax_behavior?: "exclusive" | "inclusive" | "unspecified" - unit_amount?: number - unit_amount_decimal?: string - } - quantity?: number - tax_behavior?: "exclusive" | "inclusive" | "unspecified" - tax_code?: string | "" - tax_rates?: string[] | "" - unit_amount?: number - unit_amount_decimal?: string - }[] - schedule?: string - subscription?: string - subscriptionBillingCycleAnchor?: "now" | "unchanged" | number - subscriptionCancelAt?: number | "" - subscriptionCancelAtPeriodEnd?: boolean - subscriptionCancelNow?: boolean - subscriptionDefaultTaxRates?: string[] | "" - subscriptionItems?: { - billing_thresholds?: - | { - usage_gte: number - } - | "" - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: - | { - [key: string]: string | undefined - } - | "" - price?: string - price_data?: { - currency: string - product: string - recurring: { - interval: "day" | "month" | "week" | "year" - interval_count?: number - } - tax_behavior?: "exclusive" | "inclusive" | "unspecified" - unit_amount?: number - unit_amount_decimal?: string + liability?: { + account?: string + type: "account" | "self" } - quantity?: number - tax_rates?: string[] | "" - }[] - subscriptionProrationBehavior?: - | "always_invoice" - | "create_prorations" - | "none" - subscriptionProrationDate?: number - subscriptionResumeAt?: "now" - subscriptionStartDate?: number - subscriptionTrialEnd?: "now" | number - subscriptionTrialFromPlan?: boolean - requestBody?: EmptyObject - } = {}, - timeout?: number, - opts?: RequestInit, - ): Promise< - TypedFetchResponse | Res> - > { - const url = this.basePath + `/v1/invoices/upcoming` - const headers = this._headers({ - "Content-Type": "application/x-www-form-urlencoded", - }) - const query = this._query({ - automatic_tax: p["automaticTax"], - coupon: p["coupon"], - currency: p["currency"], - customer: p["customer"], - customer_details: p["customerDetails"], - discounts: p["discounts"], - expand: p["expand"], - invoice_items: p["invoiceItems"], - schedule: p["schedule"], - subscription: p["subscription"], - subscription_billing_cycle_anchor: p["subscriptionBillingCycleAnchor"], - subscription_cancel_at: p["subscriptionCancelAt"], - subscription_cancel_at_period_end: p["subscriptionCancelAtPeriodEnd"], - subscription_cancel_now: p["subscriptionCancelNow"], - subscription_default_tax_rates: p["subscriptionDefaultTaxRates"], - subscription_items: p["subscriptionItems"], - subscription_proration_behavior: p["subscriptionProrationBehavior"], - subscription_proration_date: p["subscriptionProrationDate"], - subscription_resume_at: p["subscriptionResumeAt"], - subscription_start_date: p["subscriptionStartDate"], - subscription_trial_end: p["subscriptionTrialEnd"], - subscription_trial_from_plan: p["subscriptionTrialFromPlan"], - }) - const body = JSON.stringify(p.requestBody) - - return this._fetch( - url + query, - { method: "GET", headers, body, ...(opts ?? {}) }, - timeout, - ) - } - - async getInvoicesUpcomingLines( - p: { - automaticTax?: { - enabled: boolean } coupon?: string currency?: string @@ -10029,6 +11044,7 @@ export class ApiClient extends AbstractFetchClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -10057,6 +11073,268 @@ export class ApiClient extends AbstractFetchClient { | { coupon?: string discount?: string + promotion_code?: string + }[] + | "" + expand?: string[] + invoiceItems?: { + amount?: number + currency?: string + description?: string + discountable?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" + invoiceitem?: string + metadata?: + | { + [key: string]: string | undefined + } + | "" + period?: { + end: number + start: number + } + price?: string + price_data?: { + currency: string + product: string + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + unit_amount?: number + unit_amount_decimal?: string + } + quantity?: number + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + tax_code?: string | "" + tax_rates?: string[] | "" + unit_amount?: number + unit_amount_decimal?: string + }[] + issuer?: { + account?: string + type: "account" | "self" + } + onBehalfOf?: string | "" + schedule?: string + subscription?: string + subscriptionBillingCycleAnchor?: "now" | "unchanged" | number + subscriptionCancelAt?: number | "" + subscriptionCancelAtPeriodEnd?: boolean + subscriptionCancelNow?: boolean + subscriptionDefaultTaxRates?: string[] | "" + subscriptionItems?: { + billing_thresholds?: + | { + usage_gte: number + } + | "" + clear_usage?: boolean + deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" + id?: string + metadata?: + | { + [key: string]: string | undefined + } + | "" + price?: string + price_data?: { + currency: string + product: string + recurring: { + interval: "day" | "month" | "week" | "year" + interval_count?: number + } + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + unit_amount?: number + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | "" + }[] + subscriptionProrationBehavior?: + | "always_invoice" + | "create_prorations" + | "none" + subscriptionProrationDate?: number + subscriptionResumeAt?: "now" + subscriptionStartDate?: number + subscriptionTrialEnd?: "now" | number + subscriptionTrialFromPlan?: boolean + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/invoices/upcoming` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + automatic_tax: p["automaticTax"], + coupon: p["coupon"], + currency: p["currency"], + customer: p["customer"], + customer_details: p["customerDetails"], + discounts: p["discounts"], + expand: p["expand"], + invoice_items: p["invoiceItems"], + issuer: p["issuer"], + on_behalf_of: p["onBehalfOf"], + schedule: p["schedule"], + subscription: p["subscription"], + subscription_billing_cycle_anchor: p["subscriptionBillingCycleAnchor"], + subscription_cancel_at: p["subscriptionCancelAt"], + subscription_cancel_at_period_end: p["subscriptionCancelAtPeriodEnd"], + subscription_cancel_now: p["subscriptionCancelNow"], + subscription_default_tax_rates: p["subscriptionDefaultTaxRates"], + subscription_items: p["subscriptionItems"], + subscription_proration_behavior: p["subscriptionProrationBehavior"], + subscription_proration_date: p["subscriptionProrationDate"], + subscription_resume_at: p["subscriptionResumeAt"], + subscription_start_date: p["subscriptionStartDate"], + subscription_trial_end: p["subscriptionTrialEnd"], + subscription_trial_from_plan: p["subscriptionTrialFromPlan"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getInvoicesUpcomingLines( + p: { + automaticTax?: { + enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } + } + coupon?: string + currency?: string + customer?: string + customerDetails?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | "" + shipping?: + | { + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + | "" + tax?: { + ip_address?: string | "" + } + tax_exempt?: "" | "exempt" | "none" | "reverse" + tax_ids?: { + type: + | "ad_nrt" + | "ae_trn" + | "ar_cuit" + | "au_abn" + | "au_arn" + | "bg_uic" + | "bo_tin" + | "br_cnpj" + | "br_cpf" + | "ca_bn" + | "ca_gst_hst" + | "ca_pst_bc" + | "ca_pst_mb" + | "ca_pst_sk" + | "ca_qst" + | "ch_vat" + | "cl_tin" + | "cn_tin" + | "co_nit" + | "cr_tin" + | "do_rcn" + | "ec_ruc" + | "eg_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" + | "jp_trn" + | "ke_pin" + | "kr_brn" + | "li_uid" + | "mx_rfc" + | "my_frp" + | "my_itn" + | "my_sst" + | "no_vat" + | "no_voec" + | "nz_gst" + | "pe_ruc" + | "ph_tin" + | "ro_tin" + | "rs_pib" + | "ru_inn" + | "ru_kpp" + | "sa_vat" + | "sg_gst" + | "sg_uen" + | "si_tin" + | "sv_nit" + | "th_vat" + | "tr_tin" + | "tw_vat" + | "ua_vat" + | "us_ein" + | "uy_ruc" + | "ve_rif" + | "vn_tin" + | "za_vat" + value: string + }[] + } + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string }[] | "" endingBefore?: string @@ -10070,6 +11348,7 @@ export class ApiClient extends AbstractFetchClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" invoiceitem?: string @@ -10097,7 +11376,12 @@ export class ApiClient extends AbstractFetchClient { unit_amount?: number unit_amount_decimal?: string }[] + issuer?: { + account?: string + type: "account" | "self" + } limit?: number + onBehalfOf?: string | "" schedule?: string startingAfter?: string subscription?: string @@ -10114,6 +11398,13 @@ export class ApiClient extends AbstractFetchClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -10176,7 +11467,9 @@ export class ApiClient extends AbstractFetchClient { ending_before: p["endingBefore"], expand: p["expand"], invoice_items: p["invoiceItems"], + issuer: p["issuer"], limit: p["limit"], + on_behalf_of: p["onBehalfOf"], schedule: p["schedule"], starting_after: p["startingAfter"], subscription: p["subscription"], @@ -10259,6 +11552,10 @@ export class ApiClient extends AbstractFetchClient { auto_advance?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" custom_fields?: @@ -10276,17 +11573,23 @@ export class ApiClient extends AbstractFetchClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" due_date?: number effective_at?: number | "" expand?: string[] footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined } | "" + number?: string | "" on_behalf_of?: string | "" payment_settings?: { default_mandate?: string | "" @@ -10319,7 +11622,7 @@ export class ApiClient extends AbstractFetchClient { } | "" } - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -10334,6 +11637,7 @@ export class ApiClient extends AbstractFetchClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -10343,7 +11647,7 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -10364,12 +11668,14 @@ export class ApiClient extends AbstractFetchClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -10386,11 +11692,6 @@ export class ApiClient extends AbstractFetchClient { page_size?: "a4" | "auto" | "letter" } } - rendering_options?: - | { - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" - } - | "" shipping_cost?: | { shipping_rate?: string @@ -10541,6 +11842,99 @@ export class ApiClient extends AbstractFetchClient { ) } + async postInvoicesInvoiceLinesLineItemId( + p: { + invoice: string + lineItemId: string + requestBody?: { + amount?: number + description?: string + discountable?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" + expand?: string[] + metadata?: + | { + [key: string]: string | undefined + } + | "" + period?: { + end: number + start: number + } + price?: string + price_data?: { + currency: string + product?: string + product_data?: { + description?: string + images?: string[] + metadata?: { + [key: string]: string | undefined + } + name: string + tax_code?: string + } + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + unit_amount?: number + unit_amount_decimal?: string + } + quantity?: number + tax_amounts?: + | { + amount: number + tax_rate_data: { + country?: string + description?: string + display_name: string + inclusive: boolean + jurisdiction?: string + percentage: number + state?: string + tax_type?: + | "amusement_tax" + | "communications_tax" + | "gst" + | "hst" + | "igst" + | "jct" + | "lease_tax" + | "pst" + | "qst" + | "rst" + | "sales_tax" + | "vat" + } + taxable_amount: number + }[] + | "" + tax_rates?: string[] | "" + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = + this.basePath + `/v1/invoices/${p["invoice"]}/lines/${p["lineItemId"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async postInvoicesInvoiceMarkUncollectible( p: { invoice: string @@ -11238,6 +12632,7 @@ export class ApiClient extends AbstractFetchClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -11535,6 +12930,7 @@ export class ApiClient extends AbstractFetchClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -12239,6 +13635,7 @@ export class ApiClient extends AbstractFetchClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -12536,6 +13933,7 @@ export class ApiClient extends AbstractFetchClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -12885,6 +14283,7 @@ export class ApiClient extends AbstractFetchClient { expand?: string[] last4?: string limit?: number + personalizationDesign?: string startingAfter?: string status?: "active" | "canceled" | "inactive" type?: "physical" | "virtual" @@ -12919,6 +14318,7 @@ export class ApiClient extends AbstractFetchClient { expand: p["expand"], last4: p["last4"], limit: p["limit"], + personalization_design: p["personalizationDesign"], starting_after: p["startingAfter"], status: p["status"], type: p["type"], @@ -12942,8 +14342,13 @@ export class ApiClient extends AbstractFetchClient { metadata?: { [key: string]: string | undefined } + personalization_design?: string + pin?: { + encrypted_number?: string + } replacement_for?: string replacement_reason?: "damaged" | "expired" | "lost" | "stolen" + second_line?: string | "" shipping?: { address: { city: string @@ -13260,6 +14665,7 @@ export class ApiClient extends AbstractFetchClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -13557,6 +14963,7 @@ export class ApiClient extends AbstractFetchClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -13923,6 +15330,7 @@ export class ApiClient extends AbstractFetchClient { [key: string]: string | undefined } | "" + personalization_design?: string pin?: { encrypted_number?: string } @@ -14224,6 +15632,7 @@ export class ApiClient extends AbstractFetchClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -14521,6 +15930,7 @@ export class ApiClient extends AbstractFetchClient { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -15176,6 +16586,253 @@ export class ApiClient extends AbstractFetchClient { ) } + async getIssuingPersonalizationDesigns( + p: { + endingBefore?: string + expand?: string[] + limit?: number + lookupKeys?: string[] + preferences?: { + is_default?: boolean + is_platform_default?: boolean + } + startingAfter?: string + status?: "active" | "inactive" | "rejected" | "review" + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_issuing_personalization_design[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/issuing/personalization_designs` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + lookup_keys: p["lookupKeys"], + preferences: p["preferences"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postIssuingPersonalizationDesigns( + p: { + requestBody: { + card_logo?: string + carrier_text?: { + footer_body?: string | "" + footer_title?: string | "" + header_body?: string | "" + header_title?: string | "" + } + expand?: string[] + lookup_key?: string + metadata?: { + [key: string]: string | undefined + } + name?: string + physical_bundle: string + preferences?: { + is_default: boolean + } + transfer_lookup_key?: boolean + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_issuing_personalization_design> | Res + > + > { + const url = this.basePath + `/v1/issuing/personalization_designs` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getIssuingPersonalizationDesignsPersonalizationDesign( + p: { + expand?: string[] + personalizationDesign: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_issuing_personalization_design> | Res + > + > { + const url = + this.basePath + + `/v1/issuing/personalization_designs/${p["personalizationDesign"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postIssuingPersonalizationDesignsPersonalizationDesign( + p: { + personalizationDesign: string + requestBody?: { + card_logo?: string | "" + carrier_text?: + | { + footer_body?: string | "" + footer_title?: string | "" + header_body?: string | "" + header_title?: string | "" + } + | "" + expand?: string[] + lookup_key?: string | "" + metadata?: { + [key: string]: string | undefined + } + name?: string | "" + physical_bundle?: string + preferences?: { + is_default: boolean + } + transfer_lookup_key?: boolean + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_issuing_personalization_design> | Res + > + > { + const url = + this.basePath + + `/v1/issuing/personalization_designs/${p["personalizationDesign"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getIssuingPhysicalBundles( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "inactive" | "review" + type?: "custom" | "standard" + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_issuing_physical_bundle[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/issuing/physical_bundles` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + type: p["type"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getIssuingPhysicalBundlesPhysicalBundle( + p: { + expand?: string[] + physicalBundle: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_issuing_physical_bundle> | Res + > + > { + const url = + this.basePath + `/v1/issuing/physical_bundles/${p["physicalBundle"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async getIssuingSettlements( p: { created?: @@ -15285,6 +16942,113 @@ export class ApiClient extends AbstractFetchClient { ) } + async getIssuingTokens( + p: { + card: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "deleted" | "requested" | "suspended" + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_issuing_token[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/issuing/tokens` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + card: p["card"], + created: p["created"], + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getIssuingTokensToken( + p: { + expand?: string[] + token: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/issuing/tokens/${p["token"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postIssuingTokensToken( + p: { + token: string + requestBody: { + expand?: string[] + status: "active" | "deleted" | "suspended" + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/issuing/tokens/${p["token"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async getIssuingTransactions( p: { card?: string @@ -15420,7 +17184,7 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: ("balances" | "ownership")[] + prefetch?: ("balances" | "ownership" | "transactions")[] return_url?: string } }, @@ -15626,7 +17390,7 @@ export class ApiClient extends AbstractFetchClient { account: string requestBody: { expand?: string[] - features: ("balance" | "ownership")[] + features: ("balance" | "ownership" | "transactions")[] } }, timeout?: number, @@ -15740,6 +17504,7 @@ export class ApiClient extends AbstractFetchClient { capture_method?: "automatic" | "automatic_async" | "manual" confirm?: boolean confirmation_method?: "automatic" | "manual" + confirmation_token?: string currency: string customer?: string description?: string @@ -15873,6 +17638,7 @@ export class ApiClient extends AbstractFetchClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -15894,6 +17660,7 @@ export class ApiClient extends AbstractFetchClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -15921,6 +17688,7 @@ export class ApiClient extends AbstractFetchClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -15930,12 +17698,14 @@ export class ApiClient extends AbstractFetchClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -15956,14 +17726,17 @@ export class ApiClient extends AbstractFetchClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -16028,6 +17801,7 @@ export class ApiClient extends AbstractFetchClient { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -16073,10 +17847,36 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: + | "01" + | "02" + | "05" + | "06" + | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -16209,6 +18009,12 @@ export class ApiClient extends AbstractFetchClient { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -16268,6 +18074,11 @@ export class ApiClient extends AbstractFetchClient { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -16288,6 +18099,12 @@ export class ApiClient extends AbstractFetchClient { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -16297,9 +18114,12 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -16569,6 +18389,7 @@ export class ApiClient extends AbstractFetchClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -16590,6 +18411,7 @@ export class ApiClient extends AbstractFetchClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -16617,6 +18439,7 @@ export class ApiClient extends AbstractFetchClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -16626,12 +18449,14 @@ export class ApiClient extends AbstractFetchClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -16652,14 +18477,17 @@ export class ApiClient extends AbstractFetchClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -16724,6 +18552,7 @@ export class ApiClient extends AbstractFetchClient { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -16769,10 +18598,36 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: + | "01" + | "02" + | "05" + | "06" + | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -16905,6 +18760,12 @@ export class ApiClient extends AbstractFetchClient { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -16964,6 +18825,11 @@ export class ApiClient extends AbstractFetchClient { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -16984,6 +18850,12 @@ export class ApiClient extends AbstractFetchClient { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -16993,9 +18865,12 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -17128,6 +19003,7 @@ export class ApiClient extends AbstractFetchClient { amount_to_capture?: number application_fee_amount?: number expand?: string[] + final_capture?: boolean metadata?: | { [key: string]: string | undefined @@ -17164,6 +19040,7 @@ export class ApiClient extends AbstractFetchClient { requestBody?: { capture_method?: "automatic" | "automatic_async" | "manual" client_secret?: string + confirmation_token?: string error_on_requires_action?: boolean expand?: string[] mandate?: string @@ -17298,6 +19175,7 @@ export class ApiClient extends AbstractFetchClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -17319,6 +19197,7 @@ export class ApiClient extends AbstractFetchClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -17346,6 +19225,7 @@ export class ApiClient extends AbstractFetchClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -17355,12 +19235,14 @@ export class ApiClient extends AbstractFetchClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -17381,14 +19263,17 @@ export class ApiClient extends AbstractFetchClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -17453,6 +19338,7 @@ export class ApiClient extends AbstractFetchClient { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -17498,10 +19384,36 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: + | "01" + | "02" + | "05" + | "06" + | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -17634,6 +19546,12 @@ export class ApiClient extends AbstractFetchClient { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -17693,6 +19611,11 @@ export class ApiClient extends AbstractFetchClient { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -17713,6 +19636,12 @@ export class ApiClient extends AbstractFetchClient { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -17722,9 +19651,12 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -17918,9 +19850,16 @@ export class ApiClient extends AbstractFetchClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" consent_collection?: { + payment_method_reuse_agreement?: { + position: "auto" | "hidden" + } promotions?: "auto" | "none" terms_of_service?: "none" | "required" } @@ -17949,6 +19888,11 @@ export class ApiClient extends AbstractFetchClient { type: "dropdown" | "numeric" | "text" }[] custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -17967,6 +19911,7 @@ export class ApiClient extends AbstractFetchClient { } customer_creation?: "always" | "if_required" expand?: string[] + inactive_message?: string invoice_creation?: { enabled: boolean invoice_data?: { @@ -17979,6 +19924,10 @@ export class ApiClient extends AbstractFetchClient { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined @@ -18009,7 +19958,14 @@ export class ApiClient extends AbstractFetchClient { on_behalf_of?: string payment_intent_data?: { capture_method?: "automatic" | "automatic_async" | "manual" + description?: string + metadata?: { + [key: string]: string | undefined + } setup_future_usage?: "off_session" | "on_session" + statement_descriptor?: string + statement_descriptor_suffix?: string + transfer_group?: string } payment_method_collection?: "always" | "if_required" payment_method_types?: ( @@ -18039,12 +19995,18 @@ export class ApiClient extends AbstractFetchClient { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] phone_number_collection?: { enabled: boolean } + restrictions?: { + completed_sessions: { + limit: number + } + } shipping_address_collection?: { allowed_countries: ( | "AC" @@ -18292,7 +20254,21 @@ export class ApiClient extends AbstractFetchClient { submit_type?: "auto" | "book" | "donate" | "pay" subscription_data?: { description?: string + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number + trial_settings?: { + end_behavior: { + missing_payment_method: "cancel" | "create_invoice" | "pause" + } + } } tax_id_collection?: { enabled: boolean @@ -18363,6 +20339,10 @@ export class ApiClient extends AbstractFetchClient { allow_promotion_codes?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" custom_fields?: @@ -18391,6 +20371,11 @@ export class ApiClient extends AbstractFetchClient { }[] | "" custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -18409,6 +20394,7 @@ export class ApiClient extends AbstractFetchClient { } customer_creation?: "always" | "if_required" expand?: string[] + inactive_message?: string | "" invoice_creation?: { enabled: boolean invoice_data?: { @@ -18421,6 +20407,10 @@ export class ApiClient extends AbstractFetchClient { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined @@ -18448,6 +20438,17 @@ export class ApiClient extends AbstractFetchClient { metadata?: { [key: string]: string | undefined } + payment_intent_data?: { + description?: string | "" + metadata?: + | { + [key: string]: string | undefined + } + | "" + statement_descriptor?: string | "" + statement_descriptor_suffix?: string | "" + transfer_group?: string | "" + } payment_method_collection?: "always" | "if_required" payment_method_types?: | ( @@ -18477,10 +20478,18 @@ export class ApiClient extends AbstractFetchClient { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] | "" + restrictions?: + | { + completed_sessions: { + limit: number + } + } + | "" shipping_address_collection?: | { allowed_countries: ( @@ -18724,6 +20733,26 @@ export class ApiClient extends AbstractFetchClient { )[] } | "" + subscription_data?: { + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } + metadata?: + | { + [key: string]: string | undefined + } + | "" + trial_settings?: + | { + end_behavior: { + missing_payment_method: "cancel" | "create_invoice" | "pause" + } + } + | "" + } } }, timeout?: number, @@ -18901,6 +20930,11 @@ export class ApiClient extends AbstractFetchClient { preference?: "none" | "off" | "on" } } + customer_balance?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } eps?: { display_preference?: { preference?: "none" | "off" | "on" @@ -18979,6 +21013,11 @@ export class ApiClient extends AbstractFetchClient { preference?: "none" | "off" | "on" } } + revolut_pay?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } sepa_debit?: { display_preference?: { preference?: "none" | "off" | "on" @@ -18999,6 +21038,11 @@ export class ApiClient extends AbstractFetchClient { preference?: "none" | "off" | "on" } } + zip?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } } } = {}, timeout?: number, @@ -19124,6 +21168,11 @@ export class ApiClient extends AbstractFetchClient { preference?: "none" | "off" | "on" } } + customer_balance?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } eps?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19201,6 +21250,11 @@ export class ApiClient extends AbstractFetchClient { preference?: "none" | "off" | "on" } } + revolut_pay?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } sepa_debit?: { display_preference?: { preference?: "none" | "off" | "on" @@ -19221,6 +21275,11 @@ export class ApiClient extends AbstractFetchClient { preference?: "none" | "off" | "on" } } + zip?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } } }, timeout?: number, @@ -19433,14 +21492,17 @@ export class ApiClient extends AbstractFetchClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -19527,6 +21589,9 @@ export class ApiClient extends AbstractFetchClient { cvc?: string exp_month: number exp_year: number + networks?: { + preferred?: "cartes_bancaires" | "mastercard" | "visa" + } number: string } | { @@ -19604,6 +21669,7 @@ export class ApiClient extends AbstractFetchClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -19625,6 +21691,7 @@ export class ApiClient extends AbstractFetchClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -19652,6 +21719,7 @@ export class ApiClient extends AbstractFetchClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } payment_method?: string @@ -19662,12 +21730,14 @@ export class ApiClient extends AbstractFetchClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type?: | "acss_debit" | "affirm" @@ -19689,14 +21759,17 @@ export class ApiClient extends AbstractFetchClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -19776,6 +21849,9 @@ export class ApiClient extends AbstractFetchClient { card?: { exp_month?: number exp_year?: number + networks?: { + preferred?: "" | "cartes_bancaires" | "mastercard" | "visa" + } } expand?: string[] link?: EmptyObject @@ -19786,6 +21862,7 @@ export class ApiClient extends AbstractFetchClient { | "" us_bank_account?: { account_holder_type?: "company" | "individual" + account_type?: "checking" | "savings" } } }, @@ -20141,6 +22218,7 @@ export class ApiClient extends AbstractFetchClient { [key: string]: string | undefined } | "" + meter?: string nickname?: string product?: | { @@ -20284,6 +22362,7 @@ export class ApiClient extends AbstractFetchClient { product?: string recurring?: { interval?: "day" | "month" | "week" | "year" + meter?: string usage_type?: "licensed" | "metered" } startingAfter?: string @@ -20388,6 +22467,7 @@ export class ApiClient extends AbstractFetchClient { aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" interval: "day" | "month" | "week" | "year" interval_count?: number + meter?: string usage_type?: "licensed" | "metered" } tax_behavior?: "exclusive" | "inclusive" | "unspecified" @@ -21059,6 +23139,10 @@ export class ApiClient extends AbstractFetchClient { application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" customer?: string @@ -21068,6 +23152,7 @@ export class ApiClient extends AbstractFetchClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -21080,8 +23165,19 @@ export class ApiClient extends AbstractFetchClient { header?: string | "" invoice_settings?: { days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } line_items?: { + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" price?: string price_data?: { currency: string @@ -21104,6 +23200,9 @@ export class ApiClient extends AbstractFetchClient { subscription_data?: { description?: string effective_date?: "current_period_end" | number | "" + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number | "" } test_clock?: string @@ -21163,6 +23262,10 @@ export class ApiClient extends AbstractFetchClient { application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" customer?: string @@ -21172,6 +23275,7 @@ export class ApiClient extends AbstractFetchClient { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -21180,8 +23284,19 @@ export class ApiClient extends AbstractFetchClient { header?: string | "" invoice_settings?: { days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } line_items?: { + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string price?: string price_data?: { @@ -21205,6 +23320,9 @@ export class ApiClient extends AbstractFetchClient { subscription_data?: { description?: string | "" effective_date?: "current_period_end" | number | "" + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number | "" } transfer_data?: @@ -21417,6 +23535,14 @@ export class ApiClient extends AbstractFetchClient { async getRadarEarlyFraudWarnings( p: { charge?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number endingBefore?: string expand?: string[] limit?: number @@ -21446,6 +23572,7 @@ export class ApiClient extends AbstractFetchClient { }) const query = this._query({ charge: p["charge"], + created: p["created"], ending_before: p["endingBefore"], expand: p["expand"], limit: p["limit"], @@ -22045,6 +24172,8 @@ export class ApiClient extends AbstractFetchClient { | "anticipation_repayment" | "charge" | "charge_failure" + | "climate_order_purchase" + | "climate_order_refund" | "connect_collection_transfer" | "connect_reserved_funds" | "contribution" @@ -22060,7 +24189,6 @@ export class ApiClient extends AbstractFetchClient { | "issuing_dispute" | "issuing_transaction" | "network_cost" - | "obligation" | "other_adjustment" | "partial_capture_reversal" | "payout" @@ -22075,6 +24203,7 @@ export class ApiClient extends AbstractFetchClient { | "topup_reversal" | "transfer" | "transfer_reversal" + | "unreconciled_customer_funds" timezone?: | "Africa/Abidjan" | "Africa/Accra" @@ -23010,6 +25139,7 @@ export class ApiClient extends AbstractFetchClient { enabled: boolean } confirm?: boolean + confirmation_token?: string customer?: string description?: string expand?: string[] @@ -23140,6 +25270,7 @@ export class ApiClient extends AbstractFetchClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23161,6 +25292,7 @@ export class ApiClient extends AbstractFetchClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -23188,6 +25320,7 @@ export class ApiClient extends AbstractFetchClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -23197,12 +25330,14 @@ export class ApiClient extends AbstractFetchClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -23223,14 +25358,17 @@ export class ApiClient extends AbstractFetchClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -23281,8 +25419,24 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -23298,9 +25452,12 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -23487,6 +25644,7 @@ export class ApiClient extends AbstractFetchClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23508,6 +25666,7 @@ export class ApiClient extends AbstractFetchClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -23535,6 +25694,7 @@ export class ApiClient extends AbstractFetchClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -23544,12 +25704,14 @@ export class ApiClient extends AbstractFetchClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -23570,14 +25732,17 @@ export class ApiClient extends AbstractFetchClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -23628,8 +25793,24 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -23645,9 +25826,12 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -23709,6 +25893,7 @@ export class ApiClient extends AbstractFetchClient { intent: string requestBody?: { client_secret?: string + confirmation_token?: string expand?: string[] mandate_data?: | { @@ -23840,6 +26025,7 @@ export class ApiClient extends AbstractFetchClient { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23861,6 +26047,7 @@ export class ApiClient extends AbstractFetchClient { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -23888,6 +26075,7 @@ export class ApiClient extends AbstractFetchClient { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -23897,12 +26085,14 @@ export class ApiClient extends AbstractFetchClient { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -23923,14 +26113,17 @@ export class ApiClient extends AbstractFetchClient { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -23981,8 +26174,24 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -23998,9 +26207,12 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -24716,6 +26928,13 @@ export class ApiClient extends AbstractFetchClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] metadata?: { [key: string]: string | undefined @@ -24825,6 +27044,13 @@ export class ApiClient extends AbstractFetchClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] metadata?: | { @@ -25040,6 +27266,10 @@ export class ApiClient extends AbstractFetchClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25052,7 +27282,12 @@ export class ApiClient extends AbstractFetchClient { default_payment_method?: string description?: string | "" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } on_behalf_of?: string | "" transfer_data?: @@ -25072,6 +27307,11 @@ export class ApiClient extends AbstractFetchClient { | "" phases?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25086,6 +27326,10 @@ export class ApiClient extends AbstractFetchClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25100,9 +27344,21 @@ export class ApiClient extends AbstractFetchClient { default_payment_method?: string default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" end_date?: number invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } items: { billing_thresholds?: @@ -25110,6 +27366,13 @@ export class ApiClient extends AbstractFetchClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -25199,6 +27462,10 @@ export class ApiClient extends AbstractFetchClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25211,7 +27478,12 @@ export class ApiClient extends AbstractFetchClient { default_payment_method?: string description?: string | "" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } on_behalf_of?: string | "" transfer_data?: @@ -25230,6 +27502,11 @@ export class ApiClient extends AbstractFetchClient { | "" phases?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25244,6 +27521,10 @@ export class ApiClient extends AbstractFetchClient { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -25257,9 +27538,21 @@ export class ApiClient extends AbstractFetchClient { default_payment_method?: string default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" end_date?: number | "now" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } items: { billing_thresholds?: @@ -25267,6 +27560,13 @@ export class ApiClient extends AbstractFetchClient { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -25479,6 +27779,11 @@ export class ApiClient extends AbstractFetchClient { p: { requestBody: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25490,12 +27795,23 @@ export class ApiClient extends AbstractFetchClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } backdate_start_date?: number billing_cycle_anchor?: number + billing_cycle_anchor_config?: { + day_of_month: number + hour?: number + minute?: number + month?: number + second?: number + } billing_thresholds?: | { amount_gte?: number @@ -25513,13 +27829,34 @@ export class ApiClient extends AbstractFetchClient { default_source?: string default_tax_rates?: string[] | "" description?: string + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -25587,7 +27924,7 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -25602,6 +27939,7 @@ export class ApiClient extends AbstractFetchClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -25611,7 +27949,7 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -25632,12 +27970,14 @@ export class ApiClient extends AbstractFetchClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -25806,6 +28146,11 @@ export class ApiClient extends AbstractFetchClient { subscriptionExposedId: string requestBody?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -25817,9 +28162,13 @@ export class ApiClient extends AbstractFetchClient { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "now" | "unchanged" billing_thresholds?: @@ -25850,7 +28199,21 @@ export class ApiClient extends AbstractFetchClient { default_source?: string | "" default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { @@ -25859,6 +28222,13 @@ export class ApiClient extends AbstractFetchClient { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -25935,7 +28305,7 @@ export class ApiClient extends AbstractFetchClient { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -25950,6 +28320,7 @@ export class ApiClient extends AbstractFetchClient { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -25959,7 +28330,7 @@ export class ApiClient extends AbstractFetchClient { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: | "automatic" @@ -25980,12 +28351,14 @@ export class ApiClient extends AbstractFetchClient { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -26155,6 +28528,7 @@ export class ApiClient extends AbstractFetchClient { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -26261,6 +28635,374 @@ export class ApiClient extends AbstractFetchClient { ) } + async getTaxRegistrations( + p: { + endingBefore?: string + expand?: string[] + limit?: number + startingAfter?: string + status?: "active" | "all" | "expired" | "scheduled" + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_tax_registration[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/tax/registrations` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + starting_after: p["startingAfter"], + status: p["status"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postTaxRegistrations( + p: { + requestBody: { + active_from: "now" | number + country: string + country_options: { + ae?: { + type: "standard" + } + at?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + au?: { + type: "standard" + } + be?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + bg?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ca?: { + province_standard?: { + province: string + } + type: "province_standard" | "simplified" | "standard" + } + ch?: { + type: "standard" + } + cl?: { + type: "simplified" + } + co?: { + type: "simplified" + } + cy?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + cz?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + de?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + dk?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ee?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + es?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + fi?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + fr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + gb?: { + type: "standard" + } + gr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + hr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + hu?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + id?: { + type: "simplified" + } + ie?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + is?: { + type: "standard" + } + it?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + jp?: { + type: "standard" + } + kr?: { + type: "simplified" + } + lt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + lu?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + lv?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + mt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + mx?: { + type: "simplified" + } + my?: { + type: "simplified" + } + nl?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + no?: { + type: "standard" + } + nz?: { + type: "standard" + } + pl?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + pt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ro?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sa?: { + type: "simplified" + } + se?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sg?: { + type: "standard" + } + si?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sk?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + th?: { + type: "simplified" + } + tr?: { + type: "simplified" + } + us?: { + local_amusement_tax?: { + jurisdiction: string + } + local_lease_tax?: { + jurisdiction: string + } + state: string + type: + | "local_amusement_tax" + | "local_lease_tax" + | "state_communications_tax" + | "state_sales_tax" + } + vn?: { + type: "simplified" + } + za?: { + type: "standard" + } + } + expand?: string[] + expires_at?: number + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/tax/registrations` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getTaxRegistrationsId( + p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/tax/registrations/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postTaxRegistrationsId( + p: { + id: string + requestBody?: { + active_from?: "now" | number + expand?: string[] + expires_at?: "now" | number | "" + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/tax/registrations/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async getTaxSettings( p: { expand?: string[] @@ -26535,6 +29277,201 @@ export class ApiClient extends AbstractFetchClient { ) } + async getTaxIds( + p: { + endingBefore?: string + expand?: string[] + limit?: number + owner?: { + account?: string + customer?: string + type: "account" | "application" | "customer" | "self" + } + startingAfter?: string + requestBody?: EmptyObject + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + | Res< + 200, + { + data: t_tax_id[] + has_more: boolean + object: "list" + url: string + } + > + | Res + > + > { + const url = this.basePath + `/v1/tax_ids` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ + ending_before: p["endingBefore"], + expand: p["expand"], + limit: p["limit"], + owner: p["owner"], + starting_after: p["startingAfter"], + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postTaxIds( + p: { + requestBody: { + expand?: string[] + owner?: { + account?: string + customer?: string + type: "account" | "application" | "customer" | "self" + } + type: + | "ad_nrt" + | "ae_trn" + | "ar_cuit" + | "au_abn" + | "au_arn" + | "bg_uic" + | "bo_tin" + | "br_cnpj" + | "br_cpf" + | "ca_bn" + | "ca_gst_hst" + | "ca_pst_bc" + | "ca_pst_mb" + | "ca_pst_sk" + | "ca_qst" + | "ch_vat" + | "cl_tin" + | "cn_tin" + | "co_nit" + | "cr_tin" + | "do_rcn" + | "ec_ruc" + | "eg_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" + | "jp_trn" + | "ke_pin" + | "kr_brn" + | "li_uid" + | "mx_rfc" + | "my_frp" + | "my_itn" + | "my_sst" + | "no_vat" + | "no_voec" + | "nz_gst" + | "pe_ruc" + | "ph_tin" + | "ro_tin" + | "rs_pib" + | "ru_inn" + | "ru_kpp" + | "sa_vat" + | "sg_gst" + | "sg_uen" + | "si_tin" + | "sv_nit" + | "th_vat" + | "tr_tin" + | "tw_vat" + | "ua_vat" + | "us_ein" + | "uy_ruc" + | "ve_rif" + | "vn_tin" + | "za_vat" + value: string + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/tax_ids` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async deleteTaxIdsId( + p: { + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/tax_ids/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "DELETE", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async getTaxIdsId( + p: { + expand?: string[] + id: string + requestBody?: EmptyObject + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse | Res> + > { + const url = this.basePath + `/v1/tax_ids/${p["id"]}` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const query = this._query({ expand: p["expand"] }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url + query, + { method: "GET", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async getTaxRates( p: { active?: boolean @@ -26618,7 +29555,6 @@ export class ApiClient extends AbstractFetchClient { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" } }, @@ -26693,7 +29629,6 @@ export class ApiClient extends AbstractFetchClient { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" } }, @@ -26767,6 +29702,12 @@ export class ApiClient extends AbstractFetchClient { splashscreen?: string | "" } expand?: string[] + name?: string + offline?: + | { + enabled: boolean + } + | "" tipping?: | { aud?: { @@ -26931,6 +29872,12 @@ export class ApiClient extends AbstractFetchClient { } | "" expand?: string[] + name?: string + offline?: + | { + enabled: boolean + } + | "" tipping?: | { aud?: { @@ -27245,6 +30192,7 @@ export class ApiClient extends AbstractFetchClient { | "bbpos_chipper2x" | "bbpos_wisepad3" | "bbpos_wisepos_e" + | "mobile_phone_reader" | "simulated_wisepos_e" | "stripe_m2" | "verifone_P400" @@ -27448,6 +30396,7 @@ export class ApiClient extends AbstractFetchClient { expand?: string[] payment_intent: string process_config?: { + enable_customer_cancellation?: boolean skip_tipping?: boolean tipping?: { amount_eligible?: number @@ -27481,7 +30430,9 @@ export class ApiClient extends AbstractFetchClient { requestBody: { customer_consent_collected: boolean expand?: string[] - process_config?: EmptyObject + process_config?: { + enable_customer_cancellation?: boolean + } setup_intent: string } }, @@ -27516,6 +30467,9 @@ export class ApiClient extends AbstractFetchClient { } payment_intent?: string refund_application_fee?: boolean + refund_payment_config?: { + enable_customer_cancellation?: boolean + } reverse_transfer?: boolean } }, @@ -27575,6 +30529,266 @@ export class ApiClient extends AbstractFetchClient { ) } + async postTestHelpersConfirmationTokens( + p: { + requestBody?: { + expand?: string[] + payment_method?: string + payment_method_data?: { + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + affirm?: EmptyObject + afterpay_clearpay?: EmptyObject + alipay?: EmptyObject + au_becs_debit?: { + account_number: string + bsb_number: string + } + bacs_debit?: { + account_number?: string + sort_code?: string + } + bancontact?: EmptyObject + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | "" + email?: string | "" + name?: string | "" + phone?: string | "" + } + blik?: EmptyObject + boleto?: { + tax_id: string + } + cashapp?: EmptyObject + customer_balance?: EmptyObject + eps?: { + 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" + } + fpx?: { + bank: + | "affin_bank" + | "agrobank" + | "alliance_bank" + | "ambank" + | "bank_islam" + | "bank_muamalat" + | "bank_of_china" + | "bank_rakyat" + | "bsn" + | "cimb" + | "deutsche_bank" + | "hong_leong_bank" + | "hsbc" + | "kfh" + | "maybank2e" + | "maybank2u" + | "ocbc" + | "pb_enterprise" + | "public_bank" + | "rhb" + | "standard_chartered" + | "uob" + } + giropay?: EmptyObject + grabpay?: EmptyObject + ideal?: { + bank?: + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "n26" + | "nn" + | "rabobank" + | "regiobank" + | "revolut" + | "sns_bank" + | "triodos_bank" + | "van_lanschot" + | "yoursafe" + } + interac_present?: EmptyObject + klarna?: { + dob?: { + day: number + month: number + year: number + } + } + konbini?: EmptyObject + link?: EmptyObject + metadata?: { + [key: string]: string | undefined + } + mobilepay?: EmptyObject + oxxo?: EmptyObject + p24?: { + 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" + | "velobank" + | "volkswagen_bank" + } + paynow?: EmptyObject + paypal?: EmptyObject + pix?: EmptyObject + promptpay?: EmptyObject + radar_options?: { + session?: string + } + revolut_pay?: EmptyObject + sepa_debit?: { + iban: string + } + sofort?: { + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" + } + swish?: EmptyObject + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "cashapp" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "link" + | "mobilepay" + | "oxxo" + | "p24" + | "paynow" + | "paypal" + | "pix" + | "promptpay" + | "revolut_pay" + | "sepa_debit" + | "sofort" + | "swish" + | "us_bank_account" + | "wechat_pay" + | "zip" + us_bank_account?: { + account_holder_type?: "company" | "individual" + account_number?: string + account_type?: "checking" | "savings" + financial_connections_account?: string + routing_number?: string + } + wechat_pay?: EmptyObject + zip?: EmptyObject + } + return_url?: string + setup_future_usage?: "off_session" | "on_session" + shipping?: { + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string | "" + } + } + } = {}, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_confirmation_token> | Res + > + > { + const url = this.basePath + `/v1/test_helpers/confirmation_tokens` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async postTestHelpersCustomersCustomerFundCashBalance( p: { customer: string @@ -27928,6 +31142,7 @@ export class ApiClient extends AbstractFetchClient { postal_code?: string state?: string terminal_id?: string + url?: string } network_data?: { acquiring_institution_id?: string @@ -27935,8 +31150,22 @@ export class ApiClient extends AbstractFetchClient { verification_data?: { address_line1_check?: "match" | "mismatch" | "not_provided" address_postal_code_check?: "match" | "mismatch" | "not_provided" + authentication_exemption?: { + claimed_by: "acquirer" | "issuer" + type: + | "low_value_transaction" + | "transaction_risk_analysis" + | "unknown" + } cvc_check?: "match" | "mismatch" | "not_provided" expiry_check?: "match" | "mismatch" | "not_provided" + three_d_secure?: { + result: + | "attempt_acknowledged" + | "authenticated" + | "failed" + | "required" + } } wallet?: "apple_pay" | "google_pay" | "samsung_pay" } @@ -28228,6 +31457,114 @@ export class ApiClient extends AbstractFetchClient { ) } + async postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate( + p: { + personalizationDesign: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_issuing_personalization_design> | Res + > + > { + const url = + this.basePath + + `/v1/test_helpers/issuing/personalization_designs/${p["personalizationDesign"]}/activate` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate( + p: { + personalizationDesign: string + requestBody?: { + expand?: string[] + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_issuing_personalization_design> | Res + > + > { + const url = + this.basePath + + `/v1/test_helpers/issuing/personalization_designs/${p["personalizationDesign"]}/deactivate` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + + async postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject( + p: { + personalizationDesign: string + requestBody: { + expand?: string[] + rejection_reasons: { + card_logo?: ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_binary_image" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + carrier_text?: ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + } + } + }, + timeout?: number, + opts?: RequestInit, + ): Promise< + TypedFetchResponse< + Res<200, t_issuing_personalization_design> | Res + > + > { + const url = + this.basePath + + `/v1/test_helpers/issuing/personalization_designs/${p["personalizationDesign"]}/reject` + const headers = this._headers({ + "Content-Type": "application/x-www-form-urlencoded", + }) + const body = JSON.stringify(p.requestBody) + + return this._fetch( + url, + { method: "POST", headers, body, ...(opts ?? {}) }, + timeout, + ) + } + async postTestHelpersIssuingTransactionsCreateForceCapture( p: { requestBody: { @@ -28538,6 +31875,7 @@ export class ApiClient extends AbstractFetchClient { postal_code?: string state?: string terminal_id?: string + url?: string } purchase_details?: { flight?: { @@ -28911,6 +32249,7 @@ export class ApiClient extends AbstractFetchClient { postal_code?: string state?: string terminal_id?: string + url?: string } purchase_details?: { flight?: { @@ -29666,6 +33005,7 @@ export class ApiClient extends AbstractFetchClient { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -29744,6 +33084,13 @@ export class ApiClient extends AbstractFetchClient { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -29765,6 +33112,7 @@ export class ApiClient extends AbstractFetchClient { account_type?: "checking" | "futsu" | "savings" | "toza" country: string currency?: string + payment_method?: string routing_number?: string } card?: @@ -29780,6 +33128,9 @@ export class ApiClient extends AbstractFetchClient { exp_month: string exp_year: string name?: string + networks?: { + preferred?: "cartes_bancaires" | "mastercard" | "visa" + } number: string } | string @@ -29789,6 +33140,13 @@ export class ApiClient extends AbstractFetchClient { } expand?: string[] person?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -29864,6 +33222,7 @@ export class ApiClient extends AbstractFetchClient { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -31050,6 +34409,14 @@ export class ApiClient extends AbstractFetchClient { async getTreasuryOutboundPayments( p: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string endingBefore?: string expand?: string[] @@ -31080,6 +34447,7 @@ export class ApiClient extends AbstractFetchClient { "Content-Type": "application/x-www-form-urlencoded", }) const query = this._query({ + created: p["created"], customer: p["customer"], ending_before: p["endingBefore"], expand: p["expand"], @@ -31866,6 +35234,8 @@ export class ApiClient extends AbstractFetchClient { | "2022-08-01" | "2022-11-15" | "2023-08-16" + | "2023-10-16" + | "2024-04-10" connect?: boolean description?: string | "" enabled_events: ( @@ -31902,6 +35272,13 @@ export class ApiClient extends AbstractFetchClient { | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" + | "climate.order.canceled" + | "climate.order.created" + | "climate.order.delayed" + | "climate.order.delivered" + | "climate.order.product_substituted" + | "climate.product.created" + | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" @@ -31936,6 +35313,8 @@ export class ApiClient extends AbstractFetchClient { | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" + | "financial_connections.account.refreshed_ownership" + | "financial_connections.account.refreshed_transactions" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -31969,6 +35348,8 @@ export class ApiClient extends AbstractFetchClient { | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" + | "issuing_token.created" + | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" @@ -32203,6 +35584,13 @@ export class ApiClient extends AbstractFetchClient { | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" + | "climate.order.canceled" + | "climate.order.created" + | "climate.order.delayed" + | "climate.order.delivered" + | "climate.order.product_substituted" + | "climate.product.created" + | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" @@ -32237,6 +35625,8 @@ export class ApiClient extends AbstractFetchClient { | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" + | "financial_connections.account.refreshed_ownership" + | "financial_connections.account.refreshed_transactions" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -32270,6 +35660,8 @@ export class ApiClient extends AbstractFetchClient { | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" + | "issuing_token.created" + | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" diff --git a/integration-tests/typescript-fetch/src/generated/stripe.yaml/models.ts b/integration-tests/typescript-fetch/src/generated/stripe.yaml/models.ts index 3b2495ad..ee8de2ba 100644 --- a/integration-tests/typescript-fetch/src/generated/stripe.yaml/models.ts +++ b/integration-tests/typescript-fetch/src/generated/stripe.yaml/models.ts @@ -41,8 +41,15 @@ export type t_account = { type?: "custom" | "express" | "standard" } +export type t_account_annual_revenue = { + amount?: number | null + currency?: string | null + fiscal_year_end?: string | null +} + export type t_account_bacs_debit_payments_settings = { - display_name?: string + display_name?: string | null + service_user_number?: string | null } export type t_account_branding_settings = { @@ -53,6 +60,8 @@ export type t_account_branding_settings = { } export type t_account_business_profile = { + annual_revenue?: t_account_annual_revenue | null + estimated_worker_count?: number | null mcc?: string | null monthly_estimated_revenue?: t_account_monthly_estimated_revenue name?: string | null @@ -68,6 +77,7 @@ export type t_account_capabilities = { acss_debit_payments?: "active" | "inactive" | "pending" affirm_payments?: "active" | "inactive" | "pending" afterpay_clearpay_payments?: "active" | "inactive" | "pending" + amazon_pay_payments?: "active" | "inactive" | "pending" au_becs_debit_payments?: "active" | "inactive" | "pending" bacs_debit_payments?: "active" | "inactive" | "pending" bancontact_payments?: "active" | "inactive" | "pending" @@ -89,12 +99,15 @@ export type t_account_capabilities = { konbini_payments?: "active" | "inactive" | "pending" legacy_payments?: "active" | "inactive" | "pending" link_payments?: "active" | "inactive" | "pending" + mobilepay_payments?: "active" | "inactive" | "pending" oxxo_payments?: "active" | "inactive" | "pending" p24_payments?: "active" | "inactive" | "pending" paynow_payments?: "active" | "inactive" | "pending" promptpay_payments?: "active" | "inactive" | "pending" + revolut_pay_payments?: "active" | "inactive" | "pending" sepa_debit_payments?: "active" | "inactive" | "pending" sofort_payments?: "active" | "inactive" | "pending" + swish_payments?: "active" | "inactive" | "pending" tax_reporting_us_1099_k?: "active" | "inactive" | "pending" tax_reporting_us_1099_misc?: "active" | "inactive" | "pending" transfers?: "active" | "inactive" | "pending" @@ -157,6 +170,10 @@ export type t_account_future_requirements = { pending_verification?: string[] | null } +export type t_account_invoices_settings = { + default_account_tax_ids?: (string | t_tax_id)[] | null +} + export type t_account_link = { created: number expires_at: number @@ -202,10 +219,43 @@ export type t_account_requirements_alternative = { export type t_account_requirements_error = { code: | "invalid_address_city_state_postal_code" + | "invalid_address_highway_contract_box" + | "invalid_address_private_mailbox" + | "invalid_business_profile_name" + | "invalid_business_profile_name_denylisted" + | "invalid_company_name_denylisted" + | "invalid_dob_age_over_maximum" | "invalid_dob_age_under_18" + | "invalid_dob_age_under_minimum" + | "invalid_product_description_length" + | "invalid_product_description_url_match" | "invalid_representative_country" + | "invalid_statement_descriptor_business_mismatch" + | "invalid_statement_descriptor_denylisted" + | "invalid_statement_descriptor_length" + | "invalid_statement_descriptor_prefix_denylisted" + | "invalid_statement_descriptor_prefix_mismatch" | "invalid_street_address" + | "invalid_tax_id" + | "invalid_tax_id_format" | "invalid_tos_acceptance" + | "invalid_url_denylisted" + | "invalid_url_format" + | "invalid_url_web_presence_detected" + | "invalid_url_website_business_information_mismatch" + | "invalid_url_website_empty" + | "invalid_url_website_inaccessible" + | "invalid_url_website_inaccessible_geoblocked" + | "invalid_url_website_inaccessible_password_protected" + | "invalid_url_website_incomplete" + | "invalid_url_website_incomplete_cancellation_policy" + | "invalid_url_website_incomplete_customer_service_details" + | "invalid_url_website_incomplete_legal_restrictions" + | "invalid_url_website_incomplete_refund_policy" + | "invalid_url_website_incomplete_return_policy" + | "invalid_url_website_incomplete_terms_and_conditions" + | "invalid_url_website_incomplete_under_construction" + | "invalid_url_website_other" | "invalid_value_other" | "verification_directors_mismatch" | "verification_document_address_mismatch" @@ -247,6 +297,7 @@ export type t_account_requirements_error = { | "verification_failed_keyed_match" | "verification_failed_name_match" | "verification_failed_other" + | "verification_failed_representative_authority" | "verification_failed_residential_address" | "verification_failed_tax_id_match" | "verification_failed_tax_id_not_issued" @@ -277,6 +328,7 @@ export type t_account_settings = { card_issuing?: t_account_card_issuing_settings card_payments: t_account_card_payments_settings dashboard: t_account_dashboard_settings + invoices?: t_account_invoices_settings payments: t_account_payments_settings payouts?: t_account_payout_settings sepa_debit_payments?: t_account_sepa_debit_payments_settings @@ -384,13 +436,14 @@ export type t_apps_secret = { export type t_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } export type t_balance = { available: t_balance_amount[] connect_reserved?: t_balance_amount[] - instant_available?: t_balance_amount[] + instant_available?: t_balance_amount_net[] issuing?: t_balance_detail livemode: boolean object: "balance" @@ -409,6 +462,12 @@ export type t_balance_amount_by_source_type = { fpx?: number } +export type t_balance_amount_net = { + amount: number + currency: string + source_types?: t_balance_amount_by_source_type +} + export type t_balance_detail = { available: t_balance_amount[] } @@ -455,22 +514,23 @@ export type t_balance_transaction = { | "application_fee" | "application_fee_refund" | "charge" + | "climate_order_purchase" + | "climate_order_refund" | "connect_collection_transfer" | "contribution" | "issuing_authorization_hold" | "issuing_authorization_release" | "issuing_dispute" | "issuing_transaction" - | "obligation_inbound" | "obligation_outbound" - | "obligation_payout" - | "obligation_payout_failure" | "obligation_reversal_inbound" - | "obligation_reversal_outbound" | "payment" | "payment_failure_refund" + | "payment_network_reserve_hold" + | "payment_network_reserve_release" | "payment_refund" | "payment_reversal" + | "payment_unreconciled" | "payout" | "payout_cancel" | "payout_failure" @@ -543,6 +603,7 @@ export type t_bank_connections_resource_balance_api_resource_credit_balance = { export type t_bank_connections_resource_balance_refresh = { last_attempted_at: number + next_refresh_available_at?: number | null status: "failed" | "pending" | "succeeded" } @@ -555,6 +616,66 @@ export type t_bank_connections_resource_ownership_refresh = { status: "failed" | "pending" | "succeeded" } +export type t_bank_connections_resource_transaction_refresh = { + id: string + last_attempted_at: number + next_refresh_available_at?: number | null + status: "failed" | "pending" | "succeeded" +} + +export type t_bank_connections_resource_transaction_resource_status_transitions = + { + posted_at?: number | null + void_at?: number | null + } + +export type t_billing_meter = { + created: number + customer_mapping: t_billing_meter_resource_customer_mapping_settings + default_aggregation: t_billing_meter_resource_aggregation_settings + display_name: string + event_name: string + event_time_window?: "day" | "hour" | null + id: string + livemode: boolean + object: "billing.meter" + status: "active" | "inactive" + status_transitions: t_billing_meter_resource_billing_meter_status_transitions + updated: number + value_settings: t_billing_meter_resource_billing_meter_value +} + +export type t_billing_meter_event = { + created: number + event_name: string + identifier: string + livemode: boolean + object: "billing.meter_event" + payload: { + [key: string]: string | undefined + } + timestamp: number +} + +export type t_billing_meter_event_adjustment = { + cancel: t_billing_meter_resource_billing_meter_event_adjustment_cancel + event_name: string + livemode: boolean + object: "billing.meter_event_adjustment" + status: "complete" | "pending" + type: "cancel" +} + +export type t_billing_meter_event_summary = { + aggregated_value: number + end_time: number + id: string + livemode: boolean + meter: string + object: "billing.meter_event_summary" + start_time: number +} + export type t_billing_details = { address?: t_address | null email?: string | null @@ -562,6 +683,27 @@ export type t_billing_details = { phone?: string | null } +export type t_billing_meter_resource_aggregation_settings = { + formula: "count" | "sum" +} + +export type t_billing_meter_resource_billing_meter_event_adjustment_cancel = { + identifier: string +} + +export type t_billing_meter_resource_billing_meter_status_transitions = { + deactivated_at?: number | null +} + +export type t_billing_meter_resource_billing_meter_value = { + event_payload_key: string +} + +export type t_billing_meter_resource_customer_mapping_settings = { + event_payload_key: string + type: "by_id" +} + export type t_billing_portal_configuration = { active: boolean application?: string | t_application | t_deleted_application | null @@ -700,6 +842,7 @@ export type t_card = { [key: string]: string | undefined } | null name?: string | null + networks?: t_token_card_networks object: "card" status?: string | null tokenization_method?: string | null @@ -812,6 +955,7 @@ export type t_checkout_session = { billing_address_collection?: "auto" | "required" | null cancel_url?: string | null client_reference_id?: string | null + client_secret?: string | null consent?: t_payment_pages_checkout_session_consent | null consent_collection?: t_payment_pages_checkout_session_consent_collection | null created: number @@ -891,6 +1035,8 @@ export type t_checkout_session = { payment_status: "no_payment_required" | "paid" | "unpaid" phone_number_collection?: t_payment_pages_checkout_session_phone_number_collection recovered_from?: string | null + redirect_on_completion?: "always" | "if_required" | "never" + return_url?: string setup_intent?: string | t_setup_intent | null shipping_address_collection?: t_payment_pages_checkout_session_shipping_address_collection | null shipping_cost?: t_payment_pages_checkout_session_shipping_cost | null @@ -902,6 +1048,7 @@ export type t_checkout_session = { success_url?: string | null tax_id_collection?: t_payment_pages_checkout_session_tax_id_collection total_details?: t_payment_pages_checkout_session_total_details | null + ui_mode?: "embedded" | "hosted" | null url?: string | null } @@ -955,6 +1102,7 @@ export type t_checkout_card_installments_options = { export type t_checkout_card_payment_method_options = { installments?: t_checkout_card_installments_options + request_three_d_secure: "any" | "automatic" | "challenge" setup_future_usage?: "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -1036,10 +1184,19 @@ export type t_checkout_paynow_payment_method_options = { setup_future_usage?: "none" } +export type t_checkout_paypal_payment_method_options = { + capture_method?: "manual" + preferred_locale?: string | null + reference?: string | null + setup_future_usage?: "none" | "off_session" +} + export type t_checkout_pix_payment_method_options = { expires_after_seconds?: number | null } +export type t_checkout_revolut_pay_payment_method_options = EmptyObject + export type t_checkout_sepa_debit_payment_method_options = { setup_future_usage?: "none" | "off_session" | "on_session" } @@ -1067,9 +1224,12 @@ export type t_checkout_session_payment_method_options = { oxxo?: t_checkout_oxxo_payment_method_options p24?: t_checkout_p24_payment_method_options paynow?: t_checkout_paynow_payment_method_options + paypal?: t_checkout_paypal_payment_method_options pix?: t_checkout_pix_payment_method_options + revolut_pay?: t_checkout_revolut_pay_payment_method_options sepa_debit?: t_checkout_sepa_debit_payment_method_options sofort?: t_checkout_sofort_payment_method_options + swish?: t_checkout_swish_payment_method_options us_bank_account?: t_checkout_us_bank_account_payment_method_options } @@ -1077,12 +1237,216 @@ export type t_checkout_sofort_payment_method_options = { setup_future_usage?: "none" } +export type t_checkout_swish_payment_method_options = { + reference?: string | null +} + export type t_checkout_us_bank_account_payment_method_options = { financial_connections?: t_linked_account_options_us_bank_account setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" } +export type t_climate_order = { + amount_fees: number + amount_subtotal: number + amount_total: number + beneficiary?: t_climate_removals_beneficiary + canceled_at?: number | null + cancellation_reason?: "expired" | "product_unavailable" | "requested" | null + certificate?: string | null + confirmed_at?: number | null + created: number + currency: string + delayed_at?: number | null + delivered_at?: number | null + delivery_details: t_climate_removals_order_deliveries[] + expected_delivery_year: number + id: string + livemode: boolean + metadata: { + [key: string]: string | undefined + } + metric_tons: string + object: "climate.order" + product: string | t_climate_product + product_substituted_at?: number | null + status: "awaiting_funds" | "canceled" | "confirmed" | "delivered" | "open" +} + +export type t_climate_product = { + created: number + current_prices_per_metric_ton: { + [key: string]: t_climate_removals_products_price | undefined + } + delivery_year?: number | null + id: string + livemode: boolean + metric_tons_available: string + name: string + object: "climate.product" + suppliers: t_climate_supplier[] +} + +export type t_climate_supplier = { + id: string + info_url: string + livemode: boolean + locations: t_climate_removals_location[] + name: string + object: "climate.supplier" + removal_pathway: + | "biomass_carbon_removal_and_storage" + | "direct_air_capture" + | "enhanced_weathering" +} + +export type t_climate_removals_beneficiary = { + public_name: string +} + +export type t_climate_removals_location = { + city?: string | null + country: string + latitude?: number | null + longitude?: number | null + region?: string | null +} + +export type t_climate_removals_order_deliveries = { + delivered_at: number + location?: t_climate_removals_location | null + metric_tons: string + registry_url?: string | null + supplier: t_climate_supplier +} + +export type t_climate_removals_products_price = { + amount_fees: number + amount_subtotal: number + amount_total: number +} + +export type t_confirmation_token = { + created: number + expires_at?: number | null + id: string + livemode: boolean + mandate_data?: t_confirmation_tokens_resource_mandate_data | null + object: "confirmation_token" + payment_intent?: string | null + payment_method_preview?: t_confirmation_tokens_resource_payment_method_preview | null + return_url?: string | null + setup_future_usage?: "off_session" | "on_session" | null + setup_intent?: string | null + shipping?: t_confirmation_tokens_resource_shipping | null + use_stripe_sdk: boolean +} + +export type t_confirmation_tokens_resource_mandate_data = { + customer_acceptance: t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance +} + +export type t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance = + { + online?: t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online | null + type: string + } + +export type t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online = + { + ip_address?: string | null + user_agent?: string | null + } + +export type t_confirmation_tokens_resource_payment_method_preview = { + acss_debit?: t_payment_method_acss_debit + affirm?: t_payment_method_affirm + afterpay_clearpay?: t_payment_method_afterpay_clearpay + alipay?: t_payment_flows_private_payment_methods_alipay + au_becs_debit?: t_payment_method_au_becs_debit + bacs_debit?: t_payment_method_bacs_debit + bancontact?: t_payment_method_bancontact + billing_details: t_billing_details + blik?: t_payment_method_blik + boleto?: t_payment_method_boleto + card?: t_payment_method_card + card_present?: t_payment_method_card_present + cashapp?: t_payment_method_cashapp + customer_balance?: t_payment_method_customer_balance + eps?: t_payment_method_eps + fpx?: t_payment_method_fpx + giropay?: t_payment_method_giropay + grabpay?: t_payment_method_grabpay + ideal?: t_payment_method_ideal + interac_present?: t_payment_method_interac_present + klarna?: t_payment_method_klarna + konbini?: t_payment_method_konbini + link?: t_payment_method_link + mobilepay?: t_payment_method_mobilepay + oxxo?: t_payment_method_oxxo + p24?: t_payment_method_p24 + paynow?: t_payment_method_paynow + paypal?: t_payment_method_paypal + pix?: t_payment_method_pix + promptpay?: t_payment_method_promptpay + revolut_pay?: t_payment_method_revolut_pay + sepa_debit?: t_payment_method_sepa_debit + sofort?: t_payment_method_sofort + swish?: t_payment_method_swish + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "card" + | "card_present" + | "cashapp" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "interac_present" + | "klarna" + | "konbini" + | "link" + | "mobilepay" + | "oxxo" + | "p24" + | "paynow" + | "paypal" + | "pix" + | "promptpay" + | "revolut_pay" + | "sepa_debit" + | "sofort" + | "swish" + | "us_bank_account" + | "wechat_pay" + | "zip" + us_bank_account?: t_payment_method_us_bank_account + wechat_pay?: t_payment_method_wechat_pay + zip?: t_payment_method_zip +} + +export type t_confirmation_tokens_resource_shipping = { + address: t_address + name: string + phone?: string | null +} + +export type t_connect_account_reference = { + account?: string | t_account + type: "account" | "self" +} + export type t_connect_collection_transfer = { amount: number currency: string @@ -1092,12 +1456,49 @@ export type t_connect_collection_transfer = { object: "connect_collection_transfer" } +export type t_connect_embedded_account_config = { + enabled: boolean + features: t_connect_embedded_account_features +} + +export type t_connect_embedded_account_features = EmptyObject + export type t_connect_embedded_account_session_create_components = { - account_onboarding: t_connect_embedded_base_config_claim + account_onboarding: t_connect_embedded_account_config + documents: t_connect_embedded_base_config_claim + payment_details: t_connect_embedded_payments_config + payments: t_connect_embedded_payments_config + payouts: t_connect_embedded_payouts_config } export type t_connect_embedded_base_config_claim = { enabled: boolean + features: t_connect_embedded_base_features +} + +export type t_connect_embedded_base_features = EmptyObject + +export type t_connect_embedded_payments_config = { + enabled: boolean + features: t_connect_embedded_payments_features +} + +export type t_connect_embedded_payments_features = { + capture_payments: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management: boolean + refund_management: boolean +} + +export type t_connect_embedded_payouts_config = { + enabled: boolean + features: t_connect_embedded_payouts_features +} + +export type t_connect_embedded_payouts_features = { + edit_payout_schedule: boolean + instant_payouts: boolean + standard_payouts: boolean } export type t_country_spec = { @@ -1189,7 +1590,7 @@ export type t_credit_note = { | "product_unsatisfactory" | null refund?: string | t_refund | null - shipping_cost?: t_invoices_shipping_cost | null + shipping_cost?: t_invoices_resource_shipping_cost | null status: "issued" | "void" subtotal: number subtotal_excluding_tax?: number | null @@ -1382,6 +1783,11 @@ export type t_customer_balance_resource_cash_balance_transaction_resource_refund refund: string | t_refund } +export type t_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance = + { + balance_transaction: string | t_balance_transaction + } + export type t_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction = { payment_intent: string | t_payment_intent @@ -1428,6 +1834,7 @@ export type t_customer_cash_balance_transaction = { net_amount: number object: "customer_cash_balance_transaction" refunded_from_payment?: t_customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction + transferred_to_balance?: t_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance type: | "adjusted_for_overdraft" | "applied_to_payment" @@ -1436,10 +1843,34 @@ export type t_customer_cash_balance_transaction = { | "refunded_from_payment" | "return_canceled" | "return_initiated" + | "transferred_to_balance" | "unapplied_from_payment" unapplied_from_payment?: t_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction } +export type t_customer_session = { + client_secret: string + components?: t_customer_session_resource_components + created: number + customer: string | t_customer + expires_at: number + livemode: boolean + object: "customer_session" +} + +export type t_customer_session_resource_components = { + buy_button: t_customer_session_resource_components_resource_buy_button + pricing_table: t_customer_session_resource_components_resource_pricing_table +} + +export type t_customer_session_resource_components_resource_buy_button = { + enabled: boolean +} + +export type t_customer_session_resource_components_resource_pricing_table = { + enabled: boolean +} + export type t_customer_tax = { automatic_tax: | "failed" @@ -1517,6 +1948,7 @@ export type t_deleted_discount = { promotion_code?: string | t_promotion_code | null start: number subscription?: string | null + subscription_item?: string | null } export type t_deleted_external_account = t_deleted_bank_account | t_deleted_card @@ -1613,6 +2045,8 @@ export type t_deleted_webhook_endpoint = { object: "webhook_endpoint" } +export type t_destination_details_unimplemented = EmptyObject + export type t_discount = { checkout_session?: string | null coupon: t_coupon @@ -1625,6 +2059,7 @@ export type t_discount = { promotion_code?: string | t_promotion_code | null start: number subscription?: string | null + subscription_item?: string | null } export type t_discounts_resource_discount_amount = { @@ -1632,6 +2067,12 @@ export type t_discounts_resource_discount_amount = { discount: string | t_discount | t_deleted_discount } +export type t_discounts_resource_stackable_discount = { + coupon?: string | t_coupon | null + discount?: string | t_discount | null + promotion_code?: string | t_promotion_code | null +} + export type t_dispute = { amount: number balance_transactions: t_balance_transaction[] @@ -1849,7 +2290,9 @@ export type t_financial_connections_account = { | "mortgage" | "other" | "savings" + subscriptions?: "transactions"[] | null supported_payment_method_types: ("link" | "us_bank_account")[] + transaction_refresh?: t_bank_connections_resource_transaction_refresh | null } export type t_financial_connections_account_owner = { @@ -1889,10 +2332,25 @@ export type t_financial_connections_session = { livemode: boolean object: "financial_connections.session" permissions: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: ("balances" | "ownership")[] | null + prefetch?: ("balances" | "ownership" | "transactions")[] | null return_url?: string } +export type t_financial_connections_transaction = { + account: string + amount: number + currency: string + description: string + id: string + livemode: boolean + object: "financial_connections.transaction" + status: "pending" | "posted" | "void" + status_transitions: t_bank_connections_resource_transaction_resource_status_transitions + transacted_at: number + transaction_refresh: string + updated: number +} + export type t_financial_reporting_finance_report_run_run_parameters = { columns?: string[] connected_account?: string @@ -1904,6 +2362,47 @@ export type t_financial_reporting_finance_report_run_run_parameters = { timezone?: string } +export type t_forwarded_request_context = { + destination_duration: number + destination_ip_address: string +} + +export type t_forwarded_request_details = { + body: string + headers: t_forwarded_request_header[] + http_method: "POST" +} + +export type t_forwarded_request_header = { + name: string + value: string +} + +export type t_forwarded_response_details = { + body: string + headers: t_forwarded_request_header[] + status: number +} + +export type t_forwarding_request = { + config: string + created: number + id: string + livemode: boolean + object: "forwarding.request" + payment_method: string + replacements: ( + | "card_cvc" + | "card_expiry" + | "card_number" + | "cardholder_name" + )[] + request_context?: t_forwarded_request_context | null + request_details?: t_forwarded_request_details | null + response_details?: t_forwarded_response_details | null + url?: string | null +} + export type t_funding_instructions = { bank_transfer: t_funding_instructions_bank_transfer currency: string @@ -1918,12 +2417,29 @@ export type t_funding_instructions_bank_transfer = { type: "eu_bank_transfer" | "jp_bank_transfer" } +export type t_funding_instructions_bank_transfer_aba_record = { + account_number: string + bank_name: string + routing_number: string +} + export type t_funding_instructions_bank_transfer_financial_address = { + aba?: t_funding_instructions_bank_transfer_aba_record iban?: t_funding_instructions_bank_transfer_iban_record sort_code?: t_funding_instructions_bank_transfer_sort_code_record spei?: t_funding_instructions_bank_transfer_spei_record - supported_networks?: ("bacs" | "fps" | "sepa" | "spei" | "zengin")[] - type: "iban" | "sort_code" | "spei" | "zengin" + supported_networks?: ( + | "ach" + | "bacs" + | "domestic_wire_us" + | "fps" + | "sepa" + | "spei" + | "swift" + | "zengin" + )[] + swift?: t_funding_instructions_bank_transfer_swift_record + type: "aba" | "iban" | "sort_code" | "spei" | "swift" | "zengin" zengin?: t_funding_instructions_bank_transfer_zengin_record } @@ -1946,6 +2462,12 @@ export type t_funding_instructions_bank_transfer_spei_record = { clabe: string } +export type t_funding_instructions_bank_transfer_swift_record = { + account_number: string + bank_name: string + swift_code: string +} + export type t_funding_instructions_bank_transfer_zengin_record = { account_holder_name?: string | null account_number?: string | null @@ -2010,6 +2532,17 @@ export type t_gelato_document_report_error = { reason?: string | null } +export type t_gelato_email_report = { + email?: string | null + error?: t_gelato_email_report_error | null + status: "unverified" | "verified" +} + +export type t_gelato_email_report_error = { + code?: "email_unverified_other" | "email_verification_declined" | null + reason?: string | null +} + export type t_gelato_id_number_report = { dob?: t_gelato_data_id_number_report_date | null error?: t_gelato_id_number_report_error | null @@ -2029,6 +2562,22 @@ export type t_gelato_id_number_report_error = { reason?: string | null } +export type t_gelato_phone_report = { + error?: t_gelato_phone_report_error | null + phone?: string | null + status: "unverified" | "verified" +} + +export type t_gelato_phone_report_error = { + code?: "phone_unverified_other" | "phone_verification_declined" | null + reason?: string | null +} + +export type t_gelato_provided_details = { + email?: string + phone?: string +} + export type t_gelato_report_document_options = { allowed_types?: ("driving_license" | "id_card" | "passport")[] require_id_number?: boolean @@ -2062,6 +2611,10 @@ export type t_gelato_session_document_options = { require_matching_selfie?: boolean } +export type t_gelato_session_email_options = { + require_verification?: boolean +} + export type t_gelato_session_id_number_options = EmptyObject export type t_gelato_session_last_error = { @@ -2073,9 +2626,13 @@ export type t_gelato_session_last_error = { | "document_expired" | "document_type_not_supported" | "document_unverified_other" + | "email_unverified_other" + | "email_verification_declined" | "id_number_insufficient_document_data" | "id_number_mismatch" | "id_number_unverified_other" + | "phone_unverified_other" + | "phone_verification_declined" | "selfie_document_missing_photo" | "selfie_face_mismatch" | "selfie_manipulated" @@ -2085,6 +2642,10 @@ export type t_gelato_session_last_error = { reason?: string | null } +export type t_gelato_session_phone_options = { + require_verification?: boolean +} + export type t_gelato_verification_report_options = { document?: t_gelato_report_document_options id_number?: t_gelato_report_id_number_options @@ -2092,32 +2653,41 @@ export type t_gelato_verification_report_options = { export type t_gelato_verification_session_options = { document?: t_gelato_session_document_options + email?: t_gelato_session_email_options id_number?: t_gelato_session_id_number_options + phone?: t_gelato_session_phone_options } export type t_gelato_verified_outputs = { address?: t_address | null dob?: t_gelato_data_verified_outputs_date | null + email?: string | null first_name?: string | null id_number?: string | null id_number_type?: "br_cpf" | "sg_nric" | "us_ssn" | null last_name?: string | null + phone?: string | null } export type t_identity_verification_report = { + client_reference_id?: string | null created: number document?: t_gelato_document_report + email?: t_gelato_email_report id: string id_number?: t_gelato_id_number_report livemode: boolean object: "identity.verification_report" options?: t_gelato_verification_report_options + phone?: t_gelato_phone_report selfie?: t_gelato_selfie_report - type?: "document" | "id_number" + type: "document" | "id_number" | "verification_flow" + verification_flow?: string verification_session?: string | null } export type t_identity_verification_session = { + client_reference_id?: string | null client_secret?: string | null created: number id: string @@ -2129,10 +2699,12 @@ export type t_identity_verification_session = { } object: "identity.verification_session" options?: t_gelato_verification_session_options | null + provided_details?: t_gelato_provided_details | null redaction?: t_verification_session_redaction | null status: "canceled" | "processing" | "requires_input" | "verified" - type?: "document" | "id_number" | null + type: "document" | "id_number" | "verification_flow" url?: string | null + verification_flow?: string verified_outputs?: t_gelato_verified_outputs | null } @@ -2148,10 +2720,19 @@ export type t_inbound_transfers_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" routing_number?: string | null } +export type t_internal_card = { + brand?: string | null + country?: string | null + exp_month?: number | null + exp_year?: number | null + last4?: string | null +} + export type t_invoice = { account_country?: string | null account_name?: string | null @@ -2195,15 +2776,16 @@ export type t_invoice = { default_tax_rates: t_tax_rate[] description?: string | null discount?: t_discount | null - discounts?: (string | t_discount | t_deleted_discount)[] | null + discounts: (string | t_discount | t_deleted_discount)[] due_date?: number | null effective_at?: number | null ending_balance?: number | null footer?: string | null - from_invoice?: t_invoices_from_invoice | null + from_invoice?: t_invoices_resource_from_invoice | null hosted_invoice_url?: string | null id?: string invoice_pdf?: string | null + issuer: t_connect_account_reference last_finalization_error?: t_api_errors | null latest_revision?: string | t_invoice | null lines: { @@ -2230,14 +2812,13 @@ export type t_invoice = { pre_payment_credit_notes_amount: number quote?: string | t_quote | null receipt_number?: string | null - rendering?: t_invoices_invoice_rendering | null - rendering_options?: t_invoice_setting_rendering_options | null - shipping_cost?: t_invoices_shipping_cost | null + rendering?: t_invoices_resource_invoice_rendering | null + shipping_cost?: t_invoices_resource_shipping_cost | null shipping_details?: t_shipping | null starting_balance: number statement_descriptor?: string | null status?: "draft" | "open" | "paid" | "uncollectible" | "void" | null - status_transitions: t_invoices_status_transitions + status_transitions: t_invoices_resource_status_transitions subscription?: string | t_subscription | null subscription_details?: t_subscription_details_data | null subscription_proration_date?: number @@ -2289,7 +2870,7 @@ export type t_invoice_payment_method_options_bancontact = { export type t_invoice_payment_method_options_card = { installments?: t_invoice_installments_card - request_three_d_secure?: "any" | "automatic" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_invoice_payment_method_options_customer_balance = { @@ -2309,6 +2890,8 @@ export type t_invoice_payment_method_options_customer_balance_bank_transfer_eu_b export type t_invoice_payment_method_options_konbini = EmptyObject +export type t_invoice_payment_method_options_sepa_debit = EmptyObject + export type t_invoice_payment_method_options_us_bank_account = { financial_connections?: t_invoice_payment_method_options_us_bank_account_linked_account_options verification_method?: "automatic" | "instant" | "microdeposits" @@ -2317,7 +2900,7 @@ export type t_invoice_payment_method_options_us_bank_account = { export type t_invoice_payment_method_options_us_bank_account_linked_account_options = { permissions?: ("balances" | "payment_method" | "transactions")[] - prefetch?: "balances"[] | null + prefetch?: ("balances" | "transactions")[] | null } export type t_invoice_rendering_pdf = { @@ -2338,6 +2921,7 @@ export type t_invoice_setting_customer_setting = { export type t_invoice_setting_quote_setting = { days_until_due?: number | null + issuer: t_connect_account_reference } export type t_invoice_setting_rendering_options = { @@ -2345,11 +2929,15 @@ export type t_invoice_setting_rendering_options = { } export type t_invoice_setting_subscription_schedule_phase_setting = { + account_tax_ids?: (string | t_tax_id | t_deleted_tax_id)[] | null days_until_due?: number | null + issuer?: t_connect_account_reference | null } export type t_invoice_setting_subscription_schedule_setting = { + account_tax_ids?: (string | t_tax_id | t_deleted_tax_id)[] | null days_until_due?: number | null + issuer: t_connect_account_reference } export type t_invoice_tax_amount = { @@ -2413,22 +3001,13 @@ export type t_invoiceitem = { unit_amount_decimal?: string | null } -export type t_invoices_from_invoice = { - action: string - invoice: string | t_invoice -} - -export type t_invoices_invoice_rendering = { - amount_tax_display?: string | null - pdf?: t_invoice_rendering_pdf | null -} - export type t_invoices_payment_method_options = { acss_debit?: t_invoice_payment_method_options_acss_debit | null bancontact?: t_invoice_payment_method_options_bancontact | null card?: t_invoice_payment_method_options_card | null customer_balance?: t_invoice_payment_method_options_customer_balance | null konbini?: t_invoice_payment_method_options_konbini | null + sepa_debit?: t_invoice_payment_method_options_sepa_debit | null us_bank_account?: t_invoice_payment_method_options_us_bank_account | null } @@ -2447,12 +3026,14 @@ export type t_invoices_payment_settings = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -2464,6 +3045,16 @@ export type t_invoices_payment_settings = { | null } +export type t_invoices_resource_from_invoice = { + action: string + invoice: string | t_invoice +} + +export type t_invoices_resource_invoice_rendering = { + amount_tax_display?: string | null + pdf?: t_invoice_rendering_pdf | null +} + export type t_invoices_resource_invoice_tax_id = { type: | "ad_nrt" @@ -2511,6 +3102,7 @@ export type t_invoices_resource_invoice_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -2545,7 +3137,7 @@ export type t_invoices_resource_line_items_proration_details = { credited_items?: t_invoices_resource_line_items_credited_items | null } -export type t_invoices_shipping_cost = { +export type t_invoices_resource_shipping_cost = { amount_subtotal: number amount_tax: number amount_total: number @@ -2553,7 +3145,7 @@ export type t_invoices_shipping_cost = { taxes?: t_line_items_tax_amount[] } -export type t_invoices_status_transitions = { +export type t_invoices_resource_status_transitions = { finalized_at?: number | null marked_uncollectible_at?: number | null paid_at?: number | null @@ -2583,6 +3175,7 @@ export type t_issuing_authorization = { pending_request?: t_issuing_authorization_pending_request | null request_history: t_issuing_authorization_request[] status: "closed" | "pending" | "reversed" + token?: string | t_issuing_token | null transactions: t_issuing_transaction[] treasury?: t_issuing_authorization_treasury | null verification_data: t_issuing_authorization_verification_data @@ -2607,6 +3200,7 @@ export type t_issuing_card = { } number?: string object: "issuing.card" + personalization_design?: string | t_issuing_personalization_design | null replaced_by?: string | t_issuing_card | null replacement_for?: string | t_issuing_card | null replacement_reason?: "damaged" | "expired" | "lost" | "stolen" | null @@ -2655,6 +3249,34 @@ export type t_issuing_dispute = { treasury?: t_issuing_dispute_treasury | null } +export type t_issuing_personalization_design = { + card_logo?: string | t_file | null + carrier_text?: t_issuing_personalization_design_carrier_text | null + created: number + id: string + livemode: boolean + lookup_key?: string | null + metadata: { + [key: string]: string | undefined + } + name?: string | null + object: "issuing.personalization_design" + physical_bundle: string | t_issuing_physical_bundle + preferences: t_issuing_personalization_design_preferences + rejection_reasons: t_issuing_personalization_design_rejection_reasons + status: "active" | "inactive" | "rejected" | "review" +} + +export type t_issuing_physical_bundle = { + features?: t_issuing_physical_bundle_features + id: string + livemode: boolean + name: string + object: "issuing.physical_bundle" + status: "active" | "inactive" | "review" + type: "custom" | "standard" +} + export type t_issuing_settlement = { bin: string clearing_date: number @@ -2676,6 +3298,21 @@ export type t_issuing_settlement = { transaction_volume: number } +export type t_issuing_token = { + card: string | t_issuing_card + created: number + device_fingerprint?: string | null + id: string + last4?: string + livemode: boolean + network: "mastercard" | "visa" + network_data?: t_issuing_network_token_network_data + network_updated_at: number + object: "issuing.token" + status: "active" | "deleted" | "requested" | "suspended" + wallet_provider?: "apple_pay" | "google_pay" | "samsung_pay" +} + export type t_issuing_transaction = { amount: number amount_details?: t_issuing_transaction_amount_details | null @@ -2694,8 +3331,10 @@ export type t_issuing_transaction = { metadata: { [key: string]: string | undefined } + network_data?: t_issuing_transaction_network_data | null object: "issuing.transaction" purchase_details?: t_issuing_transaction_purchase_details | null + token?: string | t_issuing_token | null treasury?: t_issuing_transaction_treasury | null type: "capture" | "refund" wallet?: "apple_pay" | "google_pay" | "samsung_pay" | null @@ -2706,6 +3345,11 @@ export type t_issuing_authorization_amount_details = { cashback_amount?: number | null } +export type t_issuing_authorization_authentication_exemption = { + claimed_by: "acquirer" | "issuer" + type: "low_value_transaction" | "transaction_risk_analysis" | "unknown" +} + export type t_issuing_authorization_merchant_data = { category: string category_code: string @@ -2716,10 +3360,13 @@ export type t_issuing_authorization_merchant_data = { postal_code?: string | null state?: string | null terminal_id?: string | null + url?: string | null } export type t_issuing_authorization_network_data = { acquiring_institution_id?: string | null + system_trace_audit_number?: string | null + transaction_id?: string | null } export type t_issuing_authorization_pending_request = { @@ -2729,16 +3376,19 @@ export type t_issuing_authorization_pending_request = { is_amount_controllable: boolean merchant_amount: number merchant_currency: string + network_risk_score?: number | null } export type t_issuing_authorization_request = { amount: number amount_details?: t_issuing_authorization_amount_details | null approved: boolean + authorization_code?: string | null created: number currency: string merchant_amount: number merchant_currency: string + network_risk_score?: number | null reason: | "account_disabled" | "card_active" @@ -2755,6 +3405,11 @@ export type t_issuing_authorization_request = { | "webhook_error" | "webhook_timeout" reason_message?: string | null + requested_at?: number | null +} + +export type t_issuing_authorization_three_d_secure = { + result: "attempt_acknowledged" | "authenticated" | "failed" | "required" } export type t_issuing_authorization_treasury = { @@ -2766,8 +3421,11 @@ export type t_issuing_authorization_treasury = { export type t_issuing_authorization_verification_data = { address_line1_check: "match" | "mismatch" | "not_provided" address_postal_code_check: "match" | "mismatch" | "not_provided" + authentication_exemption?: t_issuing_authorization_authentication_exemption | null cvc_check: "match" | "mismatch" | "not_provided" expiry_check: "match" | "mismatch" | "not_provided" + postal_code?: string | null + three_d_secure?: t_issuing_authorization_three_d_secure | null } export type t_issuing_card_apple_pay = { @@ -3079,6 +3737,7 @@ export type t_issuing_card_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + allowed_merchant_countries?: string[] | null blocked_categories?: | ( | "ac_refrigeration_repair" @@ -3378,6 +4037,7 @@ export type t_issuing_card_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + blocked_merchant_countries?: string[] | null spending_limits?: t_issuing_card_spending_limit[] | null spending_limits_currency?: string | null } @@ -4037,6 +4697,7 @@ export type t_issuing_cardholder_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + allowed_merchant_countries?: string[] | null blocked_categories?: | ( | "ac_refrigeration_repair" @@ -4336,6 +4997,7 @@ export type t_issuing_cardholder_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + blocked_merchant_countries?: string[] | null spending_limits?: t_issuing_cardholder_spending_limit[] | null spending_limits_currency?: string | null } @@ -4791,6 +5453,128 @@ export type t_issuing_dispute_treasury = { received_debit: string } +export type t_issuing_network_token_address = { + line1: string + postal_code: string +} + +export type t_issuing_network_token_device = { + device_fingerprint?: string + ip_address?: string + location?: string + name?: string + phone_number?: string + type?: "other" | "phone" | "watch" +} + +export type t_issuing_network_token_mastercard = { + card_reference_id?: string + token_reference_id: string + token_requestor_id: string + token_requestor_name?: string +} + +export type t_issuing_network_token_network_data = { + device?: t_issuing_network_token_device + mastercard?: t_issuing_network_token_mastercard + type: "mastercard" | "visa" + visa?: t_issuing_network_token_visa + wallet_provider?: t_issuing_network_token_wallet_provider +} + +export type t_issuing_network_token_visa = { + card_reference_id: string + token_reference_id: string + token_requestor_id: string + token_risk_score?: string +} + +export type t_issuing_network_token_wallet_provider = { + account_id?: string + account_trust_score?: number + card_number_source?: "app" | "manual" | "on_file" | "other" + cardholder_address?: t_issuing_network_token_address + cardholder_name?: string + device_trust_score?: number + hashed_account_email_address?: string + reason_codes?: ( + | "account_card_too_new" + | "account_recently_changed" + | "account_too_new" + | "account_too_new_since_launch" + | "additional_device" + | "data_expired" + | "defer_id_v_decision" + | "device_recently_lost" + | "good_activity_history" + | "has_suspended_tokens" + | "high_risk" + | "inactive_account" + | "long_account_tenure" + | "low_account_score" + | "low_device_score" + | "low_phone_number_score" + | "network_service_error" + | "outside_home_territory" + | "provisioning_cardholder_mismatch" + | "provisioning_device_and_cardholder_mismatch" + | "provisioning_device_mismatch" + | "same_device_no_prior_authentication" + | "same_device_successful_prior_authentication" + | "software_update" + | "suspicious_activity" + | "too_many_different_cardholders" + | "too_many_recent_attempts" + | "too_many_recent_tokens" + )[] + suggested_decision?: "approve" | "decline" | "require_auth" + suggested_decision_version?: string +} + +export type t_issuing_personalization_design_carrier_text = { + footer_body?: string | null + footer_title?: string | null + header_body?: string | null + header_title?: string | null +} + +export type t_issuing_personalization_design_preferences = { + is_default: boolean + is_platform_default?: boolean | null +} + +export type t_issuing_personalization_design_rejection_reasons = { + card_logo?: + | ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_binary_image" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + | null + carrier_text?: + | ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + | null +} + +export type t_issuing_physical_bundle_features = { + card_logo: "optional" | "required" | "unsupported" + carrier_text: "optional" | "required" | "unsupported" + second_line: "optional" | "required" | "unsupported" +} + export type t_issuing_transaction_amount_details = { atm_fee?: number | null cashback_amount?: number | null @@ -4825,6 +5609,12 @@ export type t_issuing_transaction_lodging_data = { nights?: number | null } +export type t_issuing_transaction_network_data = { + authorization_code?: string | null + processing_date?: string | null + transaction_id?: string | null +} + export type t_issuing_transaction_purchase_details = { flight?: t_issuing_transaction_flight_data | null fuel?: t_issuing_transaction_fuel_data | null @@ -4890,6 +5680,7 @@ export type t_legal_entity_company = { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -4958,8 +5749,9 @@ export type t_line_item = { description?: string | null discount_amounts?: t_discounts_resource_discount_amount[] | null discountable: boolean - discounts?: (string | t_discount)[] | null + discounts: (string | t_discount)[] id: string + invoice?: string | null invoice_item?: string | t_invoiceitem livemode: boolean metadata: { @@ -5009,7 +5801,7 @@ export type t_line_items_tax_amount = { export type t_linked_account_options_us_bank_account = { permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: "balances"[] | null + prefetch?: ("balances" | "transactions")[] | null return_url?: string } @@ -5047,6 +5839,13 @@ export type t_mandate_au_becs_debit = { export type t_mandate_bacs_debit = { network_status: "accepted" | "pending" | "refused" | "revoked" reference: string + revocation_reason?: + | "account_closed" + | "bank_account_restricted" + | "bank_ownership_changed" + | "could_not_process" + | "debit_not_authorized" + | null url: string } @@ -5084,7 +5883,9 @@ export type t_mandate_single_use = { currency: string } -export type t_mandate_us_bank_account = EmptyObject +export type t_mandate_us_bank_account = { + collection_method?: "paper" +} export type t_networks = { available: string[] @@ -5126,6 +5927,7 @@ export type t_outbound_payments_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" | "us_domestic_wire" routing_number?: string | null } @@ -5142,6 +5944,7 @@ export type t_outbound_transfers_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" | "us_domestic_wire" routing_number?: string | null } @@ -5184,6 +5987,27 @@ export type t_payment_flows_private_payment_methods_alipay_details = { transaction_id?: string | null } +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization = + { + status: "disabled" | "enabled" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization = + { + status: "available" | "unavailable" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture = + { + maximum_amount_capturable: number + status: "available" | "unavailable" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_multicapture = + { + status: "available" | "unavailable" + } + export type t_payment_flows_private_payment_methods_klarna_dob = { day?: number | null month?: number | null @@ -5265,6 +6089,7 @@ export type t_payment_intent_next_action = { pix_display_qr_code?: t_payment_intent_next_action_pix_display_qr_code promptpay_display_qr_code?: t_payment_intent_next_action_promptpay_display_qr_code redirect_to_url?: t_payment_intent_next_action_redirect_to_url + swish_handle_redirect_or_display_qr_code?: t_payment_intent_next_action_swish_handle_redirect_or_display_qr_code type: string use_stripe_sdk?: EmptyObject verify_with_microdeposits?: t_payment_intent_next_action_verify_with_microdeposits @@ -5385,6 +6210,18 @@ export type t_payment_intent_next_action_redirect_to_url = { url?: string | null } +export type t_payment_intent_next_action_swish_handle_redirect_or_display_qr_code = + { + hosted_instructions_url: string + qr_code: t_payment_intent_next_action_swish_qr_code + } + +export type t_payment_intent_next_action_swish_qr_code = { + data: string + image_url_png: string + image_url_svg: string +} + export type t_payment_intent_next_action_verify_with_microdeposits = { arrival_date: number hosted_verification_url: string @@ -5480,6 +6317,9 @@ export type t_payment_intent_payment_method_options = { link?: | t_payment_intent_payment_method_options_link | t_payment_intent_type_specific_payment_method_options_client + mobilepay?: + | t_payment_intent_payment_method_options_mobilepay + | t_payment_intent_type_specific_payment_method_options_client oxxo?: | t_payment_method_options_oxxo | t_payment_intent_type_specific_payment_method_options_client @@ -5498,12 +6338,18 @@ export type t_payment_intent_payment_method_options = { promptpay?: | t_payment_method_options_promptpay | t_payment_intent_type_specific_payment_method_options_client + revolut_pay?: + | t_payment_method_options_revolut_pay + | t_payment_intent_type_specific_payment_method_options_client sepa_debit?: | t_payment_intent_payment_method_options_sepa_debit | t_payment_intent_type_specific_payment_method_options_client sofort?: | t_payment_method_options_sofort | t_payment_intent_type_specific_payment_method_options_client + swish?: + | t_payment_intent_payment_method_options_swish + | t_payment_intent_type_specific_payment_method_options_client us_bank_account?: | t_payment_intent_payment_method_options_us_bank_account | t_payment_intent_type_specific_payment_method_options_client @@ -5525,7 +6371,9 @@ export type t_payment_intent_payment_method_options_au_becs_debit = { setup_future_usage?: "none" | "off_session" | "on_session" } -export type t_payment_intent_payment_method_options_blik = EmptyObject +export type t_payment_intent_payment_method_options_blik = { + setup_future_usage?: "none" +} export type t_payment_intent_payment_method_options_card = { capture_method?: "manual" @@ -5544,7 +6392,12 @@ export type t_payment_intent_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | "challenge_only" | null + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" | null + require_cvc_recollection?: boolean setup_future_usage?: "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -5570,13 +6423,24 @@ export type t_payment_intent_payment_method_options_mandate_options_acss_debit = export type t_payment_intent_payment_method_options_mandate_options_sepa_debit = EmptyObject +export type t_payment_intent_payment_method_options_mobilepay = { + capture_method?: "manual" + setup_future_usage?: "none" +} + export type t_payment_intent_payment_method_options_sepa_debit = { mandate_options?: t_payment_intent_payment_method_options_mandate_options_sepa_debit setup_future_usage?: "none" | "off_session" | "on_session" } +export type t_payment_intent_payment_method_options_swish = { + reference?: string | null + setup_future_usage?: "none" +} + export type t_payment_intent_payment_method_options_us_bank_account = { financial_connections?: t_linked_account_options_us_bank_account + mandate_options?: t_payment_method_options_us_bank_account_mandate_options preferred_settlement_speed?: "fastest" | "standard" setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" | "microdeposits" @@ -5595,6 +6459,7 @@ export type t_payment_intent_processing_customer_notification = { export type t_payment_intent_type_specific_payment_method_options_client = { capture_method?: "manual" | "manual_preferred" installments?: t_payment_flows_installment_options + require_cvc_recollection?: boolean setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" | "microdeposits" } @@ -5614,6 +6479,7 @@ export type t_payment_link = { custom_text: t_payment_links_resource_custom_text customer_creation: "always" | "if_required" id: string + inactive_message?: string | null invoice_creation?: t_payment_links_resource_invoice_creation | null line_items?: { data: t_item[] @@ -5657,11 +6523,13 @@ export type t_payment_link = { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] | null phone_number_collection: t_payment_links_resource_phone_number_collection + restrictions?: t_payment_links_resource_restrictions | null shipping_address_collection?: t_payment_links_resource_shipping_address_collection | null shipping_options: t_payment_links_resource_shipping_option[] submit_type: "auto" | "book" | "donate" | "pay" @@ -5679,6 +6547,12 @@ export type t_payment_links_resource_after_completion = { export type t_payment_links_resource_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null +} + +export type t_payment_links_resource_completed_sessions = { + count: number + limit: number } export type t_payment_links_resource_completion_behavior_confirmation_page = { @@ -5690,17 +6564,18 @@ export type t_payment_links_resource_completion_behavior_redirect = { } export type t_payment_links_resource_consent_collection = { + payment_method_reuse_agreement?: t_payment_links_resource_payment_method_reuse_agreement | null promotions?: "auto" | "none" | null terms_of_service?: "none" | "required" | null } export type t_payment_links_resource_custom_fields = { - dropdown?: t_payment_links_resource_custom_fields_dropdown | null + dropdown?: t_payment_links_resource_custom_fields_dropdown key: string label: t_payment_links_resource_custom_fields_label - numeric?: t_payment_links_resource_custom_fields_numeric | null + numeric?: t_payment_links_resource_custom_fields_numeric optional: boolean - text?: t_payment_links_resource_custom_fields_text | null + text?: t_payment_links_resource_custom_fields_text type: "dropdown" | "numeric" | "text" } @@ -5729,6 +6604,7 @@ export type t_payment_links_resource_custom_fields_text = { } export type t_payment_links_resource_custom_text = { + after_submit?: t_payment_links_resource_custom_text_position | null shipping_address?: t_payment_links_resource_custom_text_position | null submit?: t_payment_links_resource_custom_text_position | null terms_of_service_acceptance?: t_payment_links_resource_custom_text_position | null @@ -5748,6 +6624,7 @@ export type t_payment_links_resource_invoice_settings = { custom_fields?: t_invoice_setting_custom_field[] | null description?: string | null footer?: string | null + issuer?: t_connect_account_reference | null metadata?: { [key: string]: string | undefined } | null @@ -5756,13 +6633,28 @@ export type t_payment_links_resource_invoice_settings = { export type t_payment_links_resource_payment_intent_data = { capture_method?: "automatic" | "automatic_async" | "manual" | null + description?: string | null + metadata: { + [key: string]: string | undefined + } setup_future_usage?: "off_session" | "on_session" | null + statement_descriptor?: string | null + statement_descriptor_suffix?: string | null + transfer_group?: string | null +} + +export type t_payment_links_resource_payment_method_reuse_agreement = { + position: "auto" | "hidden" } export type t_payment_links_resource_phone_number_collection = { enabled: boolean } +export type t_payment_links_resource_restrictions = { + completed_sessions: t_payment_links_resource_completed_sessions +} + export type t_payment_links_resource_shipping_address_collection = { allowed_countries: ( | "AC" @@ -6012,7 +6904,16 @@ export type t_payment_links_resource_shipping_option = { export type t_payment_links_resource_subscription_data = { description?: string | null + invoice_settings: t_payment_links_resource_subscription_data_invoice_settings + metadata: { + [key: string]: string | undefined + } trial_period_days?: number | null + trial_settings?: t_subscriptions_trials_resource_trial_settings | null +} + +export type t_payment_links_resource_subscription_data_invoice_settings = { + issuer: t_connect_account_reference } export type t_payment_links_resource_tax_id_collection = { @@ -6055,6 +6956,7 @@ export type t_payment_method = { metadata?: { [key: string]: string | undefined } | null + mobilepay?: t_payment_method_mobilepay object: "payment_method" oxxo?: t_payment_method_oxxo p24?: t_payment_method_p24 @@ -6063,8 +6965,10 @@ export type t_payment_method = { pix?: t_payment_method_pix promptpay?: t_payment_method_promptpay radar_options?: t_radar_radar_options + revolut_pay?: t_payment_method_revolut_pay sepa_debit?: t_payment_method_sepa_debit sofort?: t_payment_method_sofort + swish?: t_payment_method_swish type: | "acss_debit" | "affirm" @@ -6088,14 +6992,17 @@ export type t_payment_method = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -6140,6 +7047,7 @@ export type t_payment_method_card = { brand: string checks?: t_payment_method_card_checks | null country?: string | null + display_brand?: string | null exp_month: number exp_year: number fingerprint?: string | null @@ -6267,13 +7175,13 @@ export type t_payment_method_configuration = { card?: t_payment_method_config_resource_payment_method_properties cartes_bancaires?: t_payment_method_config_resource_payment_method_properties cashapp?: t_payment_method_config_resource_payment_method_properties + customer_balance?: t_payment_method_config_resource_payment_method_properties eps?: t_payment_method_config_resource_payment_method_properties fpx?: t_payment_method_config_resource_payment_method_properties giropay?: t_payment_method_config_resource_payment_method_properties google_pay?: t_payment_method_config_resource_payment_method_properties grabpay?: t_payment_method_config_resource_payment_method_properties id: string - id_bank_transfer?: t_payment_method_config_resource_payment_method_properties ideal?: t_payment_method_config_resource_payment_method_properties is_default: boolean jcb?: t_payment_method_config_resource_payment_method_properties @@ -6281,22 +7189,20 @@ export type t_payment_method_configuration = { konbini?: t_payment_method_config_resource_payment_method_properties link?: t_payment_method_config_resource_payment_method_properties livemode: boolean - multibanco?: t_payment_method_config_resource_payment_method_properties name: string - netbanking?: t_payment_method_config_resource_payment_method_properties object: "payment_method_configuration" oxxo?: t_payment_method_config_resource_payment_method_properties p24?: t_payment_method_config_resource_payment_method_properties parent?: string | null - pay_by_bank?: t_payment_method_config_resource_payment_method_properties paynow?: t_payment_method_config_resource_payment_method_properties paypal?: t_payment_method_config_resource_payment_method_properties promptpay?: t_payment_method_config_resource_payment_method_properties + revolut_pay?: t_payment_method_config_resource_payment_method_properties sepa_debit?: t_payment_method_config_resource_payment_method_properties sofort?: t_payment_method_config_resource_payment_method_properties - upi?: t_payment_method_config_resource_payment_method_properties us_bank_account?: t_payment_method_config_resource_payment_method_properties wechat_pay?: t_payment_method_config_resource_payment_method_properties + zip?: t_payment_method_config_resource_payment_method_properties } export type t_payment_method_customer_balance = EmptyObject @@ -6326,6 +7232,7 @@ export type t_payment_method_details = { klarna?: t_payment_method_details_klarna konbini?: t_payment_method_details_konbini link?: t_payment_method_details_link + mobilepay?: t_payment_method_details_mobilepay multibanco?: t_payment_method_details_multibanco oxxo?: t_payment_method_details_oxxo p24?: t_payment_method_details_p24 @@ -6333,9 +7240,11 @@ export type t_payment_method_details = { paypal?: t_payment_method_details_paypal pix?: t_payment_method_details_pix promptpay?: t_payment_method_details_promptpay + revolut_pay?: t_payment_method_details_revolut_pay sepa_debit?: t_payment_method_details_sepa_debit sofort?: t_payment_method_details_sofort stripe_account?: t_payment_method_details_stripe_account + swish?: t_payment_method_details_swish type: string us_bank_account?: t_payment_method_details_us_bank_account wechat?: t_payment_method_details_wechat @@ -6407,18 +7316,24 @@ export type t_payment_method_details_boleto = { } export type t_payment_method_details_card = { + amount_authorized?: number | null brand?: string | null + capture_before?: number checks?: t_payment_method_details_card_checks | null country?: string | null exp_month: number exp_year: number + extended_authorization?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization fingerprint?: string | null funding?: string | null + incremental_authorization?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization installments?: t_payment_method_details_card_installments | null last4?: string | null mandate?: string | null + multicapture?: t_payment_flows_private_payment_methods_card_details_api_resource_multicapture network?: string | null network_token?: t_payment_method_details_card_network_token | null + overcapture?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture three_d_secure?: t_three_d_secure_details_charge | null wallet?: t_payment_method_details_card_wallet | null } @@ -6458,6 +7373,7 @@ export type t_payment_method_details_card_present = { incremental_authorization_supported: boolean last4?: string | null network?: string | null + offline?: t_payment_method_details_card_present_offline | null overcapture_supported: boolean read_method?: | "contact_emv" @@ -6469,6 +7385,10 @@ export type t_payment_method_details_card_present = { receipt?: t_payment_method_details_card_present_receipt | null } +export type t_payment_method_details_card_present_offline = { + stored_at?: number | null +} + export type t_payment_method_details_card_present_receipt = { account_type?: "checking" | "credit" | "prepaid" | "unknown" application_cryptogram?: string | null @@ -6614,6 +7534,7 @@ export type t_payment_method_details_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -6632,6 +7553,7 @@ export type t_payment_method_details_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -6698,6 +7620,10 @@ export type t_payment_method_details_link = { country?: string | null } +export type t_payment_method_details_mobilepay = { + card?: t_internal_card | null +} + export type t_payment_method_details_multibanco = { entity?: string | null reference?: string | null @@ -6733,6 +7659,7 @@ export type t_payment_method_details_p24 = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" | null reference?: string | null @@ -6759,6 +7686,8 @@ export type t_payment_method_details_promptpay = { reference?: string | null } +export type t_payment_method_details_revolut_pay = EmptyObject + export type t_payment_method_details_sepa_debit = { bank_code?: string | null branch_code?: string | null @@ -6782,12 +7711,20 @@ export type t_payment_method_details_sofort = { export type t_payment_method_details_stripe_account = EmptyObject +export type t_payment_method_details_swish = { + fingerprint?: string | null + payment_reference?: string | null + verified_phone_last4?: string | null +} + export type t_payment_method_details_us_bank_account = { account_holder_type?: "company" | "individual" | null account_type?: "checking" | "savings" | null bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate + payment_reference?: string | null routing_number?: string | null } @@ -6895,6 +7832,7 @@ export type t_payment_method_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -6913,6 +7851,7 @@ export type t_payment_method_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -6953,6 +7892,8 @@ export type t_payment_method_link = { email?: string | null } +export type t_payment_method_mobilepay = EmptyObject + export type t_payment_method_options_affirm = { capture_method?: "manual" preferred_locale?: string @@ -7103,11 +8044,17 @@ export type t_payment_method_options_promptpay = { setup_future_usage?: "none" } +export type t_payment_method_options_revolut_pay = EmptyObject + export type t_payment_method_options_sofort = { preferred_language?: "de" | "en" | "es" | "fr" | "it" | "nl" | "pl" | null setup_future_usage?: "none" | "off_session" } +export type t_payment_method_options_us_bank_account_mandate_options = { + collection_method?: "paper" +} + export type t_payment_method_options_wechat_pay = { app_id?: string | null client?: "android" | "ios" | "web" | null @@ -7146,6 +8093,7 @@ export type t_payment_method_p24 = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" | null } @@ -7161,6 +8109,8 @@ export type t_payment_method_pix = EmptyObject export type t_payment_method_promptpay = EmptyObject +export type t_payment_method_revolut_pay = EmptyObject + export type t_payment_method_sepa_debit = { bank_code?: string | null branch_code?: string | null @@ -7174,6 +8124,8 @@ export type t_payment_method_sofort = { country?: string | null } +export type t_payment_method_swish = EmptyObject + export type t_payment_method_us_bank_account = { account_holder_type?: "company" | "individual" | null account_type?: "checking" | "savings" | null @@ -7232,6 +8184,7 @@ export type t_payment_pages_checkout_session_after_expiration_recovery = { export type t_payment_pages_checkout_session_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } @@ -7241,6 +8194,7 @@ export type t_payment_pages_checkout_session_consent = { } export type t_payment_pages_checkout_session_consent_collection = { + payment_method_reuse_agreement?: t_payment_pages_checkout_session_payment_method_reuse_agreement | null promotions?: "auto" | "none" | null terms_of_service?: "none" | "required" | null } @@ -7253,12 +8207,12 @@ export type t_payment_pages_checkout_session_currency_conversion = { } export type t_payment_pages_checkout_session_custom_fields = { - dropdown?: t_payment_pages_checkout_session_custom_fields_dropdown | null + dropdown?: t_payment_pages_checkout_session_custom_fields_dropdown key: string label: t_payment_pages_checkout_session_custom_fields_label - numeric?: t_payment_pages_checkout_session_custom_fields_numeric | null + numeric?: t_payment_pages_checkout_session_custom_fields_numeric optional: boolean - text?: t_payment_pages_checkout_session_custom_fields_text | null + text?: t_payment_pages_checkout_session_custom_fields_text type: "dropdown" | "numeric" | "text" } @@ -7290,6 +8244,7 @@ export type t_payment_pages_checkout_session_custom_fields_text = { } export type t_payment_pages_checkout_session_custom_text = { + after_submit?: t_payment_pages_checkout_session_custom_text_position | null shipping_address?: t_payment_pages_checkout_session_custom_text_position | null submit?: t_payment_pages_checkout_session_custom_text_position | null terms_of_service_acceptance?: t_payment_pages_checkout_session_custom_text_position | null @@ -7318,12 +8273,17 @@ export type t_payment_pages_checkout_session_invoice_settings = { custom_fields?: t_invoice_setting_custom_field[] | null description?: string | null footer?: string | null + issuer?: t_connect_account_reference | null metadata?: { [key: string]: string | undefined } | null rendering_options?: t_invoice_setting_rendering_options | null } +export type t_payment_pages_checkout_session_payment_method_reuse_agreement = { + position: "auto" | "hidden" +} + export type t_payment_pages_checkout_session_phone_number_collection = { enabled: boolean } @@ -7630,6 +8590,7 @@ export type t_payment_pages_checkout_session_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -7720,6 +8681,7 @@ export type t_period = { export type t_person = { account: string + additional_tos_acceptances?: t_person_additional_tos_acceptances address?: t_address address_kana?: t_legal_entity_japan_address | null address_kanji?: t_legal_entity_japan_address | null @@ -7753,6 +8715,16 @@ export type t_person = { verification?: t_legal_entity_person_verification } +export type t_person_additional_tos_acceptance = { + date?: number | null + ip?: string | null + user_agent?: string | null +} + +export type t_person_additional_tos_acceptances = { + account: t_person_additional_tos_acceptance +} + export type t_person_future_requirements = { alternatives?: t_account_requirements_alternative[] | null currently_due: string[] @@ -7765,6 +8737,7 @@ export type t_person_future_requirements = { export type t_person_relationship = { director?: boolean | null executive?: boolean | null + legal_guardian?: boolean | null owner?: boolean | null percent_ownership?: number | null representative?: boolean | null @@ -7795,6 +8768,7 @@ export type t_plan = { metadata?: { [key: string]: string | undefined } | null + meter?: string | null nickname?: string | null object: "plan" product?: string | t_product | t_deleted_product | null @@ -7844,7 +8818,6 @@ export type t_portal_features = { invoice_history: t_portal_invoice_list payment_method_update: t_portal_payment_method_update subscription_cancel: t_portal_subscription_cancel - subscription_pause: t_portal_subscription_pause subscription_update: t_portal_subscription_update } @@ -7943,10 +8916,6 @@ export type t_portal_subscription_cancellation_reason = { )[] } -export type t_portal_subscription_pause = { - enabled: boolean -} - export type t_portal_subscription_update = { default_allowed_updates: ("price" | "promotion_code" | "quantity")[] enabled: boolean @@ -8000,7 +8969,7 @@ export type t_product = { created: number default_price?: string | t_price | null description?: string | null - features: t_product_feature[] + features: t_product_marketing_feature[] id: string images: string[] livemode: boolean @@ -8018,8 +8987,8 @@ export type t_product = { url?: string | null } -export type t_product_feature = { - name: string +export type t_product_marketing_feature = { + name?: string } export type t_promotion_code = { @@ -8074,7 +9043,7 @@ export type t_quote = { header?: string | null id: string invoice?: string | t_invoice | t_deleted_invoice | null - invoice_settings?: t_invoice_setting_quote_setting | null + invoice_settings: t_invoice_setting_quote_setting line_items?: { data: t_item[] has_more: boolean @@ -8100,6 +9069,7 @@ export type t_quote = { export type t_quotes_resource_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } @@ -8130,6 +9100,9 @@ export type t_quotes_resource_status_transitions = { export type t_quotes_resource_subscription_data_subscription_data = { description?: string | null effective_date?: number | null + metadata?: { + [key: string]: string | undefined + } | null trial_period_days?: number | null } @@ -8242,6 +9215,7 @@ export type t_recurring = { aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" | null interval: "day" | "month" | "week" | "year" interval_count: number + meter?: string | null usage_type: "licensed" | "metered" } @@ -8252,6 +9226,7 @@ export type t_refund = { created: number currency: string description?: string + destination_details?: t_refund_destination_details failure_balance_transaction?: string | t_balance_transaction failure_reason?: string id: string @@ -8274,6 +9249,50 @@ export type t_refund = { transfer_reversal?: string | t_transfer_reversal | null } +export type t_refund_destination_details = { + affirm?: t_destination_details_unimplemented + afterpay_clearpay?: t_destination_details_unimplemented + alipay?: t_destination_details_unimplemented + au_bank_transfer?: t_destination_details_unimplemented + blik?: t_refund_destination_details_generic + br_bank_transfer?: t_refund_destination_details_generic + card?: t_refund_destination_details_card + cashapp?: t_destination_details_unimplemented + customer_cash_balance?: t_destination_details_unimplemented + eps?: t_destination_details_unimplemented + eu_bank_transfer?: t_refund_destination_details_generic + gb_bank_transfer?: t_refund_destination_details_generic + giropay?: t_destination_details_unimplemented + grabpay?: t_destination_details_unimplemented + jp_bank_transfer?: t_refund_destination_details_generic + klarna?: t_destination_details_unimplemented + mx_bank_transfer?: t_refund_destination_details_generic + p24?: t_refund_destination_details_generic + paynow?: t_destination_details_unimplemented + paypal?: t_destination_details_unimplemented + pix?: t_destination_details_unimplemented + revolut?: t_destination_details_unimplemented + sofort?: t_destination_details_unimplemented + swish?: t_refund_destination_details_generic + th_bank_transfer?: t_refund_destination_details_generic + type: string + us_bank_transfer?: t_refund_destination_details_generic + wechat_pay?: t_destination_details_unimplemented + zip?: t_destination_details_unimplemented +} + +export type t_refund_destination_details_card = { + reference?: string + reference_status?: string + reference_type?: string + type: "pending" | "refund" | "reversal" +} + +export type t_refund_destination_details_generic = { + reference?: string | null + reference_status?: string | null +} + export type t_refund_next_action = { display_details?: t_refund_next_action_display_details | null type: string @@ -8362,6 +9381,7 @@ export type t_scheduled_query_run = { export type t_schedules_phase_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_secret_service_resource_scope = { @@ -8432,7 +9452,7 @@ export type t_setup_attempt_payment_method_details_boleto = EmptyObject export type t_setup_attempt_payment_method_details_card = { brand?: string | null - checks?: t_payment_method_details_card_checks | null + checks?: t_setup_attempt_payment_method_details_card_checks | null country?: string | null exp_month?: number | null exp_year?: number | null @@ -8444,8 +9464,15 @@ export type t_setup_attempt_payment_method_details_card = { wallet?: t_setup_attempt_payment_method_details_card_wallet | null } +export type t_setup_attempt_payment_method_details_card_checks = { + address_line1_check?: string | null + address_postal_code_check?: string | null + cvc_check?: string | null +} + export type t_setup_attempt_payment_method_details_card_present = { generated_card?: string | t_payment_method | null + offline?: t_payment_method_details_card_present_offline | null } export type t_setup_attempt_payment_method_details_card_wallet = { @@ -8466,6 +9493,7 @@ export type t_setup_attempt_payment_method_details_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -8484,6 +9512,7 @@ export type t_setup_attempt_payment_method_details_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -8583,6 +9612,9 @@ export type t_setup_intent_payment_method_options = { | t_setup_intent_payment_method_options_acss_debit | t_setup_intent_type_specific_payment_method_options_client card?: t_setup_intent_payment_method_options_card + card_present?: + | t_setup_intent_payment_method_options_card_present + | t_setup_intent_type_specific_payment_method_options_client link?: | t_setup_intent_payment_method_options_link | t_setup_intent_type_specific_payment_method_options_client @@ -8618,7 +9650,7 @@ export type t_setup_intent_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | "challenge_only" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_setup_intent_payment_method_options_card_mandate_options = { @@ -8634,6 +9666,8 @@ export type t_setup_intent_payment_method_options_card_mandate_options = { supported_types?: "india"[] | null } +export type t_setup_intent_payment_method_options_card_present = EmptyObject + export type t_setup_intent_payment_method_options_link = EmptyObject export type t_setup_intent_payment_method_options_mandate_options_acss_debit = { @@ -8657,6 +9691,7 @@ export type t_setup_intent_payment_method_options_sepa_debit = { export type t_setup_intent_payment_method_options_us_bank_account = { financial_connections?: t_linked_account_options_us_bank_account + mandate_options?: t_payment_method_options_us_bank_account_mandate_options verification_method?: "automatic" | "instant" | "microdeposits" } @@ -9136,6 +10171,7 @@ export type t_subscription = { application_fee_percent?: number | null automatic_tax: t_subscription_automatic_tax billing_cycle_anchor: number + billing_cycle_anchor_config?: t_subscriptions_resource_billing_cycle_anchor_config | null billing_thresholds?: t_subscription_billing_thresholds | null cancel_at?: number | null cancel_at_period_end: boolean @@ -9153,6 +10189,7 @@ export type t_subscription = { default_tax_rates?: t_tax_rate[] | null description?: string | null discount?: t_discount | null + discounts: (string | t_discount)[] ended_at?: number | null id: string items: { @@ -9194,6 +10231,7 @@ export type t_subscription = { export type t_subscription_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_subscription_billing_thresholds = { @@ -9210,6 +10248,7 @@ export type t_subscription_details_data = { export type t_subscription_item = { billing_thresholds?: t_subscription_item_billing_thresholds | null created: number + discounts: (string | t_discount)[] id: string metadata: { [key: string]: string | undefined @@ -9240,7 +10279,7 @@ export type t_subscription_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_subscription_pending_invoice_item_interval = { @@ -9272,6 +10311,7 @@ export type t_subscription_schedule = { } export type t_subscription_schedule_add_invoice_item = { + discounts: t_discounts_resource_stackable_discount[] price: string | t_price | t_deleted_price quantity?: number | null tax_rates?: t_tax_rate[] | null @@ -9279,6 +10319,7 @@ export type t_subscription_schedule_add_invoice_item = { export type t_subscription_schedule_configuration_item = { billing_thresholds?: t_subscription_item_billing_thresholds | null + discounts: t_discounts_resource_stackable_discount[] metadata?: { [key: string]: string | undefined } | null @@ -9304,6 +10345,7 @@ export type t_subscription_schedule_phase_configuration = { default_payment_method?: string | t_payment_method | null default_tax_rates?: t_tax_rate[] | null description?: string | null + discounts: t_discounts_resource_stackable_discount[] end_date: number invoice_settings?: t_invoice_setting_subscription_schedule_phase_setting | null items: t_subscription_schedule_configuration_item[] @@ -9325,13 +10367,14 @@ export type t_subscription_schedules_resource_default_settings = { collection_method?: "charge_automatically" | "send_invoice" | null default_payment_method?: string | t_payment_method | null description?: string | null - invoice_settings?: t_invoice_setting_subscription_schedule_setting | null + invoice_settings: t_invoice_setting_subscription_schedule_setting on_behalf_of?: string | t_account | null transfer_data?: t_subscription_transfer_data | null } export type t_subscription_schedules_resource_default_settings_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_subscription_transfer_data = { @@ -9339,6 +10382,14 @@ export type t_subscription_transfer_data = { destination: string | t_account } +export type t_subscriptions_resource_billing_cycle_anchor_config = { + day_of_month: number + hour?: number | null + minute?: number | null + month?: number | null + second?: number | null +} + export type t_subscriptions_resource_pause_collection = { behavior: "keep_as_draft" | "mark_uncollectible" | "void" resumes_at?: number | null @@ -9350,6 +10401,7 @@ export type t_subscriptions_resource_payment_method_options = { card?: t_subscription_payment_method_options_card | null customer_balance?: t_invoice_payment_method_options_customer_balance | null konbini?: t_invoice_payment_method_options_konbini | null + sepa_debit?: t_invoice_payment_method_options_sepa_debit | null us_bank_account?: t_invoice_payment_method_options_us_bank_account | null } @@ -9367,12 +10419,14 @@ export type t_subscriptions_resource_payment_settings = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -9437,6 +10491,18 @@ export type t_tax_calculation_line_item = { tax_code: string } +export type t_tax_registration = { + active_from: number + country: string + country_options: t_tax_product_registrations_resource_country_options + created: number + expires_at?: number | null + id: string + livemode: boolean + object: "tax.registration" + status: "active" | "expired" | "scheduled" +} + export type t_tax_settings = { defaults: t_tax_product_resource_tax_settings_defaults head_office?: t_tax_product_resource_tax_settings_head_office | null @@ -9503,6 +10569,13 @@ export type t_tax_deducted_at_source = { tax_deduction_account_number: string } +export type t_tax_i_ds_owner = { + account?: string | t_account + application?: string | t_application + customer?: string | t_customer + type: "account" | "application" | "customer" | "self" +} + export type t_tax_id = { country?: string | null created: number @@ -9510,6 +10583,7 @@ export type t_tax_id = { id: string livemode: boolean object: "tax_id" + owner?: t_tax_i_ds_owner | null type: | "ad_nrt" | "ae_trn" @@ -9556,6 +10630,7 @@ export type t_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -9588,6 +10663,107 @@ export type t_tax_id_verification = { verified_name?: string | null } +export type t_tax_product_registrations_resource_country_options = { + ae?: t_tax_product_registrations_resource_country_options_default + at?: t_tax_product_registrations_resource_country_options_europe + au?: t_tax_product_registrations_resource_country_options_default + be?: t_tax_product_registrations_resource_country_options_europe + bg?: t_tax_product_registrations_resource_country_options_europe + ca?: t_tax_product_registrations_resource_country_options_canada + ch?: t_tax_product_registrations_resource_country_options_default + cl?: t_tax_product_registrations_resource_country_options_simplified + co?: t_tax_product_registrations_resource_country_options_simplified + cy?: t_tax_product_registrations_resource_country_options_europe + cz?: t_tax_product_registrations_resource_country_options_europe + de?: t_tax_product_registrations_resource_country_options_europe + dk?: t_tax_product_registrations_resource_country_options_europe + ee?: t_tax_product_registrations_resource_country_options_europe + es?: t_tax_product_registrations_resource_country_options_europe + fi?: t_tax_product_registrations_resource_country_options_europe + fr?: t_tax_product_registrations_resource_country_options_europe + gb?: t_tax_product_registrations_resource_country_options_default + gr?: t_tax_product_registrations_resource_country_options_europe + hr?: t_tax_product_registrations_resource_country_options_europe + hu?: t_tax_product_registrations_resource_country_options_europe + id?: t_tax_product_registrations_resource_country_options_simplified + ie?: t_tax_product_registrations_resource_country_options_europe + is?: t_tax_product_registrations_resource_country_options_default + it?: t_tax_product_registrations_resource_country_options_europe + jp?: t_tax_product_registrations_resource_country_options_default + kr?: t_tax_product_registrations_resource_country_options_simplified + lt?: t_tax_product_registrations_resource_country_options_europe + lu?: t_tax_product_registrations_resource_country_options_europe + lv?: t_tax_product_registrations_resource_country_options_europe + mt?: t_tax_product_registrations_resource_country_options_europe + mx?: t_tax_product_registrations_resource_country_options_simplified + my?: t_tax_product_registrations_resource_country_options_simplified + nl?: t_tax_product_registrations_resource_country_options_europe + no?: t_tax_product_registrations_resource_country_options_default + nz?: t_tax_product_registrations_resource_country_options_default + pl?: t_tax_product_registrations_resource_country_options_europe + pt?: t_tax_product_registrations_resource_country_options_europe + ro?: t_tax_product_registrations_resource_country_options_europe + sa?: t_tax_product_registrations_resource_country_options_simplified + se?: t_tax_product_registrations_resource_country_options_europe + sg?: t_tax_product_registrations_resource_country_options_default + si?: t_tax_product_registrations_resource_country_options_europe + sk?: t_tax_product_registrations_resource_country_options_europe + th?: t_tax_product_registrations_resource_country_options_simplified + tr?: t_tax_product_registrations_resource_country_options_simplified + us?: t_tax_product_registrations_resource_country_options_united_states + vn?: t_tax_product_registrations_resource_country_options_simplified + za?: t_tax_product_registrations_resource_country_options_default +} + +export type t_tax_product_registrations_resource_country_options_ca_province_standard = + { + province: string + } + +export type t_tax_product_registrations_resource_country_options_canada = { + province_standard?: t_tax_product_registrations_resource_country_options_ca_province_standard + type: "province_standard" | "simplified" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_default = { + type: "standard" +} + +export type t_tax_product_registrations_resource_country_options_eu_standard = { + place_of_supply_scheme: "small_seller" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_europe = { + standard?: t_tax_product_registrations_resource_country_options_eu_standard + type: "ioss" | "oss_non_union" | "oss_union" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_simplified = { + type: "simplified" +} + +export type t_tax_product_registrations_resource_country_options_united_states = + { + local_amusement_tax?: t_tax_product_registrations_resource_country_options_us_local_amusement_tax + local_lease_tax?: t_tax_product_registrations_resource_country_options_us_local_lease_tax + state: string + type: + | "local_amusement_tax" + | "local_lease_tax" + | "state_communications_tax" + | "state_sales_tax" + } + +export type t_tax_product_registrations_resource_country_options_us_local_amusement_tax = + { + jurisdiction: string + } + +export type t_tax_product_registrations_resource_country_options_us_local_lease_tax = + { + jurisdiction: string + } + export type t_tax_product_resource_customer_details = { address?: t_tax_product_resource_postal_address | null address_source?: "billing" | "shipping" | null @@ -9643,6 +10819,7 @@ export type t_tax_product_resource_customer_details_resource_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -9827,6 +11004,14 @@ export type t_tax_rate = { id: string inclusive: boolean jurisdiction?: string | null + jurisdiction_level?: + | "city" + | "country" + | "county" + | "district" + | "multiple" + | "state" + | null livemode: boolean metadata?: { [key: string]: string | undefined @@ -9846,7 +11031,6 @@ export type t_tax_rate = { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" | null } @@ -9856,7 +11040,9 @@ export type t_terminal_configuration = { id: string is_account_default?: boolean | null livemode: boolean + name?: string | null object: "terminal.configuration" + offline?: t_terminal_configuration_configuration_resource_offline_config tipping?: t_terminal_configuration_configuration_resource_tipping verifone_p400?: t_terminal_configuration_configuration_resource_device_type_specific_config } @@ -9886,6 +11072,7 @@ export type t_terminal_reader = { | "bbpos_chipper2x" | "bbpos_wisepad3" | "bbpos_wisepos_e" + | "mobile_phone_reader" | "simulated_wisepos_e" | "stripe_m2" | "verifone_P400" @@ -9899,7 +11086,7 @@ export type t_terminal_reader = { } object: "terminal.reader" serial_number: string - status?: string | null + status?: "offline" | "online" | null } export type t_terminal_configuration_configuration_resource_currency_specific_config = @@ -9914,6 +11101,10 @@ export type t_terminal_configuration_configuration_resource_device_type_specific splashscreen?: string | t_file } +export type t_terminal_configuration_configuration_resource_offline_config = { + enabled?: boolean | null +} + export type t_terminal_configuration_configuration_resource_tipping = { aud?: t_terminal_configuration_configuration_resource_currency_specific_config cad?: t_terminal_configuration_configuration_resource_currency_specific_config @@ -9945,6 +11136,7 @@ export type t_terminal_reader_reader_resource_line_item = { } export type t_terminal_reader_reader_resource_process_config = { + enable_customer_cancellation?: boolean skip_tipping?: boolean tipping?: t_terminal_reader_reader_resource_tipping_config } @@ -9954,7 +11146,9 @@ export type t_terminal_reader_reader_resource_process_payment_intent_action = { process_config?: t_terminal_reader_reader_resource_process_config } -export type t_terminal_reader_reader_resource_process_setup_config = EmptyObject +export type t_terminal_reader_reader_resource_process_setup_config = { + enable_customer_cancellation?: boolean +} export type t_terminal_reader_reader_resource_process_setup_intent_action = { generated_card?: string @@ -9987,9 +11181,14 @@ export type t_terminal_reader_reader_resource_refund_payment_action = { reason?: "duplicate" | "fraudulent" | "requested_by_customer" refund?: string | t_refund refund_application_fee?: boolean + refund_payment_config?: t_terminal_reader_reader_resource_refund_payment_config reverse_transfer?: boolean } +export type t_terminal_reader_reader_resource_refund_payment_config = { + enable_customer_cancellation?: boolean +} + export type t_terminal_reader_reader_resource_set_reader_display_action = { cart?: t_terminal_reader_reader_resource_cart | null type: "cart" @@ -10012,6 +11211,7 @@ export type t_test_helpers_test_clock = { export type t_three_d_secure_details = { authentication_flow?: "challenge" | "frictionless" | null + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" | null result?: | "attempt_acknowledged" | "authenticated" @@ -10029,11 +11229,15 @@ export type t_three_d_secure_details = { | "protocol_error" | "rejected" | null + transaction_id?: string | null version?: "1.0.2" | "2.1.0" | "2.2.0" | null } export type t_three_d_secure_details_charge = { authentication_flow?: "challenge" | "frictionless" | null + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" | null + exemption_indicator?: "low_risk" | "none" | null + exemption_indicator_applied?: boolean result?: | "attempt_acknowledged" | "authenticated" @@ -10051,6 +11255,7 @@ export type t_three_d_secure_details_charge = { | "protocol_error" | "rejected" | null + transaction_id?: string | null version?: "1.0.2" | "2.1.0" | "2.2.0" | null } @@ -10070,6 +11275,10 @@ export type t_token = { used: boolean } +export type t_token_card_networks = { + preferred?: string | null +} + export type t_topup = { amount: number balance_transaction?: string | t_balance_transaction | null @@ -10670,6 +11879,7 @@ export type t_treasury_received_debits_resource_linked_flows = { inbound_transfer?: string | null issuing_authorization?: string | null issuing_transaction?: string | null + payout?: string | null } export type t_treasury_received_debits_resource_reversal_details = { diff --git a/integration-tests/typescript-koa/src/generated/api.github.com.yaml/generated.ts b/integration-tests/typescript-koa/src/generated/api.github.com.yaml/generated.ts index 608a1840..69d09ae1 100644 --- a/integration-tests/typescript-koa/src/generated/api.github.com.yaml/generated.ts +++ b/integration-tests/typescript-koa/src/generated/api.github.com.yaml/generated.ts @@ -52,6 +52,7 @@ import { t_ActionsDownloadWorkflowRunLogsParamSchema, t_ActionsEnableSelectedRepositoryGithubActionsOrganizationParamSchema, t_ActionsEnableWorkflowParamSchema, + t_ActionsForceCancelWorkflowRunParamSchema, t_ActionsGenerateRunnerJitconfigForOrgBodySchema, t_ActionsGenerateRunnerJitconfigForOrgParamSchema, t_ActionsGenerateRunnerJitconfigForRepoBodySchema, @@ -223,6 +224,7 @@ import { t_ActivityMarkNotificationsAsReadBodySchema, t_ActivityMarkRepoNotificationsAsReadBodySchema, t_ActivityMarkRepoNotificationsAsReadParamSchema, + t_ActivityMarkThreadAsDoneParamSchema, t_ActivityMarkThreadAsReadParamSchema, t_ActivitySetRepoSubscriptionBodySchema, t_ActivitySetRepoSubscriptionParamSchema, @@ -332,6 +334,8 @@ import { t_CodesOfConductGetConductCodeParamSchema, t_CodespacesAddRepositoryForSecretForAuthenticatedUserParamSchema, t_CodespacesAddSelectedRepoToOrgSecretParamSchema, + t_CodespacesCheckPermissionsForDevcontainerParamSchema, + t_CodespacesCheckPermissionsForDevcontainerQuerySchema, t_CodespacesCodespaceMachinesForAuthenticatedUserParamSchema, t_CodespacesCreateForAuthenticatedUserBodySchema, t_CodespacesCreateOrUpdateOrgSecretBodySchema, @@ -397,16 +401,16 @@ import { t_CodespacesStopInOrganizationParamSchema, t_CodespacesUpdateForAuthenticatedUserBodySchema, t_CodespacesUpdateForAuthenticatedUserParamSchema, - t_CopilotAddCopilotForBusinessSeatsForTeamsBodySchema, - t_CopilotAddCopilotForBusinessSeatsForTeamsParamSchema, - t_CopilotAddCopilotForBusinessSeatsForUsersBodySchema, - t_CopilotAddCopilotForBusinessSeatsForUsersParamSchema, + t_CopilotAddCopilotSeatsForTeamsBodySchema, + t_CopilotAddCopilotSeatsForTeamsParamSchema, + t_CopilotAddCopilotSeatsForUsersBodySchema, + t_CopilotAddCopilotSeatsForUsersParamSchema, t_CopilotCancelCopilotSeatAssignmentForTeamsBodySchema, t_CopilotCancelCopilotSeatAssignmentForTeamsParamSchema, t_CopilotCancelCopilotSeatAssignmentForUsersBodySchema, t_CopilotCancelCopilotSeatAssignmentForUsersParamSchema, t_CopilotGetCopilotOrganizationDetailsParamSchema, - t_CopilotGetCopilotSeatAssignmentDetailsForUserParamSchema, + t_CopilotGetCopilotSeatDetailsForUserParamSchema, t_CopilotListCopilotSeatsParamSchema, t_CopilotListCopilotSeatsQuerySchema, t_DependabotAddSelectedRepoToOrgSecretParamSchema, @@ -567,6 +571,7 @@ import { t_IssuesUpdateParamSchema, t_LicensesGetAllCommonlyUsedQuerySchema, t_LicensesGetForRepoParamSchema, + t_LicensesGetForRepoQuerySchema, t_LicensesGetParamSchema, t_MarkdownRenderBodySchema, t_MarkdownRenderRawBodySchema, @@ -608,6 +613,8 @@ import { t_OidcUpdateOidcCustomSubTemplateForOrgBodySchema, t_OidcUpdateOidcCustomSubTemplateForOrgParamSchema, t_OrgsAddSecurityManagerTeamParamSchema, + t_OrgsAssignTeamToOrgRoleParamSchema, + t_OrgsAssignUserToOrgRoleParamSchema, t_OrgsBlockUserParamSchema, t_OrgsCancelInvitationParamSchema, t_OrgsCheckBlockedUserParamSchema, @@ -615,16 +622,28 @@ import { t_OrgsCheckPublicMembershipForUserParamSchema, t_OrgsConvertMemberToOutsideCollaboratorBodySchema, t_OrgsConvertMemberToOutsideCollaboratorParamSchema, + t_OrgsCreateCustomOrganizationRoleBodySchema, + t_OrgsCreateCustomOrganizationRoleParamSchema, t_OrgsCreateInvitationBodySchema, t_OrgsCreateInvitationParamSchema, + t_OrgsCreateOrUpdateCustomPropertiesBodySchema, + t_OrgsCreateOrUpdateCustomPropertiesParamSchema, + t_OrgsCreateOrUpdateCustomPropertiesValuesForReposBodySchema, + t_OrgsCreateOrUpdateCustomPropertiesValuesForReposParamSchema, + t_OrgsCreateOrUpdateCustomPropertyBodySchema, + t_OrgsCreateOrUpdateCustomPropertyParamSchema, t_OrgsCreateWebhookBodySchema, t_OrgsCreateWebhookParamSchema, + t_OrgsDeleteCustomOrganizationRoleParamSchema, t_OrgsDeleteParamSchema, t_OrgsDeleteWebhookParamSchema, t_OrgsEnableOrDisableSecurityProductOnAllOrgReposBodySchema, t_OrgsEnableOrDisableSecurityProductOnAllOrgReposParamSchema, + t_OrgsGetAllCustomPropertiesParamSchema, + t_OrgsGetCustomPropertyParamSchema, t_OrgsGetMembershipForAuthenticatedUserParamSchema, t_OrgsGetMembershipForUserParamSchema, + t_OrgsGetOrgRoleParamSchema, t_OrgsGetParamSchema, t_OrgsGetWebhookConfigForOrgParamSchema, t_OrgsGetWebhookDeliveryParamSchema, @@ -633,6 +652,8 @@ import { t_OrgsListAppInstallationsQuerySchema, t_OrgsListBlockedUsersParamSchema, t_OrgsListBlockedUsersQuerySchema, + t_OrgsListCustomPropertiesValuesForReposParamSchema, + t_OrgsListCustomPropertiesValuesForReposQuerySchema, t_OrgsListFailedInvitationsParamSchema, t_OrgsListFailedInvitationsQuerySchema, t_OrgsListForAuthenticatedUserQuerySchema, @@ -643,6 +664,12 @@ import { t_OrgsListMembersParamSchema, t_OrgsListMembersQuerySchema, t_OrgsListMembershipsForAuthenticatedUserQuerySchema, + t_OrgsListOrgRoleTeamsParamSchema, + t_OrgsListOrgRoleTeamsQuerySchema, + t_OrgsListOrgRoleUsersParamSchema, + t_OrgsListOrgRoleUsersQuerySchema, + t_OrgsListOrgRolesParamSchema, + t_OrgsListOrganizationFineGrainedPermissionsParamSchema, t_OrgsListOutsideCollaboratorsParamSchema, t_OrgsListOutsideCollaboratorsQuerySchema, t_OrgsListPatGrantRepositoriesParamSchema, @@ -663,8 +690,11 @@ import { t_OrgsListWebhookDeliveriesQuerySchema, t_OrgsListWebhooksParamSchema, t_OrgsListWebhooksQuerySchema, + t_OrgsPatchCustomOrganizationRoleBodySchema, + t_OrgsPatchCustomOrganizationRoleParamSchema, t_OrgsPingWebhookParamSchema, t_OrgsRedeliverWebhookDeliveryParamSchema, + t_OrgsRemoveCustomPropertyParamSchema, t_OrgsRemoveMemberParamSchema, t_OrgsRemoveMembershipForUserParamSchema, t_OrgsRemoveOutsideCollaboratorParamSchema, @@ -674,6 +704,10 @@ import { t_OrgsReviewPatGrantRequestParamSchema, t_OrgsReviewPatGrantRequestsInBulkBodySchema, t_OrgsReviewPatGrantRequestsInBulkParamSchema, + t_OrgsRevokeAllOrgRolesTeamParamSchema, + t_OrgsRevokeAllOrgRolesUserParamSchema, + t_OrgsRevokeOrgRoleTeamParamSchema, + t_OrgsRevokeOrgRoleUserParamSchema, t_OrgsSetMembershipForUserBodySchema, t_OrgsSetMembershipForUserParamSchema, t_OrgsSetPublicMembershipForAuthenticatedUserParamSchema, @@ -865,8 +899,10 @@ import { t_ReposAddTeamAccessRestrictionsParamSchema, t_ReposAddUserAccessRestrictionsBodySchema, t_ReposAddUserAccessRestrictionsParamSchema, + t_ReposCancelPagesDeploymentParamSchema, t_ReposCheckAutomatedSecurityFixesParamSchema, t_ReposCheckCollaboratorParamSchema, + t_ReposCheckPrivateVulnerabilityReportingParamSchema, t_ReposCheckVulnerabilityAlertsParamSchema, t_ReposCodeownersErrorsParamSchema, t_ReposCodeownersErrorsQuerySchema, @@ -896,6 +932,8 @@ import { t_ReposCreateForkParamSchema, t_ReposCreateInOrgBodySchema, t_ReposCreateInOrgParamSchema, + t_ReposCreateOrUpdateCustomPropertiesValuesBodySchema, + t_ReposCreateOrUpdateCustomPropertiesValuesParamSchema, t_ReposCreateOrUpdateEnvironmentBodySchema, t_ReposCreateOrUpdateEnvironmentParamSchema, t_ReposCreateOrUpdateFileContentsBodySchema, @@ -980,6 +1018,7 @@ import { t_ReposGetContentQuerySchema, t_ReposGetContributorsStatsParamSchema, t_ReposGetCustomDeploymentProtectionRuleParamSchema, + t_ReposGetCustomPropertiesValuesParamSchema, t_ReposGetDeployKeyParamSchema, t_ReposGetDeploymentBranchPolicyParamSchema, t_ReposGetDeploymentParamSchema, @@ -987,10 +1026,14 @@ import { t_ReposGetEnvironmentParamSchema, t_ReposGetLatestPagesBuildParamSchema, t_ReposGetLatestReleaseParamSchema, + t_ReposGetOrgRuleSuiteParamSchema, + t_ReposGetOrgRuleSuitesParamSchema, + t_ReposGetOrgRuleSuitesQuerySchema, t_ReposGetOrgRulesetParamSchema, t_ReposGetOrgRulesetsParamSchema, t_ReposGetOrgRulesetsQuerySchema, t_ReposGetPagesBuildParamSchema, + t_ReposGetPagesDeploymentParamSchema, t_ReposGetPagesHealthCheckParamSchema, t_ReposGetPagesParamSchema, t_ReposGetParamSchema, @@ -1004,6 +1047,9 @@ import { t_ReposGetReleaseAssetParamSchema, t_ReposGetReleaseByTagParamSchema, t_ReposGetReleaseParamSchema, + t_ReposGetRepoRuleSuiteParamSchema, + t_ReposGetRepoRuleSuitesParamSchema, + t_ReposGetRepoRuleSuitesQuerySchema, t_ReposGetRepoRulesetParamSchema, t_ReposGetRepoRulesetQuerySchema, t_ReposGetRepoRulesetsParamSchema, @@ -1021,7 +1067,6 @@ import { t_ReposListActivitiesParamSchema, t_ReposListActivitiesQuerySchema, t_ReposListAutolinksParamSchema, - t_ReposListAutolinksQuerySchema, t_ReposListBranchesForHeadCommitParamSchema, t_ReposListBranchesParamSchema, t_ReposListBranchesQuerySchema, @@ -1158,6 +1203,7 @@ import { t_SecretScanningListLocationsForAlertQuerySchema, t_SecretScanningUpdateAlertBodySchema, t_SecretScanningUpdateAlertParamSchema, + t_SecurityAdvisoriesCreateForkParamSchema, t_SecurityAdvisoriesCreatePrivateVulnerabilityReportBodySchema, t_SecurityAdvisoriesCreatePrivateVulnerabilityReportParamSchema, t_SecurityAdvisoriesCreateRepositoryAdvisoryBodySchema, @@ -1365,6 +1411,7 @@ import { t_codespace_machine, t_codespace_with_full_repository, t_codespaces_org_secret, + t_codespaces_permissions_check_for_devcontainer, t_codespaces_public_key, t_codespaces_secret, t_codespaces_user_public_key, @@ -1387,6 +1434,7 @@ import { t_copilot_organization_details, t_copilot_seat_details, t_custom_deployment_rule_app, + t_custom_property_value, t_dependabot_alert, t_dependabot_alert_with_repository, t_dependabot_public_key, @@ -1449,15 +1497,19 @@ import { t_minimal_repository, t_oidc_custom_sub, t_oidc_custom_sub_repo, + t_org_custom_property, t_org_hook, t_org_membership, + t_org_repo_custom_property_values, t_organization_actions_secret, t_organization_actions_variable, t_organization_dependabot_secret, + t_organization_fine_grained_permission, t_organization_full, t_organization_invitation, t_organization_programmatic_access_grant, t_organization_programmatic_access_grant_request, + t_organization_role, t_organization_secret_scanning_alert, t_organization_simple, t_package, @@ -1467,6 +1519,7 @@ import { t_page_build, t_page_build_status, t_page_deployment, + t_pages_deployment_status, t_pages_health_check, t_participation_stats, t_pending_deployment, @@ -1504,6 +1557,8 @@ import { t_repository_subscription, t_review_comment, t_root, + t_rule_suite, + t_rule_suites, t_runner, t_runner_application, t_runner_label, @@ -1611,6 +1666,7 @@ import { s_code_scanning_default_setup_update_response, s_code_scanning_organization_alert_items, s_code_scanning_ref, + s_code_scanning_ref_full, s_code_scanning_sarifs_receipt, s_code_scanning_sarifs_status, s_code_search_result_item, @@ -1620,6 +1676,7 @@ import { s_codespace_machine, s_codespace_with_full_repository, s_codespaces_org_secret, + s_codespaces_permissions_check_for_devcontainer, s_codespaces_public_key, s_codespaces_secret, s_codespaces_user_public_key, @@ -1642,6 +1699,7 @@ import { s_copilot_organization_details, s_copilot_seat_details, s_custom_deployment_rule_app, + s_custom_property_value, s_dependabot_alert, s_dependabot_alert_with_repository, s_dependabot_public_key, @@ -1652,6 +1710,7 @@ import { s_deployment, s_deployment_branch_policy, s_deployment_branch_policy_name_pattern, + s_deployment_branch_policy_name_pattern_with_type, s_deployment_branch_policy_settings, s_deployment_protection_rule, s_deployment_reviewer_type, @@ -1709,16 +1768,20 @@ import { s_minimal_repository, s_oidc_custom_sub, s_oidc_custom_sub_repo, + s_org_custom_property, s_org_hook, s_org_membership, + s_org_repo_custom_property_values, s_org_ruleset_conditions, s_organization_actions_secret, s_organization_actions_variable, s_organization_dependabot_secret, + s_organization_fine_grained_permission, s_organization_full, s_organization_invitation, s_organization_programmatic_access_grant, s_organization_programmatic_access_grant_request, + s_organization_role, s_organization_secret_scanning_alert, s_organization_simple, s_package, @@ -1728,11 +1791,13 @@ import { s_page_build, s_page_build_status, s_page_deployment, + s_pages_deployment_status, s_pages_health_check, s_participation_stats, s_pending_deployment, s_porter_author, s_porter_large_file, + s_prevent_self_review, s_private_user, s_private_vulnerability_report_create, s_project, @@ -1774,6 +1839,8 @@ import { s_review_custom_gates_comment_required, s_review_custom_gates_state_required, s_root, + s_rule_suite, + s_rule_suites, s_runner, s_runner_application, s_runner_label, @@ -1783,6 +1850,7 @@ import { s_secret_scanning_alert_resolution_comment, s_secret_scanning_alert_state, s_secret_scanning_location, + s_security_advisory_ecosystems, s_selected_actions, s_short_blob, s_short_branch, @@ -3291,6 +3359,16 @@ export type ActivityMarkThreadAsRead = ( | Response<403, t_basic_error> > +export type ActivityMarkThreadAsDoneResponder = { + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActivityMarkThreadAsDone = ( + params: Params, + respond: ActivityMarkThreadAsDoneResponder, + ctx: RouterContext, +) => Promise | Response<204, void>> + export type ActivityGetThreadSubscriptionForAuthenticatedUserResponder = { with200(): KoaRuntimeResponse with304(): KoaRuntimeResponse @@ -4615,6 +4693,7 @@ export type CopilotGetCopilotOrganizationDetailsResponder = { with401(): KoaRuntimeResponse with403(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse with500(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -4628,6 +4707,7 @@ export type CopilotGetCopilotOrganizationDetails = ( | Response<401, t_basic_error> | Response<403, t_basic_error> | Response<404, t_basic_error> + | Response<422, void> | Response<500, t_basic_error> > @@ -4665,7 +4745,7 @@ export type CopilotListCopilotSeats = ( | Response<500, t_basic_error> > -export type CopilotAddCopilotForBusinessSeatsForTeamsResponder = { +export type CopilotAddCopilotSeatsForTeamsResponder = { with201(): KoaRuntimeResponse<{ seats_created: number }> @@ -4676,13 +4756,13 @@ export type CopilotAddCopilotForBusinessSeatsForTeamsResponder = { with500(): KoaRuntimeResponse } & KoaRuntimeResponder -export type CopilotAddCopilotForBusinessSeatsForTeams = ( +export type CopilotAddCopilotSeatsForTeams = ( params: Params< - t_CopilotAddCopilotForBusinessSeatsForTeamsParamSchema, + t_CopilotAddCopilotSeatsForTeamsParamSchema, void, - t_CopilotAddCopilotForBusinessSeatsForTeamsBodySchema + t_CopilotAddCopilotSeatsForTeamsBodySchema >, - respond: CopilotAddCopilotForBusinessSeatsForTeamsResponder, + respond: CopilotAddCopilotSeatsForTeamsResponder, ctx: RouterContext, ) => Promise< | KoaRuntimeResponse @@ -4733,7 +4813,7 @@ export type CopilotCancelCopilotSeatAssignmentForTeams = ( | Response<500, t_basic_error> > -export type CopilotAddCopilotForBusinessSeatsForUsersResponder = { +export type CopilotAddCopilotSeatsForUsersResponder = { with201(): KoaRuntimeResponse<{ seats_created: number }> @@ -4744,13 +4824,13 @@ export type CopilotAddCopilotForBusinessSeatsForUsersResponder = { with500(): KoaRuntimeResponse } & KoaRuntimeResponder -export type CopilotAddCopilotForBusinessSeatsForUsers = ( +export type CopilotAddCopilotSeatsForUsers = ( params: Params< - t_CopilotAddCopilotForBusinessSeatsForUsersParamSchema, + t_CopilotAddCopilotSeatsForUsersParamSchema, void, - t_CopilotAddCopilotForBusinessSeatsForUsersBodySchema + t_CopilotAddCopilotSeatsForUsersBodySchema >, - respond: CopilotAddCopilotForBusinessSeatsForUsersResponder, + respond: CopilotAddCopilotSeatsForUsersResponder, ctx: RouterContext, ) => Promise< | KoaRuntimeResponse @@ -5537,7 +5617,7 @@ export type CodespacesStopInOrganization = ( | Response<500, t_basic_error> > -export type CopilotGetCopilotSeatAssignmentDetailsForUserResponder = { +export type CopilotGetCopilotSeatDetailsForUserResponder = { with200(): KoaRuntimeResponse with401(): KoaRuntimeResponse with403(): KoaRuntimeResponse @@ -5546,13 +5626,9 @@ export type CopilotGetCopilotSeatAssignmentDetailsForUserResponder = { with500(): KoaRuntimeResponse } & KoaRuntimeResponder -export type CopilotGetCopilotSeatAssignmentDetailsForUser = ( - params: Params< - t_CopilotGetCopilotSeatAssignmentDetailsForUserParamSchema, - void, - void - >, - respond: CopilotGetCopilotSeatAssignmentDetailsForUserResponder, +export type CopilotGetCopilotSeatDetailsForUser = ( + params: Params, + respond: CopilotGetCopilotSeatDetailsForUserResponder, ctx: RouterContext, ) => Promise< | KoaRuntimeResponse @@ -5737,6 +5813,242 @@ export type MigrationsListReposForOrg = ( | Response<404, t_basic_error> > +export type OrgsListOrganizationFineGrainedPermissionsResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsListOrganizationFineGrainedPermissions = ( + params: Params< + t_OrgsListOrganizationFineGrainedPermissionsParamSchema, + void, + void + >, + respond: OrgsListOrganizationFineGrainedPermissionsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_organization_fine_grained_permission[]> + | Response<404, t_basic_error> + | Response<422, t_validation_error> +> + +export type OrgsListOrgRolesResponder = { + with200(): KoaRuntimeResponse<{ + roles?: t_organization_role[] + total_count?: number + }> + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsListOrgRoles = ( + params: Params, + respond: OrgsListOrgRolesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + roles?: t_organization_role[] + total_count?: number + } + > + | Response<404, t_basic_error> + | Response<422, t_validation_error> +> + +export type OrgsCreateCustomOrganizationRoleResponder = { + with201(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsCreateCustomOrganizationRole = ( + params: Params< + t_OrgsCreateCustomOrganizationRoleParamSchema, + void, + t_OrgsCreateCustomOrganizationRoleBodySchema + >, + respond: OrgsCreateCustomOrganizationRoleResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<201, t_organization_role> + | Response<404, t_basic_error> + | Response<409, t_basic_error> + | Response<422, t_validation_error> +> + +export type OrgsRevokeAllOrgRolesTeamResponder = { + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsRevokeAllOrgRolesTeam = ( + params: Params, + respond: OrgsRevokeAllOrgRolesTeamResponder, + ctx: RouterContext, +) => Promise | Response<204, void>> + +export type OrgsAssignTeamToOrgRoleResponder = { + with204(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsAssignTeamToOrgRole = ( + params: Params, + respond: OrgsAssignTeamToOrgRoleResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<204, void> + | Response<404, void> + | Response<422, void> +> + +export type OrgsRevokeOrgRoleTeamResponder = { + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsRevokeOrgRoleTeam = ( + params: Params, + respond: OrgsRevokeOrgRoleTeamResponder, + ctx: RouterContext, +) => Promise | Response<204, void>> + +export type OrgsRevokeAllOrgRolesUserResponder = { + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsRevokeAllOrgRolesUser = ( + params: Params, + respond: OrgsRevokeAllOrgRolesUserResponder, + ctx: RouterContext, +) => Promise | Response<204, void>> + +export type OrgsAssignUserToOrgRoleResponder = { + with204(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsAssignUserToOrgRole = ( + params: Params, + respond: OrgsAssignUserToOrgRoleResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<204, void> + | Response<404, void> + | Response<422, void> +> + +export type OrgsRevokeOrgRoleUserResponder = { + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsRevokeOrgRoleUser = ( + params: Params, + respond: OrgsRevokeOrgRoleUserResponder, + ctx: RouterContext, +) => Promise | Response<204, void>> + +export type OrgsGetOrgRoleResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsGetOrgRole = ( + params: Params, + respond: OrgsGetOrgRoleResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_organization_role> + | Response<404, t_basic_error> + | Response<422, t_validation_error> +> + +export type OrgsPatchCustomOrganizationRoleResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsPatchCustomOrganizationRole = ( + params: Params< + t_OrgsPatchCustomOrganizationRoleParamSchema, + void, + t_OrgsPatchCustomOrganizationRoleBodySchema + >, + respond: OrgsPatchCustomOrganizationRoleResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_organization_role> + | Response<404, t_basic_error> + | Response<409, t_basic_error> + | Response<422, t_validation_error> +> + +export type OrgsDeleteCustomOrganizationRoleResponder = { + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsDeleteCustomOrganizationRole = ( + params: Params, + respond: OrgsDeleteCustomOrganizationRoleResponder, + ctx: RouterContext, +) => Promise | Response<204, void>> + +export type OrgsListOrgRoleTeamsResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsListOrgRoleTeams = ( + params: Params< + t_OrgsListOrgRoleTeamsParamSchema, + t_OrgsListOrgRoleTeamsQuerySchema, + void + >, + respond: OrgsListOrgRoleTeamsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_team[]> + | Response<404, void> + | Response<422, void> +> + +export type OrgsListOrgRoleUsersResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsListOrgRoleUsers = ( + params: Params< + t_OrgsListOrgRoleUsersParamSchema, + t_OrgsListOrgRoleUsersQuerySchema, + void + >, + respond: OrgsListOrgRoleUsersResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_simple_user[]> + | Response<404, void> + | Response<422, void> +> + export type OrgsListOutsideCollaboratorsResponder = { with200(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -6206,6 +6518,143 @@ export type ProjectsCreateForOrg = ( | Response<422, t_validation_error_simple> > +export type OrgsGetAllCustomPropertiesResponder = { + with200(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsGetAllCustomProperties = ( + params: Params, + respond: OrgsGetAllCustomPropertiesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_org_custom_property[]> + | Response<403, t_basic_error> + | Response<404, t_basic_error> +> + +export type OrgsCreateOrUpdateCustomPropertiesResponder = { + with200(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsCreateOrUpdateCustomProperties = ( + params: Params< + t_OrgsCreateOrUpdateCustomPropertiesParamSchema, + void, + t_OrgsCreateOrUpdateCustomPropertiesBodySchema + >, + respond: OrgsCreateOrUpdateCustomPropertiesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_org_custom_property[]> + | Response<403, t_basic_error> + | Response<404, t_basic_error> +> + +export type OrgsGetCustomPropertyResponder = { + with200(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsGetCustomProperty = ( + params: Params, + respond: OrgsGetCustomPropertyResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_org_custom_property> + | Response<403, t_basic_error> + | Response<404, t_basic_error> +> + +export type OrgsCreateOrUpdateCustomPropertyResponder = { + with200(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsCreateOrUpdateCustomProperty = ( + params: Params< + t_OrgsCreateOrUpdateCustomPropertyParamSchema, + void, + t_OrgsCreateOrUpdateCustomPropertyBodySchema + >, + respond: OrgsCreateOrUpdateCustomPropertyResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_org_custom_property> + | Response<403, t_basic_error> + | Response<404, t_basic_error> +> + +export type OrgsRemoveCustomPropertyResponder = { + with204(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsRemoveCustomProperty = ( + params: Params, + respond: OrgsRemoveCustomPropertyResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<204, void> + | Response<403, t_basic_error> + | Response<404, t_basic_error> +> + +export type OrgsListCustomPropertiesValuesForReposResponder = { + with200(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsListCustomPropertiesValuesForRepos = ( + params: Params< + t_OrgsListCustomPropertiesValuesForReposParamSchema, + t_OrgsListCustomPropertiesValuesForReposQuerySchema, + void + >, + respond: OrgsListCustomPropertiesValuesForReposResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_org_repo_custom_property_values[]> + | Response<403, t_basic_error> + | Response<404, t_basic_error> +> + +export type OrgsCreateOrUpdateCustomPropertiesValuesForReposResponder = { + with204(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type OrgsCreateOrUpdateCustomPropertiesValuesForRepos = ( + params: Params< + t_OrgsCreateOrUpdateCustomPropertiesValuesForReposParamSchema, + void, + t_OrgsCreateOrUpdateCustomPropertiesValuesForReposBodySchema + >, + respond: OrgsCreateOrUpdateCustomPropertiesValuesForReposResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<204, void> + | Response<403, t_basic_error> + | Response<404, t_basic_error> + | Response<422, t_validation_error> +> + export type OrgsListPublicMembersResponder = { with200(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -6283,7 +6732,7 @@ export type ReposListForOrg = ( > export type ReposCreateInOrgResponder = { - with201(): KoaRuntimeResponse + with201(): KoaRuntimeResponse with403(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -6298,7 +6747,7 @@ export type ReposCreateInOrg = ( ctx: RouterContext, ) => Promise< | KoaRuntimeResponse - | Response<201, t_repository> + | Response<201, t_full_repository> | Response<403, t_basic_error> | Response<422, t_validation_error> > @@ -6345,6 +6794,44 @@ export type ReposCreateOrgRuleset = ( | Response<500, t_basic_error> > +export type ReposGetOrgRuleSuitesResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with500(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ReposGetOrgRuleSuites = ( + params: Params< + t_ReposGetOrgRuleSuitesParamSchema, + t_ReposGetOrgRuleSuitesQuerySchema, + void + >, + respond: ReposGetOrgRuleSuitesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_rule_suites> + | Response<404, t_basic_error> + | Response<500, t_basic_error> +> + +export type ReposGetOrgRuleSuiteResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with500(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ReposGetOrgRuleSuite = ( + params: Params, + respond: ReposGetOrgRuleSuiteResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_rule_suite> + | Response<404, t_basic_error> + | Response<500, t_basic_error> +> + export type ReposGetOrgRulesetResponder = { with200(): KoaRuntimeResponse with404(): KoaRuntimeResponse @@ -8510,6 +8997,21 @@ export type ActionsReviewCustomGatesForRun = ( ctx: RouterContext, ) => Promise | Response<204, void>> +export type ActionsForceCancelWorkflowRunResponder = { + with202(): KoaRuntimeResponse + with409(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActionsForceCancelWorkflowRun = ( + params: Params, + respond: ActionsForceCancelWorkflowRunResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<202, t_empty_object> + | Response<409, t_basic_error> +> + export type ActionsListJobsForWorkflowRunResponder = { with200(): KoaRuntimeResponse<{ jobs: t_job[] @@ -8940,11 +9442,7 @@ export type ReposListAutolinksResponder = { } & KoaRuntimeResponder export type ReposListAutolinks = ( - params: Params< - t_ReposListAutolinksParamSchema, - t_ReposListAutolinksQuerySchema, - void - >, + params: Params, respond: ReposListAutolinksResponder, ctx: RouterContext, ) => Promise | Response<200, t_autolink[]>> @@ -10456,6 +10954,44 @@ export type CodespacesPreFlightWithRepoForAuthenticatedUser = ( | Response<404, t_basic_error> > +export type CodespacesCheckPermissionsForDevcontainerResponder = { + with200(): KoaRuntimeResponse + with401(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse + with503(): KoaRuntimeResponse<{ + code?: string + documentation_url?: string + message?: string + }> +} & KoaRuntimeResponder + +export type CodespacesCheckPermissionsForDevcontainer = ( + params: Params< + t_CodespacesCheckPermissionsForDevcontainerParamSchema, + t_CodespacesCheckPermissionsForDevcontainerQuerySchema, + void + >, + respond: CodespacesCheckPermissionsForDevcontainerResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_codespaces_permissions_check_for_devcontainer> + | Response<401, t_basic_error> + | Response<403, t_basic_error> + | Response<404, t_basic_error> + | Response<422, t_validation_error> + | Response< + 503, + { + code?: string + documentation_url?: string + message?: string + } + > +> + export type CodespacesListRepoSecretsResponder = { with200(): KoaRuntimeResponse<{ secrets: t_repo_codespaces_secret[] @@ -10762,6 +11298,7 @@ export type ReposListCommits = ( export type ReposListBranchesForHeadCommitResponder = { with200(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -10772,6 +11309,7 @@ export type ReposListBranchesForHeadCommit = ( ) => Promise< | KoaRuntimeResponse | Response<200, t_branch_short[]> + | Response<409, t_basic_error> | Response<422, t_validation_error> > @@ -10812,6 +11350,7 @@ export type ReposCreateCommitComment = ( export type ReposListPullRequestsAssociatedWithCommitResponder = { with200(): KoaRuntimeResponse + with409(): KoaRuntimeResponse } & KoaRuntimeResponder export type ReposListPullRequestsAssociatedWithCommit = ( @@ -10823,12 +11362,15 @@ export type ReposListPullRequestsAssociatedWithCommit = ( respond: ReposListPullRequestsAssociatedWithCommitResponder, ctx: RouterContext, ) => Promise< - KoaRuntimeResponse | Response<200, t_pull_request_simple[]> + | KoaRuntimeResponse + | Response<200, t_pull_request_simple[]> + | Response<409, t_basic_error> > export type ReposGetCommitResponder = { with200(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse with500(): KoaRuntimeResponse with503(): KoaRuntimeResponse<{ @@ -10850,6 +11392,7 @@ export type ReposGetCommit = ( | KoaRuntimeResponse | Response<200, t_commit> | Response<404, t_basic_error> + | Response<409, t_basic_error> | Response<422, t_validation_error> | Response<500, t_basic_error> | Response< @@ -11463,6 +12006,7 @@ export type ReposGetDeploymentStatus = ( export type ReposCreateDispatchEventResponder = { with204(): KoaRuntimeResponse + with404(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11477,6 +12021,7 @@ export type ReposCreateDispatchEvent = ( ) => Promise< | KoaRuntimeResponse | Response<204, void> + | Response<404, t_basic_error> | Response<422, t_validation_error> > @@ -11720,6 +12265,155 @@ export type ReposDisableDeploymentProtectionRule = ( ctx: RouterContext, ) => Promise | Response<204, void>> +export type ActionsListEnvironmentSecretsResponder = { + with200(): KoaRuntimeResponse<{ + secrets: t_actions_secret[] + total_count: number + }> +} & KoaRuntimeResponder + +export type ActionsListEnvironmentSecrets = ( + params: Params< + t_ActionsListEnvironmentSecretsParamSchema, + t_ActionsListEnvironmentSecretsQuerySchema, + void + >, + respond: ActionsListEnvironmentSecretsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + secrets: t_actions_secret[] + total_count: number + } + > +> + +export type ActionsGetEnvironmentPublicKeyResponder = { + with200(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActionsGetEnvironmentPublicKey = ( + params: Params, + respond: ActionsGetEnvironmentPublicKeyResponder, + ctx: RouterContext, +) => Promise | Response<200, t_actions_public_key>> + +export type ActionsGetEnvironmentSecretResponder = { + with200(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActionsGetEnvironmentSecret = ( + params: Params, + respond: ActionsGetEnvironmentSecretResponder, + ctx: RouterContext, +) => Promise | Response<200, t_actions_secret>> + +export type ActionsCreateOrUpdateEnvironmentSecretResponder = { + with201(): KoaRuntimeResponse + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActionsCreateOrUpdateEnvironmentSecret = ( + params: Params< + t_ActionsCreateOrUpdateEnvironmentSecretParamSchema, + void, + t_ActionsCreateOrUpdateEnvironmentSecretBodySchema + >, + respond: ActionsCreateOrUpdateEnvironmentSecretResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<201, t_empty_object> + | Response<204, void> +> + +export type ActionsDeleteEnvironmentSecretResponder = { + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActionsDeleteEnvironmentSecret = ( + params: Params, + respond: ActionsDeleteEnvironmentSecretResponder, + ctx: RouterContext, +) => Promise | Response<204, void>> + +export type ActionsListEnvironmentVariablesResponder = { + with200(): KoaRuntimeResponse<{ + total_count: number + variables: t_actions_variable[] + }> +} & KoaRuntimeResponder + +export type ActionsListEnvironmentVariables = ( + params: Params< + t_ActionsListEnvironmentVariablesParamSchema, + t_ActionsListEnvironmentVariablesQuerySchema, + void + >, + respond: ActionsListEnvironmentVariablesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + total_count: number + variables: t_actions_variable[] + } + > +> + +export type ActionsCreateEnvironmentVariableResponder = { + with201(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActionsCreateEnvironmentVariable = ( + params: Params< + t_ActionsCreateEnvironmentVariableParamSchema, + void, + t_ActionsCreateEnvironmentVariableBodySchema + >, + respond: ActionsCreateEnvironmentVariableResponder, + ctx: RouterContext, +) => Promise | Response<201, t_empty_object>> + +export type ActionsGetEnvironmentVariableResponder = { + with200(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActionsGetEnvironmentVariable = ( + params: Params, + respond: ActionsGetEnvironmentVariableResponder, + ctx: RouterContext, +) => Promise | Response<200, t_actions_variable>> + +export type ActionsUpdateEnvironmentVariableResponder = { + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActionsUpdateEnvironmentVariable = ( + params: Params< + t_ActionsUpdateEnvironmentVariableParamSchema, + void, + t_ActionsUpdateEnvironmentVariableBodySchema + >, + respond: ActionsUpdateEnvironmentVariableResponder, + ctx: RouterContext, +) => Promise | Response<204, void>> + +export type ActionsDeleteEnvironmentVariableResponder = { + with204(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ActionsDeleteEnvironmentVariable = ( + params: Params, + respond: ActionsDeleteEnvironmentVariableResponder, + ctx: RouterContext, +) => Promise | Response<204, void>> + export type ActivityListRepoEventsResponder = { with200(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11803,6 +12497,7 @@ export type GitGetBlobResponder = { with200(): KoaRuntimeResponse with403(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11815,12 +12510,14 @@ export type GitGetBlob = ( | Response<200, t_blob> | Response<403, t_basic_error> | Response<404, t_basic_error> + | Response<409, t_basic_error> | Response<422, t_validation_error> > export type GitCreateCommitResponder = { with201(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11836,12 +12533,14 @@ export type GitCreateCommit = ( | KoaRuntimeResponse | Response<201, t_git_commit> | Response<404, t_basic_error> + | Response<409, t_basic_error> | Response<422, t_validation_error> > export type GitGetCommitResponder = { with200(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse } & KoaRuntimeResponder export type GitGetCommit = ( @@ -11852,21 +12551,28 @@ export type GitGetCommit = ( | KoaRuntimeResponse | Response<200, t_git_commit> | Response<404, t_basic_error> + | Response<409, t_basic_error> > export type GitListMatchingRefsResponder = { with200(): KoaRuntimeResponse + with409(): KoaRuntimeResponse } & KoaRuntimeResponder export type GitListMatchingRefs = ( params: Params, respond: GitListMatchingRefsResponder, ctx: RouterContext, -) => Promise | Response<200, t_git_ref[]>> +) => Promise< + | KoaRuntimeResponse + | Response<200, t_git_ref[]> + | Response<409, t_basic_error> +> export type GitGetRefResponder = { with200(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse } & KoaRuntimeResponder export type GitGetRef = ( @@ -11877,10 +12583,12 @@ export type GitGetRef = ( | KoaRuntimeResponse | Response<200, t_git_ref> | Response<404, t_basic_error> + | Response<409, t_basic_error> > export type GitCreateRefResponder = { with201(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11891,11 +12599,13 @@ export type GitCreateRef = ( ) => Promise< | KoaRuntimeResponse | Response<201, t_git_ref> + | Response<409, t_basic_error> | Response<422, t_validation_error> > export type GitUpdateRefResponder = { with200(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11906,11 +12616,13 @@ export type GitUpdateRef = ( ) => Promise< | KoaRuntimeResponse | Response<200, t_git_ref> + | Response<409, t_basic_error> | Response<422, t_validation_error> > export type GitDeleteRefResponder = { with204(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11921,11 +12633,13 @@ export type GitDeleteRef = ( ) => Promise< | KoaRuntimeResponse | Response<204, void> + | Response<409, t_basic_error> | Response<422, t_validation_error> > export type GitCreateTagResponder = { with201(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11936,12 +12650,14 @@ export type GitCreateTag = ( ) => Promise< | KoaRuntimeResponse | Response<201, t_git_tag> + | Response<409, t_basic_error> | Response<422, t_validation_error> > export type GitGetTagResponder = { with200(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse } & KoaRuntimeResponder export type GitGetTag = ( @@ -11952,12 +12668,14 @@ export type GitGetTag = ( | KoaRuntimeResponse | Response<200, t_git_tag> | Response<404, t_basic_error> + | Response<409, t_basic_error> > export type GitCreateTreeResponder = { with201(): KoaRuntimeResponse with403(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11970,12 +12688,14 @@ export type GitCreateTree = ( | Response<201, t_git_tree> | Response<403, t_basic_error> | Response<404, t_basic_error> + | Response<409, t_basic_error> | Response<422, t_validation_error> > export type GitGetTreeResponder = { with200(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with409(): KoaRuntimeResponse with422(): KoaRuntimeResponse } & KoaRuntimeResponder @@ -11987,6 +12707,7 @@ export type GitGetTree = ( | KoaRuntimeResponse | Response<200, t_git_tree> | Response<404, t_basic_error> + | Response<409, t_basic_error> | Response<422, t_validation_error> > @@ -13217,13 +13938,22 @@ export type ReposListLanguages = ( export type LicensesGetForRepoResponder = { with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse } & KoaRuntimeResponder export type LicensesGetForRepo = ( - params: Params, + params: Params< + t_LicensesGetForRepoParamSchema, + t_LicensesGetForRepoQuerySchema, + void + >, respond: LicensesGetForRepoResponder, ctx: RouterContext, -) => Promise | Response<200, t_license_content>> +) => Promise< + | KoaRuntimeResponse + | Response<200, t_license_content> + | Response<404, t_basic_error> +> export type ReposMergeUpstreamResponder = { with200(): KoaRuntimeResponse @@ -13554,6 +14284,36 @@ export type ReposCreatePagesDeployment = ( | Response<422, t_validation_error> > +export type ReposGetPagesDeploymentResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ReposGetPagesDeployment = ( + params: Params, + respond: ReposGetPagesDeploymentResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_pages_deployment_status> + | Response<404, t_basic_error> +> + +export type ReposCancelPagesDeploymentResponder = { + with204(): KoaRuntimeResponse + with404(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ReposCancelPagesDeployment = ( + params: Params, + respond: ReposCancelPagesDeploymentResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<204, void> + | Response<404, t_basic_error> +> + export type ReposGetPagesHealthCheckResponder = { with200(): KoaRuntimeResponse with202(): KoaRuntimeResponse @@ -13575,6 +14335,32 @@ export type ReposGetPagesHealthCheck = ( | Response<422, void> > +export type ReposCheckPrivateVulnerabilityReportingResponder = { + with200(): KoaRuntimeResponse<{ + enabled: boolean + }> + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ReposCheckPrivateVulnerabilityReporting = ( + params: Params< + t_ReposCheckPrivateVulnerabilityReportingParamSchema, + void, + void + >, + respond: ReposCheckPrivateVulnerabilityReportingResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + enabled: boolean + } + > + | Response<422, t_scim_error> +> + export type ReposEnablePrivateVulnerabilityReportingResponder = { with204(): KoaRuntimeResponse with422(): KoaRuntimeResponse @@ -13667,6 +14453,46 @@ export type ProjectsCreateForRepo = ( | Response<422, t_validation_error_simple> > +export type ReposGetCustomPropertiesValuesResponder = { + with200(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ReposGetCustomPropertiesValues = ( + params: Params, + respond: ReposGetCustomPropertiesValuesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_custom_property_value[]> + | Response<403, t_basic_error> + | Response<404, t_basic_error> +> + +export type ReposCreateOrUpdateCustomPropertiesValuesResponder = { + with204(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ReposCreateOrUpdateCustomPropertiesValues = ( + params: Params< + t_ReposCreateOrUpdateCustomPropertiesValuesParamSchema, + void, + t_ReposCreateOrUpdateCustomPropertiesValuesBodySchema + >, + respond: ReposCreateOrUpdateCustomPropertiesValuesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<204, void> + | Response<403, t_basic_error> + | Response<404, t_basic_error> + | Response<422, t_validation_error> +> + export type PullsListResponder = { with200(): KoaRuntimeResponse with304(): KoaRuntimeResponse @@ -13817,6 +14643,7 @@ export type PullsGetResponder = { with200(): KoaRuntimeResponse with304(): KoaRuntimeResponse with404(): KoaRuntimeResponse + with406(): KoaRuntimeResponse with500(): KoaRuntimeResponse with503(): KoaRuntimeResponse<{ code?: string @@ -13834,6 +14661,7 @@ export type PullsGet = ( | Response<200, t_pull_request> | Response<304, void> | Response<404, t_basic_error> + | Response<406, t_basic_error> | Response<500, t_basic_error> | Response< 503, @@ -14649,6 +15477,44 @@ export type ReposCreateRepoRuleset = ( | Response<500, t_basic_error> > +export type ReposGetRepoRuleSuitesResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with500(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ReposGetRepoRuleSuites = ( + params: Params< + t_ReposGetRepoRuleSuitesParamSchema, + t_ReposGetRepoRuleSuitesQuerySchema, + void + >, + respond: ReposGetRepoRuleSuitesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_rule_suites> + | Response<404, t_basic_error> + | Response<500, t_basic_error> +> + +export type ReposGetRepoRuleSuiteResponder = { + with200(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with500(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type ReposGetRepoRuleSuite = ( + params: Params, + respond: ReposGetRepoRuleSuiteResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_rule_suite> + | Response<404, t_basic_error> + | Response<500, t_basic_error> +> + export type ReposGetRepoRulesetResponder = { with200(): KoaRuntimeResponse with404(): KoaRuntimeResponse @@ -14981,6 +15847,27 @@ export type SecurityAdvisoriesCreateRepositoryAdvisoryCveRequest = ( | Response<422, t_validation_error> > +export type SecurityAdvisoriesCreateForkResponder = { + with202(): KoaRuntimeResponse + with400(): KoaRuntimeResponse + with403(): KoaRuntimeResponse + with404(): KoaRuntimeResponse + with422(): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type SecurityAdvisoriesCreateFork = ( + params: Params, + respond: SecurityAdvisoriesCreateForkResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<202, t_full_repository> + | Response<400, t_scim_error> + | Response<403, t_basic_error> + | Response<404, t_basic_error> + | Response<422, t_validation_error> +> + export type ActivityListStargazersForRepoResponder = { with200(): KoaRuntimeResponse with422(): KoaRuntimeResponse @@ -15006,6 +15893,7 @@ export type ReposGetCodeFrequencyStatsResponder = { [key: string]: unknown | undefined }> with204(): KoaRuntimeResponse + with422(): KoaRuntimeResponse } & KoaRuntimeResponder export type ReposGetCodeFrequencyStats = ( @@ -15022,6 +15910,7 @@ export type ReposGetCodeFrequencyStats = ( } > | Response<204, void> + | Response<422, void> > export type ReposGetCommitActivityStatsResponder = { @@ -15425,7 +16314,7 @@ export type ReposDownloadZipballArchive = ( ) => Promise | Response<302, void>> export type ReposCreateUsingTemplateResponder = { - with201(): KoaRuntimeResponse + with201(): KoaRuntimeResponse } & KoaRuntimeResponder export type ReposCreateUsingTemplate = ( @@ -15436,7 +16325,7 @@ export type ReposCreateUsingTemplate = ( >, respond: ReposCreateUsingTemplateResponder, ctx: RouterContext, -) => Promise | Response<201, t_repository>> +) => Promise | Response<201, t_full_repository>> export type ReposListPublicResponder = { with200(): KoaRuntimeResponse @@ -15455,155 +16344,6 @@ export type ReposListPublic = ( | Response<422, t_validation_error> > -export type ActionsListEnvironmentSecretsResponder = { - with200(): KoaRuntimeResponse<{ - secrets: t_actions_secret[] - total_count: number - }> -} & KoaRuntimeResponder - -export type ActionsListEnvironmentSecrets = ( - params: Params< - t_ActionsListEnvironmentSecretsParamSchema, - t_ActionsListEnvironmentSecretsQuerySchema, - void - >, - respond: ActionsListEnvironmentSecretsResponder, - ctx: RouterContext, -) => Promise< - | KoaRuntimeResponse - | Response< - 200, - { - secrets: t_actions_secret[] - total_count: number - } - > -> - -export type ActionsGetEnvironmentPublicKeyResponder = { - with200(): KoaRuntimeResponse -} & KoaRuntimeResponder - -export type ActionsGetEnvironmentPublicKey = ( - params: Params, - respond: ActionsGetEnvironmentPublicKeyResponder, - ctx: RouterContext, -) => Promise | Response<200, t_actions_public_key>> - -export type ActionsGetEnvironmentSecretResponder = { - with200(): KoaRuntimeResponse -} & KoaRuntimeResponder - -export type ActionsGetEnvironmentSecret = ( - params: Params, - respond: ActionsGetEnvironmentSecretResponder, - ctx: RouterContext, -) => Promise | Response<200, t_actions_secret>> - -export type ActionsCreateOrUpdateEnvironmentSecretResponder = { - with201(): KoaRuntimeResponse - with204(): KoaRuntimeResponse -} & KoaRuntimeResponder - -export type ActionsCreateOrUpdateEnvironmentSecret = ( - params: Params< - t_ActionsCreateOrUpdateEnvironmentSecretParamSchema, - void, - t_ActionsCreateOrUpdateEnvironmentSecretBodySchema - >, - respond: ActionsCreateOrUpdateEnvironmentSecretResponder, - ctx: RouterContext, -) => Promise< - | KoaRuntimeResponse - | Response<201, t_empty_object> - | Response<204, void> -> - -export type ActionsDeleteEnvironmentSecretResponder = { - with204(): KoaRuntimeResponse -} & KoaRuntimeResponder - -export type ActionsDeleteEnvironmentSecret = ( - params: Params, - respond: ActionsDeleteEnvironmentSecretResponder, - ctx: RouterContext, -) => Promise | Response<204, void>> - -export type ActionsListEnvironmentVariablesResponder = { - with200(): KoaRuntimeResponse<{ - total_count: number - variables: t_actions_variable[] - }> -} & KoaRuntimeResponder - -export type ActionsListEnvironmentVariables = ( - params: Params< - t_ActionsListEnvironmentVariablesParamSchema, - t_ActionsListEnvironmentVariablesQuerySchema, - void - >, - respond: ActionsListEnvironmentVariablesResponder, - ctx: RouterContext, -) => Promise< - | KoaRuntimeResponse - | Response< - 200, - { - total_count: number - variables: t_actions_variable[] - } - > -> - -export type ActionsCreateEnvironmentVariableResponder = { - with201(): KoaRuntimeResponse -} & KoaRuntimeResponder - -export type ActionsCreateEnvironmentVariable = ( - params: Params< - t_ActionsCreateEnvironmentVariableParamSchema, - void, - t_ActionsCreateEnvironmentVariableBodySchema - >, - respond: ActionsCreateEnvironmentVariableResponder, - ctx: RouterContext, -) => Promise | Response<201, t_empty_object>> - -export type ActionsGetEnvironmentVariableResponder = { - with200(): KoaRuntimeResponse -} & KoaRuntimeResponder - -export type ActionsGetEnvironmentVariable = ( - params: Params, - respond: ActionsGetEnvironmentVariableResponder, - ctx: RouterContext, -) => Promise | Response<200, t_actions_variable>> - -export type ActionsUpdateEnvironmentVariableResponder = { - with204(): KoaRuntimeResponse -} & KoaRuntimeResponder - -export type ActionsUpdateEnvironmentVariable = ( - params: Params< - t_ActionsUpdateEnvironmentVariableParamSchema, - void, - t_ActionsUpdateEnvironmentVariableBodySchema - >, - respond: ActionsUpdateEnvironmentVariableResponder, - ctx: RouterContext, -) => Promise | Response<204, void>> - -export type ActionsDeleteEnvironmentVariableResponder = { - with204(): KoaRuntimeResponse -} & KoaRuntimeResponder - -export type ActionsDeleteEnvironmentVariable = ( - params: Params, - respond: ActionsDeleteEnvironmentVariableResponder, - ctx: RouterContext, -) => Promise | Response<204, void>> - export type SearchCodeResponder = { with200(): KoaRuntimeResponse<{ incomplete_results: boolean @@ -18136,7 +18876,7 @@ export type ReposListForAuthenticatedUser = ( > export type ReposCreateForAuthenticatedUserResponder = { - with201(): KoaRuntimeResponse + with201(): KoaRuntimeResponse with304(): KoaRuntimeResponse with400(): KoaRuntimeResponse with401(): KoaRuntimeResponse @@ -18151,7 +18891,7 @@ export type ReposCreateForAuthenticatedUser = ( ctx: RouterContext, ) => Promise< | KoaRuntimeResponse - | Response<201, t_repository> + | Response<201, t_full_repository> | Response<304, void> | Response<400, t_scim_error> | Response<401, t_basic_error> @@ -19188,6 +19928,7 @@ export type Implementation = { activityMarkNotificationsAsRead: ActivityMarkNotificationsAsRead activityGetThread: ActivityGetThread activityMarkThreadAsRead: ActivityMarkThreadAsRead + activityMarkThreadAsDone: ActivityMarkThreadAsDone activityGetThreadSubscriptionForAuthenticatedUser: ActivityGetThreadSubscriptionForAuthenticatedUser activitySetThreadSubscription: ActivitySetThreadSubscription activityDeleteThreadSubscription: ActivityDeleteThreadSubscription @@ -19260,9 +20001,9 @@ export type Implementation = { codespacesRemoveSelectedRepoFromOrgSecret: CodespacesRemoveSelectedRepoFromOrgSecret copilotGetCopilotOrganizationDetails: CopilotGetCopilotOrganizationDetails copilotListCopilotSeats: CopilotListCopilotSeats - copilotAddCopilotForBusinessSeatsForTeams: CopilotAddCopilotForBusinessSeatsForTeams + copilotAddCopilotSeatsForTeams: CopilotAddCopilotSeatsForTeams copilotCancelCopilotSeatAssignmentForTeams: CopilotCancelCopilotSeatAssignmentForTeams - copilotAddCopilotForBusinessSeatsForUsers: CopilotAddCopilotForBusinessSeatsForUsers + copilotAddCopilotSeatsForUsers: CopilotAddCopilotSeatsForUsers copilotCancelCopilotSeatAssignmentForUsers: CopilotCancelCopilotSeatAssignmentForUsers dependabotListAlertsForOrg: DependabotListAlertsForOrg dependabotListOrgSecrets: DependabotListOrgSecrets @@ -19304,7 +20045,7 @@ export type Implementation = { codespacesGetCodespacesForUserInOrg: CodespacesGetCodespacesForUserInOrg codespacesDeleteFromOrganization: CodespacesDeleteFromOrganization codespacesStopInOrganization: CodespacesStopInOrganization - copilotGetCopilotSeatAssignmentDetailsForUser: CopilotGetCopilotSeatAssignmentDetailsForUser + copilotGetCopilotSeatDetailsForUser: CopilotGetCopilotSeatDetailsForUser orgsGetMembershipForUser: OrgsGetMembershipForUser orgsSetMembershipForUser: OrgsSetMembershipForUser orgsRemoveMembershipForUser: OrgsRemoveMembershipForUser @@ -19315,6 +20056,20 @@ export type Implementation = { migrationsDeleteArchiveForOrg: MigrationsDeleteArchiveForOrg migrationsUnlockRepoForOrg: MigrationsUnlockRepoForOrg migrationsListReposForOrg: MigrationsListReposForOrg + orgsListOrganizationFineGrainedPermissions: OrgsListOrganizationFineGrainedPermissions + orgsListOrgRoles: OrgsListOrgRoles + orgsCreateCustomOrganizationRole: OrgsCreateCustomOrganizationRole + orgsRevokeAllOrgRolesTeam: OrgsRevokeAllOrgRolesTeam + orgsAssignTeamToOrgRole: OrgsAssignTeamToOrgRole + orgsRevokeOrgRoleTeam: OrgsRevokeOrgRoleTeam + orgsRevokeAllOrgRolesUser: OrgsRevokeAllOrgRolesUser + orgsAssignUserToOrgRole: OrgsAssignUserToOrgRole + orgsRevokeOrgRoleUser: OrgsRevokeOrgRoleUser + orgsGetOrgRole: OrgsGetOrgRole + orgsPatchCustomOrganizationRole: OrgsPatchCustomOrganizationRole + orgsDeleteCustomOrganizationRole: OrgsDeleteCustomOrganizationRole + orgsListOrgRoleTeams: OrgsListOrgRoleTeams + orgsListOrgRoleUsers: OrgsListOrgRoleUsers orgsListOutsideCollaborators: OrgsListOutsideCollaborators orgsConvertMemberToOutsideCollaborator: OrgsConvertMemberToOutsideCollaborator orgsRemoveOutsideCollaborator: OrgsRemoveOutsideCollaborator @@ -19336,6 +20091,13 @@ export type Implementation = { orgsListPatGrantRepositories: OrgsListPatGrantRepositories projectsListForOrg: ProjectsListForOrg projectsCreateForOrg: ProjectsCreateForOrg + orgsGetAllCustomProperties: OrgsGetAllCustomProperties + orgsCreateOrUpdateCustomProperties: OrgsCreateOrUpdateCustomProperties + orgsGetCustomProperty: OrgsGetCustomProperty + orgsCreateOrUpdateCustomProperty: OrgsCreateOrUpdateCustomProperty + orgsRemoveCustomProperty: OrgsRemoveCustomProperty + orgsListCustomPropertiesValuesForRepos: OrgsListCustomPropertiesValuesForRepos + orgsCreateOrUpdateCustomPropertiesValuesForRepos: OrgsCreateOrUpdateCustomPropertiesValuesForRepos orgsListPublicMembers: OrgsListPublicMembers orgsCheckPublicMembershipForUser: OrgsCheckPublicMembershipForUser orgsSetPublicMembershipForAuthenticatedUser: OrgsSetPublicMembershipForAuthenticatedUser @@ -19344,6 +20106,8 @@ export type Implementation = { reposCreateInOrg: ReposCreateInOrg reposGetOrgRulesets: ReposGetOrgRulesets reposCreateOrgRuleset: ReposCreateOrgRuleset + reposGetOrgRuleSuites: ReposGetOrgRuleSuites + reposGetOrgRuleSuite: ReposGetOrgRuleSuite reposGetOrgRuleset: ReposGetOrgRuleset reposUpdateOrgRuleset: ReposUpdateOrgRuleset reposDeleteOrgRuleset: ReposDeleteOrgRuleset @@ -19460,6 +20224,7 @@ export type Implementation = { actionsDownloadWorkflowRunAttemptLogs: ActionsDownloadWorkflowRunAttemptLogs actionsCancelWorkflowRun: ActionsCancelWorkflowRun actionsReviewCustomGatesForRun: ActionsReviewCustomGatesForRun + actionsForceCancelWorkflowRun: ActionsForceCancelWorkflowRun actionsListJobsForWorkflowRun: ActionsListJobsForWorkflowRun actionsDownloadWorkflowRunLogs: ActionsDownloadWorkflowRunLogs actionsDeleteWorkflowRunLogs: ActionsDeleteWorkflowRunLogs @@ -19560,6 +20325,7 @@ export type Implementation = { codespacesListDevcontainersInRepositoryForAuthenticatedUser: CodespacesListDevcontainersInRepositoryForAuthenticatedUser codespacesRepoMachinesForAuthenticatedUser: CodespacesRepoMachinesForAuthenticatedUser codespacesPreFlightWithRepoForAuthenticatedUser: CodespacesPreFlightWithRepoForAuthenticatedUser + codespacesCheckPermissionsForDevcontainer: CodespacesCheckPermissionsForDevcontainer codespacesListRepoSecrets: CodespacesListRepoSecrets codespacesGetRepoPublicKey: CodespacesGetRepoPublicKey codespacesGetRepoSecret: CodespacesGetRepoSecret @@ -19626,6 +20392,16 @@ export type Implementation = { reposListCustomDeploymentRuleIntegrations: ReposListCustomDeploymentRuleIntegrations reposGetCustomDeploymentProtectionRule: ReposGetCustomDeploymentProtectionRule reposDisableDeploymentProtectionRule: ReposDisableDeploymentProtectionRule + actionsListEnvironmentSecrets: ActionsListEnvironmentSecrets + actionsGetEnvironmentPublicKey: ActionsGetEnvironmentPublicKey + actionsGetEnvironmentSecret: ActionsGetEnvironmentSecret + actionsCreateOrUpdateEnvironmentSecret: ActionsCreateOrUpdateEnvironmentSecret + actionsDeleteEnvironmentSecret: ActionsDeleteEnvironmentSecret + actionsListEnvironmentVariables: ActionsListEnvironmentVariables + actionsCreateEnvironmentVariable: ActionsCreateEnvironmentVariable + actionsGetEnvironmentVariable: ActionsGetEnvironmentVariable + actionsUpdateEnvironmentVariable: ActionsUpdateEnvironmentVariable + actionsDeleteEnvironmentVariable: ActionsDeleteEnvironmentVariable activityListRepoEvents: ActivityListRepoEvents reposListForks: ReposListForks reposCreateFork: ReposCreateFork @@ -19729,11 +20505,16 @@ export type Implementation = { reposGetLatestPagesBuild: ReposGetLatestPagesBuild reposGetPagesBuild: ReposGetPagesBuild reposCreatePagesDeployment: ReposCreatePagesDeployment + reposGetPagesDeployment: ReposGetPagesDeployment + reposCancelPagesDeployment: ReposCancelPagesDeployment reposGetPagesHealthCheck: ReposGetPagesHealthCheck + reposCheckPrivateVulnerabilityReporting: ReposCheckPrivateVulnerabilityReporting reposEnablePrivateVulnerabilityReporting: ReposEnablePrivateVulnerabilityReporting reposDisablePrivateVulnerabilityReporting: ReposDisablePrivateVulnerabilityReporting projectsListForRepo: ProjectsListForRepo projectsCreateForRepo: ProjectsCreateForRepo + reposGetCustomPropertiesValues: ReposGetCustomPropertiesValues + reposCreateOrUpdateCustomPropertiesValues: ReposCreateOrUpdateCustomPropertiesValues pullsList: PullsList pullsCreate: PullsCreate pullsListReviewCommentsForRepo: PullsListReviewCommentsForRepo @@ -19786,6 +20567,8 @@ export type Implementation = { reposGetBranchRules: ReposGetBranchRules reposGetRepoRulesets: ReposGetRepoRulesets reposCreateRepoRuleset: ReposCreateRepoRuleset + reposGetRepoRuleSuites: ReposGetRepoRuleSuites + reposGetRepoRuleSuite: ReposGetRepoRuleSuite reposGetRepoRuleset: ReposGetRepoRuleset reposUpdateRepoRuleset: ReposUpdateRepoRuleset reposDeleteRepoRuleset: ReposDeleteRepoRuleset @@ -19799,6 +20582,7 @@ export type Implementation = { securityAdvisoriesGetRepositoryAdvisory: SecurityAdvisoriesGetRepositoryAdvisory securityAdvisoriesUpdateRepositoryAdvisory: SecurityAdvisoriesUpdateRepositoryAdvisory securityAdvisoriesCreateRepositoryAdvisoryCveRequest: SecurityAdvisoriesCreateRepositoryAdvisoryCveRequest + securityAdvisoriesCreateFork: SecurityAdvisoriesCreateFork activityListStargazersForRepo: ActivityListStargazersForRepo reposGetCodeFrequencyStats: ReposGetCodeFrequencyStats reposGetCommitActivityStats: ReposGetCommitActivityStats @@ -19829,16 +20613,6 @@ export type Implementation = { reposDownloadZipballArchive: ReposDownloadZipballArchive reposCreateUsingTemplate: ReposCreateUsingTemplate reposListPublic: ReposListPublic - actionsListEnvironmentSecrets: ActionsListEnvironmentSecrets - actionsGetEnvironmentPublicKey: ActionsGetEnvironmentPublicKey - actionsGetEnvironmentSecret: ActionsGetEnvironmentSecret - actionsCreateOrUpdateEnvironmentSecret: ActionsCreateOrUpdateEnvironmentSecret - actionsDeleteEnvironmentSecret: ActionsDeleteEnvironmentSecret - actionsListEnvironmentVariables: ActionsListEnvironmentVariables - actionsCreateEnvironmentVariable: ActionsCreateEnvironmentVariable - actionsGetEnvironmentVariable: ActionsGetEnvironmentVariable - actionsUpdateEnvironmentVariable: ActionsUpdateEnvironmentVariable - actionsDeleteEnvironmentVariable: ActionsDeleteEnvironmentVariable searchCode: SearchCode searchCommits: SearchCommits searchIssuesAndPullRequests: SearchIssuesAndPullRequests @@ -20053,22 +20827,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ghsa_id: z.string().optional(), type: z.enum(["reviewed", "malware", "unreviewed"]).optional(), cve_id: z.string().optional(), - ecosystem: z - .enum([ - "actions", - "composer", - "erlang", - "go", - "maven", - "npm", - "nuget", - "other", - "pip", - "pub", - "rubygems", - "rust", - ]) - .optional(), + ecosystem: s_security_advisory_ecosystems.optional(), severity: z .enum(["unknown", "low", "medium", "high", "critical"]) .optional(), @@ -21919,6 +22678,7 @@ export function createRouter(implementation: Implementation): KoaRouter { per_page: z.coerce.number().optional(), before: z.string().optional(), after: z.string().optional(), + validity: z.string().optional(), }) const secretScanningListAlertsForEnterpriseResponseValidator = @@ -24534,6 +25294,53 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const activityMarkThreadAsDoneParamSchema = z.object({ + thread_id: z.coerce.number(), + }) + + const activityMarkThreadAsDoneResponseValidator = responseValidationFactory( + [["204", z.undefined()]], + undefined, + ) + + router.delete( + "activityMarkThreadAsDone", + "/notifications/threads/:thread_id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + activityMarkThreadAsDoneParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .activityMarkThreadAsDone(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = activityMarkThreadAsDoneResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + const activityGetThreadSubscriptionForAuthenticatedUserParamSchema = z.object( { thread_id: z.coerce.number() }, ) @@ -28863,6 +29670,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ["401", s_basic_error], ["403", s_basic_error], ["404", s_basic_error], + ["422", z.undefined()], ["500", s_basic_error], ], undefined, @@ -28895,6 +29703,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with422() { + return new KoaRuntimeResponse(422) + }, with500() { return new KoaRuntimeResponse(500) }, @@ -29002,15 +29813,15 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) - const copilotAddCopilotForBusinessSeatsForTeamsParamSchema = z.object({ + const copilotAddCopilotSeatsForTeamsParamSchema = z.object({ org: z.string(), }) - const copilotAddCopilotForBusinessSeatsForTeamsBodySchema = z.object({ + const copilotAddCopilotSeatsForTeamsBodySchema = z.object({ selected_teams: z.array(z.string()), }) - const copilotAddCopilotForBusinessSeatsForTeamsResponseValidator = + const copilotAddCopilotSeatsForTeamsResponseValidator = responseValidationFactory( [ ["201", z.object({ seats_created: z.coerce.number() })], @@ -29024,18 +29835,18 @@ export function createRouter(implementation: Implementation): KoaRouter { ) router.post( - "copilotAddCopilotForBusinessSeatsForTeams", + "copilotAddCopilotSeatsForTeams", "/orgs/:org/copilot/billing/selected_teams", async (ctx, next) => { const input = { params: parseRequestInput( - copilotAddCopilotForBusinessSeatsForTeamsParamSchema, + copilotAddCopilotSeatsForTeamsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - copilotAddCopilotForBusinessSeatsForTeamsBodySchema, + copilotAddCopilotSeatsForTeamsBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -29068,7 +29879,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .copilotAddCopilotForBusinessSeatsForTeams(input, responder, ctx) + .copilotAddCopilotSeatsForTeams(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -29076,10 +29887,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = copilotAddCopilotForBusinessSeatsForTeamsResponseValidator( - status, - body, - ) + ctx.body = copilotAddCopilotSeatsForTeamsResponseValidator(status, body) ctx.status = status return next() }, @@ -29168,15 +29976,15 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) - const copilotAddCopilotForBusinessSeatsForUsersParamSchema = z.object({ + const copilotAddCopilotSeatsForUsersParamSchema = z.object({ org: z.string(), }) - const copilotAddCopilotForBusinessSeatsForUsersBodySchema = z.object({ + const copilotAddCopilotSeatsForUsersBodySchema = z.object({ selected_usernames: z.array(z.string()), }) - const copilotAddCopilotForBusinessSeatsForUsersResponseValidator = + const copilotAddCopilotSeatsForUsersResponseValidator = responseValidationFactory( [ ["201", z.object({ seats_created: z.coerce.number() })], @@ -29190,18 +29998,18 @@ export function createRouter(implementation: Implementation): KoaRouter { ) router.post( - "copilotAddCopilotForBusinessSeatsForUsers", + "copilotAddCopilotSeatsForUsers", "/orgs/:org/copilot/billing/selected_users", async (ctx, next) => { const input = { params: parseRequestInput( - copilotAddCopilotForBusinessSeatsForUsersParamSchema, + copilotAddCopilotSeatsForUsersParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - copilotAddCopilotForBusinessSeatsForUsersBodySchema, + copilotAddCopilotSeatsForUsersBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -29234,7 +30042,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .copilotAddCopilotForBusinessSeatsForUsers(input, responder, ctx) + .copilotAddCopilotSeatsForUsers(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -29242,10 +30050,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = copilotAddCopilotForBusinessSeatsForUsersResponseValidator( - status, - body, - ) + ctx.body = copilotAddCopilotSeatsForUsersResponseValidator(status, body) ctx.status = status return next() }, @@ -31132,7 +31937,9 @@ export function createRouter(implementation: Implementation): KoaRouter { .object({ invitee_id: z.coerce.number().optional(), email: z.string().optional(), - role: z.enum(["admin", "direct_member", "billing_manager"]).optional(), + role: z + .enum(["admin", "direct_member", "billing_manager", "reinstate"]) + .optional(), team_ids: z.array(z.coerce.number()).optional(), }) .optional() @@ -31787,12 +32594,12 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) - const copilotGetCopilotSeatAssignmentDetailsForUserParamSchema = z.object({ + const copilotGetCopilotSeatDetailsForUserParamSchema = z.object({ org: z.string(), username: z.string(), }) - const copilotGetCopilotSeatAssignmentDetailsForUserResponseValidator = + const copilotGetCopilotSeatDetailsForUserResponseValidator = responseValidationFactory( [ ["200", s_copilot_seat_details], @@ -31806,12 +32613,12 @@ export function createRouter(implementation: Implementation): KoaRouter { ) router.get( - "copilotGetCopilotSeatAssignmentDetailsForUser", + "copilotGetCopilotSeatDetailsForUser", "/orgs/:org/members/:username/copilot", async (ctx, next) => { const input = { params: parseRequestInput( - copilotGetCopilotSeatAssignmentDetailsForUserParamSchema, + copilotGetCopilotSeatDetailsForUserParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -31844,7 +32651,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .copilotGetCopilotSeatAssignmentDetailsForUser(input, responder, ctx) + .copilotGetCopilotSeatDetailsForUser(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -31852,7 +32659,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = copilotGetCopilotSeatAssignmentDetailsForUserResponseValidator( + ctx.body = copilotGetCopilotSeatDetailsForUserResponseValidator( status, body, ) @@ -32460,38 +33267,45 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) - const orgsListOutsideCollaboratorsParamSchema = z.object({ org: z.string() }) - - const orgsListOutsideCollaboratorsQuerySchema = z.object({ - filter: z.enum(["2fa_disabled", "all"]).optional(), - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), + const orgsListOrganizationFineGrainedPermissionsParamSchema = z.object({ + org: z.string(), }) - const orgsListOutsideCollaboratorsResponseValidator = - responseValidationFactory([["200", z.array(s_simple_user)]], undefined) + const orgsListOrganizationFineGrainedPermissionsResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_organization_fine_grained_permission)], + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) router.get( - "orgsListOutsideCollaborators", - "/orgs/:org/outside_collaborators", + "orgsListOrganizationFineGrainedPermissions", + "/orgs/:org/organization-fine-grained-permissions", async (ctx, next) => { const input = { params: parseRequestInput( - orgsListOutsideCollaboratorsParamSchema, + orgsListOrganizationFineGrainedPermissionsParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - orgsListOutsideCollaboratorsQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse< + t_organization_fine_grained_permission[] + >(200) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -32499,7 +33313,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .orgsListOutsideCollaborators(input, responder, ctx) + .orgsListOrganizationFineGrainedPermissions(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -32507,70 +33321,66 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsListOutsideCollaboratorsResponseValidator(status, body) + ctx.body = orgsListOrganizationFineGrainedPermissionsResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const orgsConvertMemberToOutsideCollaboratorParamSchema = z.object({ - org: z.string(), - username: z.string(), - }) - - const orgsConvertMemberToOutsideCollaboratorBodySchema = z - .object({ async: z.coerce.boolean().optional() }) - .optional() + const orgsListOrgRolesParamSchema = z.object({ org: z.string() }) - const orgsConvertMemberToOutsideCollaboratorResponseValidator = - responseValidationFactory( + const orgsListOrgRolesResponseValidator = responseValidationFactory( + [ [ - ["202", z.object({})], - ["204", z.undefined()], - ["403", z.undefined()], - ["404", s_basic_error], + "200", + z.object({ + total_count: z.coerce.number().optional(), + roles: z.array(s_organization_role).optional(), + }), ], - undefined, - ) + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) - router.put( - "orgsConvertMemberToOutsideCollaborator", - "/orgs/:org/outside_collaborators/:username", + router.get( + "orgsListOrgRoles", + "/orgs/:org/organization-roles", async (ctx, next) => { const input = { params: parseRequestInput( - orgsConvertMemberToOutsideCollaboratorParamSchema, + orgsListOrgRolesParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - orgsConvertMemberToOutsideCollaboratorBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with202() { - return new KoaRuntimeResponse(202) - }, - with204() { - return new KoaRuntimeResponse(204) - }, - with403() { - return new KoaRuntimeResponse(403) + with200() { + return new KoaRuntimeResponse<{ + roles?: t_organization_role[] + total_count?: number + }>(200) }, with404() { return new KoaRuntimeResponse(404) }, + with422() { + return new KoaRuntimeResponse(422) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .orgsConvertMemberToOutsideCollaborator(input, responder, ctx) + .orgsListOrgRoles(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -32578,58 +33388,63 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsConvertMemberToOutsideCollaboratorResponseValidator( - status, - body, - ) + ctx.body = orgsListOrgRolesResponseValidator(status, body) ctx.status = status return next() }, ) - const orgsRemoveOutsideCollaboratorParamSchema = z.object({ + const orgsCreateCustomOrganizationRoleParamSchema = z.object({ org: z.string(), - username: z.string(), }) - const orgsRemoveOutsideCollaboratorResponseValidator = + const orgsCreateCustomOrganizationRoleBodySchema = z.object({ + name: z.string(), + description: z.string().optional(), + permissions: z.array(z.string()), + }) + + const orgsCreateCustomOrganizationRoleResponseValidator = responseValidationFactory( [ - ["204", z.undefined()], - [ - "422", - z.object({ - message: z.string().optional(), - documentation_url: z.string().optional(), - }), - ], + ["201", s_organization_role], + ["404", s_basic_error], + ["409", s_basic_error], + ["422", s_validation_error], ], undefined, ) - router.delete( - "orgsRemoveOutsideCollaborator", - "/orgs/:org/outside_collaborators/:username", + router.post( + "orgsCreateCustomOrganizationRole", + "/orgs/:org/organization-roles", async (ctx, next) => { const input = { params: parseRequestInput( - orgsRemoveOutsideCollaboratorParamSchema, + orgsCreateCustomOrganizationRoleParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, + body: parseRequestInput( + orgsCreateCustomOrganizationRoleBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with201() { + return new KoaRuntimeResponse(201) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with409() { + return new KoaRuntimeResponse(409) }, with422() { - return new KoaRuntimeResponse<{ - documentation_url?: string - message?: string - }>(422) + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -32637,7 +33452,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .orgsRemoveOutsideCollaborator(input, responder, ctx) + .orgsCreateCustomOrganizationRole(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -32645,71 +33460,39 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsRemoveOutsideCollaboratorResponseValidator(status, body) + ctx.body = orgsCreateCustomOrganizationRoleResponseValidator(status, body) ctx.status = status return next() }, ) - const packagesListPackagesForOrganizationParamSchema = z.object({ + const orgsRevokeAllOrgRolesTeamParamSchema = z.object({ org: z.string(), + team_slug: z.string(), }) - const packagesListPackagesForOrganizationQuerySchema = z.object({ - package_type: z.enum([ - "npm", - "maven", - "rubygems", - "docker", - "nuget", - "container", - ]), - visibility: z.enum(["public", "private", "internal"]).optional(), - page: z.coerce.number().optional(), - per_page: z.coerce.number().optional(), - }) - - const packagesListPackagesForOrganizationResponseValidator = - responseValidationFactory( - [ - ["200", z.array(s_package)], - ["400", z.undefined()], - ["401", s_basic_error], - ["403", s_basic_error], - ], - undefined, - ) + const orgsRevokeAllOrgRolesTeamResponseValidator = responseValidationFactory( + [["204", z.undefined()]], + undefined, + ) - router.get( - "packagesListPackagesForOrganization", - "/orgs/:org/packages", + router.delete( + "orgsRevokeAllOrgRolesTeam", + "/orgs/:org/organization-roles/teams/:team_slug", async (ctx, next) => { const input = { params: parseRequestInput( - packagesListPackagesForOrganizationParamSchema, + orgsRevokeAllOrgRolesTeamParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - packagesListPackagesForOrganizationQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with400() { - return new KoaRuntimeResponse(400) - }, - with401() { - return new KoaRuntimeResponse(401) - }, - with403() { - return new KoaRuntimeResponse(403) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -32717,7 +33500,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .packagesListPackagesForOrganization(input, responder, ctx) + .orgsRevokeAllOrgRolesTeam(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -32725,38 +33508,34 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = packagesListPackagesForOrganizationResponseValidator( - status, - body, - ) + ctx.body = orgsRevokeAllOrgRolesTeamResponseValidator(status, body) ctx.status = status return next() }, ) - const packagesGetPackageForOrganizationParamSchema = z.object({ - package_type: z.enum([ - "npm", - "maven", - "rubygems", - "docker", - "nuget", - "container", - ]), - package_name: z.string(), + const orgsAssignTeamToOrgRoleParamSchema = z.object({ org: z.string(), + team_slug: z.string(), + role_id: z.coerce.number(), }) - const packagesGetPackageForOrganizationResponseValidator = - responseValidationFactory([["200", s_package]], undefined) + const orgsAssignTeamToOrgRoleResponseValidator = responseValidationFactory( + [ + ["204", z.undefined()], + ["404", z.undefined()], + ["422", z.undefined()], + ], + undefined, + ) - router.get( - "packagesGetPackageForOrganization", - "/orgs/:org/packages/:package_type/:package_name", + router.put( + "orgsAssignTeamToOrgRole", + "/orgs/:org/organization-roles/teams/:team_slug/:role_id", async (ctx, next) => { const input = { params: parseRequestInput( - packagesGetPackageForOrganizationParamSchema, + orgsAssignTeamToOrgRoleParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -32765,8 +33544,14 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with204() { + return new KoaRuntimeResponse(204) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -32774,7 +33559,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .packagesGetPackageForOrganization(input, responder, ctx) + .orgsAssignTeamToOrgRole(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -32782,46 +33567,30 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = packagesGetPackageForOrganizationResponseValidator( - status, - body, - ) + ctx.body = orgsAssignTeamToOrgRoleResponseValidator(status, body) ctx.status = status return next() }, ) - const packagesDeletePackageForOrgParamSchema = z.object({ - package_type: z.enum([ - "npm", - "maven", - "rubygems", - "docker", - "nuget", - "container", - ]), - package_name: z.string(), + const orgsRevokeOrgRoleTeamParamSchema = z.object({ org: z.string(), + team_slug: z.string(), + role_id: z.coerce.number(), }) - const packagesDeletePackageForOrgResponseValidator = - responseValidationFactory( - [ - ["204", z.undefined()], - ["401", s_basic_error], - ["403", s_basic_error], - ["404", s_basic_error], - ], - undefined, - ) + const orgsRevokeOrgRoleTeamResponseValidator = responseValidationFactory( + [["204", z.undefined()]], + undefined, + ) router.delete( - "packagesDeletePackageForOrg", - "/orgs/:org/packages/:package_type/:package_name", + "orgsRevokeOrgRoleTeam", + "/orgs/:org/organization-roles/teams/:team_slug/:role_id", async (ctx, next) => { const input = { params: parseRequestInput( - packagesDeletePackageForOrgParamSchema, + orgsRevokeOrgRoleTeamParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -32833,22 +33602,13 @@ export function createRouter(implementation: Implementation): KoaRouter { with204() { return new KoaRuntimeResponse(204) }, - with401() { - return new KoaRuntimeResponse(401) - }, - with403() { - return new KoaRuntimeResponse(403) - }, - with404() { - return new KoaRuntimeResponse(404) - }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .packagesDeletePackageForOrg(input, responder, ctx) + .orgsRevokeOrgRoleTeam(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -32856,55 +33616,33 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = packagesDeletePackageForOrgResponseValidator(status, body) + ctx.body = orgsRevokeOrgRoleTeamResponseValidator(status, body) ctx.status = status return next() }, ) - const packagesRestorePackageForOrgParamSchema = z.object({ - package_type: z.enum([ - "npm", - "maven", - "rubygems", - "docker", - "nuget", - "container", - ]), - package_name: z.string(), + const orgsRevokeAllOrgRolesUserParamSchema = z.object({ org: z.string(), + username: z.string(), }) - const packagesRestorePackageForOrgQuerySchema = z.object({ - token: z.string().optional(), - }) - - const packagesRestorePackageForOrgResponseValidator = - responseValidationFactory( - [ - ["204", z.undefined()], - ["401", s_basic_error], - ["403", s_basic_error], - ["404", s_basic_error], - ], - undefined, - ) + const orgsRevokeAllOrgRolesUserResponseValidator = responseValidationFactory( + [["204", z.undefined()]], + undefined, + ) - router.post( - "packagesRestorePackageForOrg", - "/orgs/:org/packages/:package_type/:package_name/restore", + router.delete( + "orgsRevokeAllOrgRolesUser", + "/orgs/:org/organization-roles/users/:username", async (ctx, next) => { const input = { params: parseRequestInput( - packagesRestorePackageForOrgParamSchema, + orgsRevokeAllOrgRolesUserParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - packagesRestorePackageForOrgQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } @@ -32912,22 +33650,13 @@ export function createRouter(implementation: Implementation): KoaRouter { with204() { return new KoaRuntimeResponse(204) }, - with401() { - return new KoaRuntimeResponse(401) - }, - with403() { - return new KoaRuntimeResponse(403) - }, - with404() { - return new KoaRuntimeResponse(404) - }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .packagesRestorePackageForOrg(input, responder, ctx) + .orgsRevokeAllOrgRolesUser(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -32935,76 +33664,50 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = packagesRestorePackageForOrgResponseValidator(status, body) + ctx.body = orgsRevokeAllOrgRolesUserResponseValidator(status, body) ctx.status = status return next() }, ) - const packagesGetAllPackageVersionsForPackageOwnedByOrgParamSchema = z.object( - { - package_type: z.enum([ - "npm", - "maven", - "rubygems", - "docker", - "nuget", - "container", - ]), - package_name: z.string(), - org: z.string(), - }, - ) + const orgsAssignUserToOrgRoleParamSchema = z.object({ + org: z.string(), + username: z.string(), + role_id: z.coerce.number(), + }) - const packagesGetAllPackageVersionsForPackageOwnedByOrgQuerySchema = z.object( - { - page: z.coerce.number().optional(), - per_page: z.coerce.number().optional(), - state: z.enum(["active", "deleted"]).optional(), - }, + const orgsAssignUserToOrgRoleResponseValidator = responseValidationFactory( + [ + ["204", z.undefined()], + ["404", z.undefined()], + ["422", z.undefined()], + ], + undefined, ) - const packagesGetAllPackageVersionsForPackageOwnedByOrgResponseValidator = - responseValidationFactory( - [ - ["200", z.array(s_package_version)], - ["401", s_basic_error], - ["403", s_basic_error], - ["404", s_basic_error], - ], - undefined, - ) - - router.get( - "packagesGetAllPackageVersionsForPackageOwnedByOrg", - "/orgs/:org/packages/:package_type/:package_name/versions", + router.put( + "orgsAssignUserToOrgRole", + "/orgs/:org/organization-roles/users/:username/:role_id", async (ctx, next) => { const input = { params: parseRequestInput( - packagesGetAllPackageVersionsForPackageOwnedByOrgParamSchema, + orgsAssignUserToOrgRoleParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - packagesGetAllPackageVersionsForPackageOwnedByOrgQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with401() { - return new KoaRuntimeResponse(401) - }, - with403() { - return new KoaRuntimeResponse(403) + with204() { + return new KoaRuntimeResponse(204) }, with404() { - return new KoaRuntimeResponse(404) + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -33012,11 +33715,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .packagesGetAllPackageVersionsForPackageOwnedByOrg( - input, - responder, - ctx, - ) + .orgsAssignUserToOrgRole(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33024,40 +33723,30 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = - packagesGetAllPackageVersionsForPackageOwnedByOrgResponseValidator( - status, - body, - ) + ctx.body = orgsAssignUserToOrgRoleResponseValidator(status, body) ctx.status = status return next() }, ) - const packagesGetPackageVersionForOrganizationParamSchema = z.object({ - package_type: z.enum([ - "npm", - "maven", - "rubygems", - "docker", - "nuget", - "container", - ]), - package_name: z.string(), + const orgsRevokeOrgRoleUserParamSchema = z.object({ org: z.string(), - package_version_id: z.coerce.number(), + username: z.string(), + role_id: z.coerce.number(), }) - const packagesGetPackageVersionForOrganizationResponseValidator = - responseValidationFactory([["200", s_package_version]], undefined) + const orgsRevokeOrgRoleUserResponseValidator = responseValidationFactory( + [["204", z.undefined()]], + undefined, + ) - router.get( - "packagesGetPackageVersionForOrganization", - "/orgs/:org/packages/:package_type/:package_name/versions/:package_version_id", + router.delete( + "orgsRevokeOrgRoleUser", + "/orgs/:org/organization-roles/users/:username/:role_id", async (ctx, next) => { const input = { params: parseRequestInput( - packagesGetPackageVersionForOrganizationParamSchema, + orgsRevokeOrgRoleUserParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -33066,8 +33755,8 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -33075,7 +33764,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .packagesGetPackageVersionForOrganization(input, responder, ctx) + .orgsRevokeOrgRoleUser(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33083,47 +33772,33 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = packagesGetPackageVersionForOrganizationResponseValidator( - status, - body, - ) + ctx.body = orgsRevokeOrgRoleUserResponseValidator(status, body) ctx.status = status return next() }, ) - const packagesDeletePackageVersionForOrgParamSchema = z.object({ - package_type: z.enum([ - "npm", - "maven", - "rubygems", - "docker", - "nuget", - "container", - ]), - package_name: z.string(), + const orgsGetOrgRoleParamSchema = z.object({ org: z.string(), - package_version_id: z.coerce.number(), + role_id: z.coerce.number(), }) - const packagesDeletePackageVersionForOrgResponseValidator = - responseValidationFactory( - [ - ["204", z.undefined()], - ["401", s_basic_error], - ["403", s_basic_error], - ["404", s_basic_error], - ], - undefined, - ) + const orgsGetOrgRoleResponseValidator = responseValidationFactory( + [ + ["200", s_organization_role], + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) - router.delete( - "packagesDeletePackageVersionForOrg", - "/orgs/:org/packages/:package_type/:package_name/versions/:package_version_id", + router.get( + "orgsGetOrgRole", + "/orgs/:org/organization-roles/:role_id", async (ctx, next) => { const input = { params: parseRequestInput( - packagesDeletePackageVersionForOrgParamSchema, + orgsGetOrgRoleParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -33132,25 +33807,22 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with204() { - return new KoaRuntimeResponse(204) - }, - with401() { - return new KoaRuntimeResponse(401) - }, - with403() { - return new KoaRuntimeResponse(403) + with200() { + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) }, + with422() { + return new KoaRuntimeResponse(422) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .packagesDeletePackageVersionForOrg(input, responder, ctx) + .orgsGetOrgRole(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33158,158 +33830,72 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = packagesDeletePackageVersionForOrgResponseValidator( - status, - body, - ) + ctx.body = orgsGetOrgRoleResponseValidator(status, body) ctx.status = status return next() }, ) - const packagesRestorePackageVersionForOrgParamSchema = z.object({ - package_type: z.enum([ - "npm", - "maven", - "rubygems", - "docker", - "nuget", - "container", - ]), - package_name: z.string(), + const orgsPatchCustomOrganizationRoleParamSchema = z.object({ org: z.string(), - package_version_id: z.coerce.number(), + role_id: z.coerce.number(), }) - const packagesRestorePackageVersionForOrgResponseValidator = + const orgsPatchCustomOrganizationRoleBodySchema = z.object({ + name: z.string().optional(), + description: z.string().optional(), + permissions: z.array(z.string()).optional(), + }) + + const orgsPatchCustomOrganizationRoleResponseValidator = responseValidationFactory( [ - ["204", z.undefined()], - ["401", s_basic_error], - ["403", s_basic_error], + ["200", s_organization_role], ["404", s_basic_error], + ["409", s_basic_error], + ["422", s_validation_error], ], undefined, ) - router.post( - "packagesRestorePackageVersionForOrg", - "/orgs/:org/packages/:package_type/:package_name/versions/:package_version_id/restore", + router.patch( + "orgsPatchCustomOrganizationRole", + "/orgs/:org/organization-roles/:role_id", async (ctx, next) => { const input = { params: parseRequestInput( - packagesRestorePackageVersionForOrgParamSchema, + orgsPatchCustomOrganizationRoleParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, - } - - const responder = { - with204() { - return new KoaRuntimeResponse(204) - }, - with401() { - return new KoaRuntimeResponse(401) - }, - with403() { - return new KoaRuntimeResponse(403) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .packagesRestorePackageVersionForOrg(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = packagesRestorePackageVersionForOrgResponseValidator( - status, - body, - ) - ctx.status = status - return next() - }, - ) - - const orgsListPatGrantRequestsParamSchema = z.object({ org: z.string() }) - - const orgsListPatGrantRequestsQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), - sort: z.enum(["created_at"]).optional(), - direction: z.enum(["asc", "desc"]).optional(), - owner: z.array(z.string()).optional(), - repository: z.string().optional(), - permission: z.string().optional(), - last_used_before: z.string().datetime({ offset: true }).optional(), - last_used_after: z.string().datetime({ offset: true }).optional(), - }) - - const orgsListPatGrantRequestsResponseValidator = responseValidationFactory( - [ - ["200", z.array(s_organization_programmatic_access_grant_request)], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ["500", s_basic_error], - ], - undefined, - ) - - router.get( - "orgsListPatGrantRequests", - "/orgs/:org/personal-access-token-requests", - async (ctx, next) => { - const input = { - params: parseRequestInput( - orgsListPatGrantRequestsParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: parseRequestInput( - orgsListPatGrantRequestsQuerySchema, - ctx.query, - RequestInputType.QueryString, + body: parseRequestInput( + orgsPatchCustomOrganizationRoleBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse< - t_organization_programmatic_access_grant_request[] - >(200) - }, - with403() { - return new KoaRuntimeResponse(403) + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, - with500() { - return new KoaRuntimeResponse(500) - }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .orgsListPatGrantRequests(input, responder, ctx) + .orgsPatchCustomOrganizationRole(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33317,69 +33903,37 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsListPatGrantRequestsResponseValidator(status, body) + ctx.body = orgsPatchCustomOrganizationRoleResponseValidator(status, body) ctx.status = status return next() }, ) - const orgsReviewPatGrantRequestsInBulkParamSchema = z.object({ + const orgsDeleteCustomOrganizationRoleParamSchema = z.object({ org: z.string(), + role_id: z.coerce.number(), }) - const orgsReviewPatGrantRequestsInBulkBodySchema = z.object({ - pat_request_ids: z.array(z.coerce.number()).optional(), - action: z.enum(["approve", "deny"]), - reason: z.string().nullable().optional(), - }) - - const orgsReviewPatGrantRequestsInBulkResponseValidator = - responseValidationFactory( - [ - ["202", z.record(z.any())], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ["500", s_basic_error], - ], - undefined, - ) + const orgsDeleteCustomOrganizationRoleResponseValidator = + responseValidationFactory([["204", z.undefined()]], undefined) - router.post( - "orgsReviewPatGrantRequestsInBulk", - "/orgs/:org/personal-access-token-requests", + router.delete( + "orgsDeleteCustomOrganizationRole", + "/orgs/:org/organization-roles/:role_id", async (ctx, next) => { const input = { params: parseRequestInput( - orgsReviewPatGrantRequestsInBulkParamSchema, + orgsDeleteCustomOrganizationRoleParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - orgsReviewPatGrantRequestsInBulkBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with202() { - return new KoaRuntimeResponse<{ - [key: string]: unknown | undefined - }>(202) - }, - with403() { - return new KoaRuntimeResponse(403) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - with422() { - return new KoaRuntimeResponse(422) - }, - with500() { - return new KoaRuntimeResponse(500) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -33387,7 +33941,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .orgsReviewPatGrantRequestsInBulk(input, responder, ctx) + .orgsDeleteCustomOrganizationRole(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33395,66 +33949,58 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsReviewPatGrantRequestsInBulkResponseValidator(status, body) + ctx.body = orgsDeleteCustomOrganizationRoleResponseValidator(status, body) ctx.status = status return next() }, ) - const orgsReviewPatGrantRequestParamSchema = z.object({ + const orgsListOrgRoleTeamsParamSchema = z.object({ org: z.string(), - pat_request_id: z.coerce.number(), + role_id: z.coerce.number(), }) - const orgsReviewPatGrantRequestBodySchema = z.object({ - action: z.enum(["approve", "deny"]), - reason: z.string().nullable().optional(), + const orgsListOrgRoleTeamsQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), }) - const orgsReviewPatGrantRequestResponseValidator = responseValidationFactory( + const orgsListOrgRoleTeamsResponseValidator = responseValidationFactory( [ - ["204", z.undefined()], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ["500", s_basic_error], + ["200", z.array(s_team)], + ["404", z.undefined()], + ["422", z.undefined()], ], undefined, ) - router.post( - "orgsReviewPatGrantRequest", - "/orgs/:org/personal-access-token-requests/:pat_request_id", + router.get( + "orgsListOrgRoleTeams", + "/orgs/:org/organization-roles/:role_id/teams", async (ctx, next) => { const input = { params: parseRequestInput( - orgsReviewPatGrantRequestParamSchema, + orgsListOrgRoleTeamsParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, - body: parseRequestInput( - orgsReviewPatGrantRequestBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, + query: parseRequestInput( + orgsListOrgRoleTeamsQuerySchema, + ctx.query, + RequestInputType.QueryString, ), + body: undefined, } const responder = { - with204() { - return new KoaRuntimeResponse(204) - }, - with403() { - return new KoaRuntimeResponse(403) + with200() { + return new KoaRuntimeResponse(200) }, with404() { - return new KoaRuntimeResponse(404) + return new KoaRuntimeResponse(404) }, with422() { - return new KoaRuntimeResponse(422) - }, - with500() { - return new KoaRuntimeResponse(500) + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -33462,7 +34008,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .orgsReviewPatGrantRequest(input, responder, ctx) + .orgsListOrgRoleTeams(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33470,45 +34016,43 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsReviewPatGrantRequestResponseValidator(status, body) + ctx.body = orgsListOrgRoleTeamsResponseValidator(status, body) ctx.status = status return next() }, ) - const orgsListPatGrantRequestRepositoriesParamSchema = z.object({ + const orgsListOrgRoleUsersParamSchema = z.object({ org: z.string(), - pat_request_id: z.coerce.number(), + role_id: z.coerce.number(), }) - const orgsListPatGrantRequestRepositoriesQuerySchema = z.object({ + const orgsListOrgRoleUsersQuerySchema = z.object({ per_page: z.coerce.number().optional(), page: z.coerce.number().optional(), }) - const orgsListPatGrantRequestRepositoriesResponseValidator = - responseValidationFactory( - [ - ["200", z.array(s_minimal_repository)], - ["403", s_basic_error], - ["404", s_basic_error], - ["500", s_basic_error], - ], - undefined, - ) + const orgsListOrgRoleUsersResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_simple_user)], + ["404", z.undefined()], + ["422", z.undefined()], + ], + undefined, + ) router.get( - "orgsListPatGrantRequestRepositories", - "/orgs/:org/personal-access-token-requests/:pat_request_id/repositories", + "orgsListOrgRoleUsers", + "/orgs/:org/organization-roles/:role_id/users", async (ctx, next) => { const input = { params: parseRequestInput( - orgsListPatGrantRequestRepositoriesParamSchema, + orgsListOrgRoleUsersParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - orgsListPatGrantRequestRepositoriesQuerySchema, + orgsListOrgRoleUsersQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -33517,16 +34061,13 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with403() { - return new KoaRuntimeResponse(403) + return new KoaRuntimeResponse(200) }, with404() { - return new KoaRuntimeResponse(404) + return new KoaRuntimeResponse(404) }, - with500() { - return new KoaRuntimeResponse(500) + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -33534,7 +34075,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .orgsListPatGrantRequestRepositories(input, responder, ctx) + .orgsListOrgRoleUsers(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33542,52 +34083,35 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsListPatGrantRequestRepositoriesResponseValidator( - status, - body, - ) + ctx.body = orgsListOrgRoleUsersResponseValidator(status, body) ctx.status = status return next() }, ) - const orgsListPatGrantsParamSchema = z.object({ org: z.string() }) + const orgsListOutsideCollaboratorsParamSchema = z.object({ org: z.string() }) - const orgsListPatGrantsQuerySchema = z.object({ + const orgsListOutsideCollaboratorsQuerySchema = z.object({ + filter: z.enum(["2fa_disabled", "all"]).optional(), per_page: z.coerce.number().optional(), page: z.coerce.number().optional(), - sort: z.enum(["created_at"]).optional(), - direction: z.enum(["asc", "desc"]).optional(), - owner: z.array(z.string()).optional(), - repository: z.string().optional(), - permission: z.string().optional(), - last_used_before: z.string().datetime({ offset: true }).optional(), - last_used_after: z.string().datetime({ offset: true }).optional(), }) - const orgsListPatGrantsResponseValidator = responseValidationFactory( - [ - ["200", z.array(s_organization_programmatic_access_grant)], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ["500", s_basic_error], - ], - undefined, - ) + const orgsListOutsideCollaboratorsResponseValidator = + responseValidationFactory([["200", z.array(s_simple_user)]], undefined) router.get( - "orgsListPatGrants", - "/orgs/:org/personal-access-tokens", + "orgsListOutsideCollaborators", + "/orgs/:org/outside_collaborators", async (ctx, next) => { const input = { params: parseRequestInput( - orgsListPatGrantsParamSchema, + orgsListOutsideCollaboratorsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - orgsListPatGrantsQuerySchema, + orgsListOutsideCollaboratorsQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -33596,21 +34120,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse< - t_organization_programmatic_access_grant[] - >(200) - }, - with403() { - return new KoaRuntimeResponse(403) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - with422() { - return new KoaRuntimeResponse(422) - }, - with500() { - return new KoaRuntimeResponse(500) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -33618,7 +34128,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .orgsListPatGrants(input, responder, ctx) + .orgsListOutsideCollaborators(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33626,43 +34136,45 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsListPatGrantsResponseValidator(status, body) + ctx.body = orgsListOutsideCollaboratorsResponseValidator(status, body) ctx.status = status return next() }, ) - const orgsUpdatePatAccessesParamSchema = z.object({ org: z.string() }) - - const orgsUpdatePatAccessesBodySchema = z.object({ - action: z.enum(["revoke"]), - pat_ids: z.array(z.coerce.number()), + const orgsConvertMemberToOutsideCollaboratorParamSchema = z.object({ + org: z.string(), + username: z.string(), }) - const orgsUpdatePatAccessesResponseValidator = responseValidationFactory( - [ - ["202", z.record(z.any())], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ["500", s_basic_error], - ], - undefined, - ) + const orgsConvertMemberToOutsideCollaboratorBodySchema = z + .object({ async: z.coerce.boolean().optional() }) + .optional() - router.post( - "orgsUpdatePatAccesses", - "/orgs/:org/personal-access-tokens", + const orgsConvertMemberToOutsideCollaboratorResponseValidator = + responseValidationFactory( + [ + ["202", z.object({})], + ["204", z.undefined()], + ["403", z.undefined()], + ["404", s_basic_error], + ], + undefined, + ) + + router.put( + "orgsConvertMemberToOutsideCollaborator", + "/orgs/:org/outside_collaborators/:username", async (ctx, next) => { const input = { params: parseRequestInput( - orgsUpdatePatAccessesParamSchema, + orgsConvertMemberToOutsideCollaboratorParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - orgsUpdatePatAccessesBodySchema, + orgsConvertMemberToOutsideCollaboratorBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -33670,29 +34182,24 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with202() { - return new KoaRuntimeResponse<{ - [key: string]: unknown | undefined - }>(202) + return new KoaRuntimeResponse(202) + }, + with204() { + return new KoaRuntimeResponse(204) }, with403() { - return new KoaRuntimeResponse(403) + return new KoaRuntimeResponse(403) }, with404() { return new KoaRuntimeResponse(404) }, - with422() { - return new KoaRuntimeResponse(422) - }, - with500() { - return new KoaRuntimeResponse(500) - }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .orgsUpdatePatAccesses(input, responder, ctx) + .orgsConvertMemberToOutsideCollaborator(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33700,63 +34207,58 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsUpdatePatAccessesResponseValidator(status, body) + ctx.body = orgsConvertMemberToOutsideCollaboratorResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const orgsUpdatePatAccessParamSchema = z.object({ + const orgsRemoveOutsideCollaboratorParamSchema = z.object({ org: z.string(), - pat_id: z.coerce.number(), + username: z.string(), }) - const orgsUpdatePatAccessBodySchema = z.object({ action: z.enum(["revoke"]) }) - - const orgsUpdatePatAccessResponseValidator = responseValidationFactory( - [ - ["204", z.undefined()], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ["500", s_basic_error], - ], - undefined, - ) + const orgsRemoveOutsideCollaboratorResponseValidator = + responseValidationFactory( + [ + ["204", z.undefined()], + [ + "422", + z.object({ + message: z.string().optional(), + documentation_url: z.string().optional(), + }), + ], + ], + undefined, + ) - router.post( - "orgsUpdatePatAccess", - "/orgs/:org/personal-access-tokens/:pat_id", + router.delete( + "orgsRemoveOutsideCollaborator", + "/orgs/:org/outside_collaborators/:username", async (ctx, next) => { const input = { params: parseRequestInput( - orgsUpdatePatAccessParamSchema, + orgsRemoveOutsideCollaboratorParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - orgsUpdatePatAccessBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { with204() { return new KoaRuntimeResponse(204) }, - with403() { - return new KoaRuntimeResponse(403) - }, - with404() { - return new KoaRuntimeResponse(404) - }, with422() { - return new KoaRuntimeResponse(422) - }, - with500() { - return new KoaRuntimeResponse(500) + return new KoaRuntimeResponse<{ + documentation_url?: string + message?: string + }>(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -33764,7 +34266,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .orgsUpdatePatAccess(input, responder, ctx) + .orgsRemoveOutsideCollaborator(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33772,54 +34274,1573 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsUpdatePatAccessResponseValidator(status, body) + ctx.body = orgsRemoveOutsideCollaboratorResponseValidator(status, body) ctx.status = status return next() }, ) - const orgsListPatGrantRepositoriesParamSchema = z.object({ + const packagesListPackagesForOrganizationParamSchema = z.object({ org: z.string(), - pat_id: z.coerce.number(), }) - const orgsListPatGrantRepositoriesQuerySchema = z.object({ - per_page: z.coerce.number().optional(), + const packagesListPackagesForOrganizationQuerySchema = z.object({ + package_type: z.enum([ + "npm", + "maven", + "rubygems", + "docker", + "nuget", + "container", + ]), + visibility: z.enum(["public", "private", "internal"]).optional(), page: z.coerce.number().optional(), + per_page: z.coerce.number().optional(), }) - const orgsListPatGrantRepositoriesResponseValidator = + const packagesListPackagesForOrganizationResponseValidator = responseValidationFactory( [ - ["200", z.array(s_minimal_repository)], + ["200", z.array(s_package)], + ["400", z.undefined()], + ["401", s_basic_error], ["403", s_basic_error], - ["404", s_basic_error], - ["500", s_basic_error], ], undefined, ) router.get( - "orgsListPatGrantRepositories", - "/orgs/:org/personal-access-tokens/:pat_id/repositories", - async (ctx, next) => { + "packagesListPackagesForOrganization", + "/orgs/:org/packages", + async (ctx, next) => { + const input = { + params: parseRequestInput( + packagesListPackagesForOrganizationParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + packagesListPackagesForOrganizationQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with400() { + return new KoaRuntimeResponse(400) + }, + with401() { + return new KoaRuntimeResponse(401) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .packagesListPackagesForOrganization(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = packagesListPackagesForOrganizationResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const packagesGetPackageForOrganizationParamSchema = z.object({ + package_type: z.enum([ + "npm", + "maven", + "rubygems", + "docker", + "nuget", + "container", + ]), + package_name: z.string(), + org: z.string(), + }) + + const packagesGetPackageForOrganizationResponseValidator = + responseValidationFactory([["200", s_package]], undefined) + + router.get( + "packagesGetPackageForOrganization", + "/orgs/:org/packages/:package_type/:package_name", + async (ctx, next) => { + const input = { + params: parseRequestInput( + packagesGetPackageForOrganizationParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .packagesGetPackageForOrganization(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = packagesGetPackageForOrganizationResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const packagesDeletePackageForOrgParamSchema = z.object({ + package_type: z.enum([ + "npm", + "maven", + "rubygems", + "docker", + "nuget", + "container", + ]), + package_name: z.string(), + org: z.string(), + }) + + const packagesDeletePackageForOrgResponseValidator = + responseValidationFactory( + [ + ["204", z.undefined()], + ["401", s_basic_error], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.delete( + "packagesDeletePackageForOrg", + "/orgs/:org/packages/:package_type/:package_name", + async (ctx, next) => { + const input = { + params: parseRequestInput( + packagesDeletePackageForOrgParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + with401() { + return new KoaRuntimeResponse(401) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .packagesDeletePackageForOrg(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = packagesDeletePackageForOrgResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const packagesRestorePackageForOrgParamSchema = z.object({ + package_type: z.enum([ + "npm", + "maven", + "rubygems", + "docker", + "nuget", + "container", + ]), + package_name: z.string(), + org: z.string(), + }) + + const packagesRestorePackageForOrgQuerySchema = z.object({ + token: z.string().optional(), + }) + + const packagesRestorePackageForOrgResponseValidator = + responseValidationFactory( + [ + ["204", z.undefined()], + ["401", s_basic_error], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.post( + "packagesRestorePackageForOrg", + "/orgs/:org/packages/:package_type/:package_name/restore", + async (ctx, next) => { + const input = { + params: parseRequestInput( + packagesRestorePackageForOrgParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + packagesRestorePackageForOrgQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + with401() { + return new KoaRuntimeResponse(401) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .packagesRestorePackageForOrg(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = packagesRestorePackageForOrgResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const packagesGetAllPackageVersionsForPackageOwnedByOrgParamSchema = z.object( + { + package_type: z.enum([ + "npm", + "maven", + "rubygems", + "docker", + "nuget", + "container", + ]), + package_name: z.string(), + org: z.string(), + }, + ) + + const packagesGetAllPackageVersionsForPackageOwnedByOrgQuerySchema = z.object( + { + page: z.coerce.number().optional(), + per_page: z.coerce.number().optional(), + state: z.enum(["active", "deleted"]).optional(), + }, + ) + + const packagesGetAllPackageVersionsForPackageOwnedByOrgResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_package_version)], + ["401", s_basic_error], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "packagesGetAllPackageVersionsForPackageOwnedByOrg", + "/orgs/:org/packages/:package_type/:package_name/versions", + async (ctx, next) => { + const input = { + params: parseRequestInput( + packagesGetAllPackageVersionsForPackageOwnedByOrgParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + packagesGetAllPackageVersionsForPackageOwnedByOrgQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with401() { + return new KoaRuntimeResponse(401) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .packagesGetAllPackageVersionsForPackageOwnedByOrg( + input, + responder, + ctx, + ) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = + packagesGetAllPackageVersionsForPackageOwnedByOrgResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const packagesGetPackageVersionForOrganizationParamSchema = z.object({ + package_type: z.enum([ + "npm", + "maven", + "rubygems", + "docker", + "nuget", + "container", + ]), + package_name: z.string(), + org: z.string(), + package_version_id: z.coerce.number(), + }) + + const packagesGetPackageVersionForOrganizationResponseValidator = + responseValidationFactory([["200", s_package_version]], undefined) + + router.get( + "packagesGetPackageVersionForOrganization", + "/orgs/:org/packages/:package_type/:package_name/versions/:package_version_id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + packagesGetPackageVersionForOrganizationParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .packagesGetPackageVersionForOrganization(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = packagesGetPackageVersionForOrganizationResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const packagesDeletePackageVersionForOrgParamSchema = z.object({ + package_type: z.enum([ + "npm", + "maven", + "rubygems", + "docker", + "nuget", + "container", + ]), + package_name: z.string(), + org: z.string(), + package_version_id: z.coerce.number(), + }) + + const packagesDeletePackageVersionForOrgResponseValidator = + responseValidationFactory( + [ + ["204", z.undefined()], + ["401", s_basic_error], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.delete( + "packagesDeletePackageVersionForOrg", + "/orgs/:org/packages/:package_type/:package_name/versions/:package_version_id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + packagesDeletePackageVersionForOrgParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + with401() { + return new KoaRuntimeResponse(401) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .packagesDeletePackageVersionForOrg(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = packagesDeletePackageVersionForOrgResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const packagesRestorePackageVersionForOrgParamSchema = z.object({ + package_type: z.enum([ + "npm", + "maven", + "rubygems", + "docker", + "nuget", + "container", + ]), + package_name: z.string(), + org: z.string(), + package_version_id: z.coerce.number(), + }) + + const packagesRestorePackageVersionForOrgResponseValidator = + responseValidationFactory( + [ + ["204", z.undefined()], + ["401", s_basic_error], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.post( + "packagesRestorePackageVersionForOrg", + "/orgs/:org/packages/:package_type/:package_name/versions/:package_version_id/restore", + async (ctx, next) => { + const input = { + params: parseRequestInput( + packagesRestorePackageVersionForOrgParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + with401() { + return new KoaRuntimeResponse(401) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .packagesRestorePackageVersionForOrg(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = packagesRestorePackageVersionForOrgResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const orgsListPatGrantRequestsParamSchema = z.object({ org: z.string() }) + + const orgsListPatGrantRequestsQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + sort: z.enum(["created_at"]).optional(), + direction: z.enum(["asc", "desc"]).optional(), + owner: z.array(z.string()).optional(), + repository: z.string().optional(), + permission: z.string().optional(), + last_used_before: z.string().datetime({ offset: true }).optional(), + last_used_after: z.string().datetime({ offset: true }).optional(), + }) + + const orgsListPatGrantRequestsResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_organization_programmatic_access_grant_request)], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.get( + "orgsListPatGrantRequests", + "/orgs/:org/personal-access-token-requests", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsListPatGrantRequestsParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + orgsListPatGrantRequestsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse< + t_organization_programmatic_access_grant_request[] + >(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsListPatGrantRequests(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsListPatGrantRequestsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const orgsReviewPatGrantRequestsInBulkParamSchema = z.object({ + org: z.string(), + }) + + const orgsReviewPatGrantRequestsInBulkBodySchema = z.object({ + pat_request_ids: z.array(z.coerce.number()).optional(), + action: z.enum(["approve", "deny"]), + reason: z.string().nullable().optional(), + }) + + const orgsReviewPatGrantRequestsInBulkResponseValidator = + responseValidationFactory( + [ + ["202", z.record(z.any())], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.post( + "orgsReviewPatGrantRequestsInBulk", + "/orgs/:org/personal-access-token-requests", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsReviewPatGrantRequestsInBulkParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + orgsReviewPatGrantRequestsInBulkBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with202() { + return new KoaRuntimeResponse<{ + [key: string]: unknown | undefined + }>(202) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsReviewPatGrantRequestsInBulk(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsReviewPatGrantRequestsInBulkResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const orgsReviewPatGrantRequestParamSchema = z.object({ + org: z.string(), + pat_request_id: z.coerce.number(), + }) + + const orgsReviewPatGrantRequestBodySchema = z.object({ + action: z.enum(["approve", "deny"]), + reason: z.string().nullable().optional(), + }) + + const orgsReviewPatGrantRequestResponseValidator = responseValidationFactory( + [ + ["204", z.undefined()], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.post( + "orgsReviewPatGrantRequest", + "/orgs/:org/personal-access-token-requests/:pat_request_id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsReviewPatGrantRequestParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + orgsReviewPatGrantRequestBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsReviewPatGrantRequest(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsReviewPatGrantRequestResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const orgsListPatGrantRequestRepositoriesParamSchema = z.object({ + org: z.string(), + pat_request_id: z.coerce.number(), + }) + + const orgsListPatGrantRequestRepositoriesQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) + + const orgsListPatGrantRequestRepositoriesResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_minimal_repository)], + ["403", s_basic_error], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.get( + "orgsListPatGrantRequestRepositories", + "/orgs/:org/personal-access-token-requests/:pat_request_id/repositories", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsListPatGrantRequestRepositoriesParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + orgsListPatGrantRequestRepositoriesQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsListPatGrantRequestRepositories(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsListPatGrantRequestRepositoriesResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const orgsListPatGrantsParamSchema = z.object({ org: z.string() }) + + const orgsListPatGrantsQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + sort: z.enum(["created_at"]).optional(), + direction: z.enum(["asc", "desc"]).optional(), + owner: z.array(z.string()).optional(), + repository: z.string().optional(), + permission: z.string().optional(), + last_used_before: z.string().datetime({ offset: true }).optional(), + last_used_after: z.string().datetime({ offset: true }).optional(), + }) + + const orgsListPatGrantsResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_organization_programmatic_access_grant)], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.get( + "orgsListPatGrants", + "/orgs/:org/personal-access-tokens", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsListPatGrantsParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + orgsListPatGrantsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse< + t_organization_programmatic_access_grant[] + >(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsListPatGrants(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsListPatGrantsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const orgsUpdatePatAccessesParamSchema = z.object({ org: z.string() }) + + const orgsUpdatePatAccessesBodySchema = z.object({ + action: z.enum(["revoke"]), + pat_ids: z.array(z.coerce.number()), + }) + + const orgsUpdatePatAccessesResponseValidator = responseValidationFactory( + [ + ["202", z.record(z.any())], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.post( + "orgsUpdatePatAccesses", + "/orgs/:org/personal-access-tokens", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsUpdatePatAccessesParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + orgsUpdatePatAccessesBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with202() { + return new KoaRuntimeResponse<{ + [key: string]: unknown | undefined + }>(202) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsUpdatePatAccesses(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsUpdatePatAccessesResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const orgsUpdatePatAccessParamSchema = z.object({ + org: z.string(), + pat_id: z.coerce.number(), + }) + + const orgsUpdatePatAccessBodySchema = z.object({ action: z.enum(["revoke"]) }) + + const orgsUpdatePatAccessResponseValidator = responseValidationFactory( + [ + ["204", z.undefined()], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.post( + "orgsUpdatePatAccess", + "/orgs/:org/personal-access-tokens/:pat_id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsUpdatePatAccessParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + orgsUpdatePatAccessBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsUpdatePatAccess(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsUpdatePatAccessResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const orgsListPatGrantRepositoriesParamSchema = z.object({ + org: z.string(), + pat_id: z.coerce.number(), + }) + + const orgsListPatGrantRepositoriesQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) + + const orgsListPatGrantRepositoriesResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_minimal_repository)], + ["403", s_basic_error], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.get( + "orgsListPatGrantRepositories", + "/orgs/:org/personal-access-tokens/:pat_id/repositories", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsListPatGrantRepositoriesParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + orgsListPatGrantRepositoriesQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsListPatGrantRepositories(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsListPatGrantRepositoriesResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const projectsListForOrgParamSchema = z.object({ org: z.string() }) + + const projectsListForOrgQuerySchema = z.object({ + state: z.enum(["open", "closed", "all"]).optional(), + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) + + const projectsListForOrgResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_project)], + ["422", s_validation_error_simple], + ], + undefined, + ) + + router.get("projectsListForOrg", "/orgs/:org/projects", async (ctx, next) => { + const input = { + params: parseRequestInput( + projectsListForOrgParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + projectsListForOrgQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .projectsListForOrg(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = projectsListForOrgResponseValidator(status, body) + ctx.status = status + return next() + }) + + const projectsCreateForOrgParamSchema = z.object({ org: z.string() }) + + const projectsCreateForOrgBodySchema = z.object({ + name: z.string(), + body: z.string().optional(), + }) + + const projectsCreateForOrgResponseValidator = responseValidationFactory( + [ + ["201", s_project], + ["401", s_basic_error], + ["403", s_basic_error], + ["404", s_basic_error], + ["410", s_basic_error], + ["422", s_validation_error_simple], + ], + undefined, + ) + + router.post( + "projectsCreateForOrg", + "/orgs/:org/projects", + async (ctx, next) => { + const input = { + params: parseRequestInput( + projectsCreateForOrgParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + projectsCreateForOrgBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with201() { + return new KoaRuntimeResponse(201) + }, + with401() { + return new KoaRuntimeResponse(401) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with410() { + return new KoaRuntimeResponse(410) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .projectsCreateForOrg(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = projectsCreateForOrgResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const orgsGetAllCustomPropertiesParamSchema = z.object({ org: z.string() }) + + const orgsGetAllCustomPropertiesResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_org_custom_property)], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "orgsGetAllCustomProperties", + "/orgs/:org/properties/schema", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsGetAllCustomPropertiesParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsGetAllCustomProperties(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsGetAllCustomPropertiesResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const orgsCreateOrUpdateCustomPropertiesParamSchema = z.object({ + org: z.string(), + }) + + const orgsCreateOrUpdateCustomPropertiesBodySchema = z.object({ + properties: z.array(s_org_custom_property), + }) + + const orgsCreateOrUpdateCustomPropertiesResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_org_custom_property)], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.patch( + "orgsCreateOrUpdateCustomProperties", + "/orgs/:org/properties/schema", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsCreateOrUpdateCustomPropertiesParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + orgsCreateOrUpdateCustomPropertiesBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsCreateOrUpdateCustomProperties(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsCreateOrUpdateCustomPropertiesResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const orgsGetCustomPropertyParamSchema = z.object({ + org: z.string(), + custom_property_name: z.string(), + }) + + const orgsGetCustomPropertyResponseValidator = responseValidationFactory( + [ + ["200", s_org_custom_property], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "orgsGetCustomProperty", + "/orgs/:org/properties/schema/:custom_property_name", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsGetCustomPropertyParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsGetCustomProperty(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsGetCustomPropertyResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const orgsCreateOrUpdateCustomPropertyParamSchema = z.object({ + org: z.string(), + custom_property_name: z.string(), + }) + + const orgsCreateOrUpdateCustomPropertyBodySchema = z.object({ + value_type: z.enum(["string", "single_select"]), + required: z.coerce.boolean().optional(), + default_value: z + .union([z.string(), z.array(z.string())]) + .nullable() + .optional(), + description: z.string().nullable().optional(), + allowed_values: z.array(z.string()).nullable().optional(), + }) + + const orgsCreateOrUpdateCustomPropertyResponseValidator = + responseValidationFactory( + [ + ["200", s_org_custom_property], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.put( + "orgsCreateOrUpdateCustomProperty", + "/orgs/:org/properties/schema/:custom_property_name", + async (ctx, next) => { const input = { params: parseRequestInput( - orgsListPatGrantRepositoriesParamSchema, + orgsCreateOrUpdateCustomPropertyParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - orgsListPatGrantRepositoriesQuerySchema, - ctx.query, - RequestInputType.QueryString, + query: undefined, + body: parseRequestInput( + orgsCreateOrUpdateCustomPropertyBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, with403() { return new KoaRuntimeResponse(403) @@ -33827,16 +35848,13 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, - with500() { - return new KoaRuntimeResponse(500) - }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .orgsListPatGrantRepositories(input, responder, ctx) + .orgsCreateOrUpdateCustomProperty(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33844,112 +35862,184 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = orgsListPatGrantRepositoriesResponseValidator(status, body) + ctx.body = orgsCreateOrUpdateCustomPropertyResponseValidator(status, body) ctx.status = status return next() }, ) - const projectsListForOrgParamSchema = z.object({ org: z.string() }) - - const projectsListForOrgQuerySchema = z.object({ - state: z.enum(["open", "closed", "all"]).optional(), - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), + const orgsRemoveCustomPropertyParamSchema = z.object({ + org: z.string(), + custom_property_name: z.string(), }) - const projectsListForOrgResponseValidator = responseValidationFactory( + const orgsRemoveCustomPropertyResponseValidator = responseValidationFactory( [ - ["200", z.array(s_project)], - ["422", s_validation_error_simple], + ["204", z.undefined()], + ["403", s_basic_error], + ["404", s_basic_error], ], undefined, ) - router.get("projectsListForOrg", "/orgs/:org/projects", async (ctx, next) => { - const input = { - params: parseRequestInput( - projectsListForOrgParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: parseRequestInput( - projectsListForOrgQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), - body: undefined, - } + router.delete( + "orgsRemoveCustomProperty", + "/orgs/:org/properties/schema/:custom_property_name", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsRemoveCustomPropertyParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with422() { - return new KoaRuntimeResponse(422) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } - const response = await implementation - .projectsListForOrg(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) + const response = await implementation + .orgsRemoveCustomProperty(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = projectsListForOrgResponseValidator(status, body) - ctx.status = status - return next() - }) + ctx.body = orgsRemoveCustomPropertyResponseValidator(status, body) + ctx.status = status + return next() + }, + ) - const projectsCreateForOrgParamSchema = z.object({ org: z.string() }) + const orgsListCustomPropertiesValuesForReposParamSchema = z.object({ + org: z.string(), + }) - const projectsCreateForOrgBodySchema = z.object({ - name: z.string(), - body: z.string().optional(), + const orgsListCustomPropertiesValuesForReposQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + repository_query: z.string().optional(), }) - const projectsCreateForOrgResponseValidator = responseValidationFactory( - [ - ["201", s_project], - ["401", s_basic_error], - ["403", s_basic_error], - ["404", s_basic_error], - ["410", s_basic_error], - ["422", s_validation_error_simple], - ], - undefined, + const orgsListCustomPropertiesValuesForReposResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_org_repo_custom_property_values)], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "orgsListCustomPropertiesValuesForRepos", + "/orgs/:org/properties/values", + async (ctx, next) => { + const input = { + params: parseRequestInput( + orgsListCustomPropertiesValuesForReposParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + orgsListCustomPropertiesValuesForReposQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse( + 200, + ) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .orgsListCustomPropertiesValuesForRepos(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = orgsListCustomPropertiesValuesForReposResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, ) - router.post( - "projectsCreateForOrg", - "/orgs/:org/projects", + const orgsCreateOrUpdateCustomPropertiesValuesForReposParamSchema = z.object({ + org: z.string(), + }) + + const orgsCreateOrUpdateCustomPropertiesValuesForReposBodySchema = z.object({ + repository_names: z.array(z.string()), + properties: z.array(s_custom_property_value), + }) + + const orgsCreateOrUpdateCustomPropertiesValuesForReposResponseValidator = + responseValidationFactory( + [ + ["204", z.undefined()], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) + + router.patch( + "orgsCreateOrUpdateCustomPropertiesValuesForRepos", + "/orgs/:org/properties/values", async (ctx, next) => { const input = { params: parseRequestInput( - projectsCreateForOrgParamSchema, + orgsCreateOrUpdateCustomPropertiesValuesForReposParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - projectsCreateForOrgBodySchema, + orgsCreateOrUpdateCustomPropertiesValuesForReposBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with201() { - return new KoaRuntimeResponse(201) - }, - with401() { - return new KoaRuntimeResponse(401) + with204() { + return new KoaRuntimeResponse(204) }, with403() { return new KoaRuntimeResponse(403) @@ -33957,11 +36047,8 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, - with410() { - return new KoaRuntimeResponse(410) - }, with422() { - return new KoaRuntimeResponse(422) + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -33969,7 +36056,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .projectsCreateForOrg(input, responder, ctx) + .orgsCreateOrUpdateCustomPropertiesValuesForRepos(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -33977,7 +36064,11 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = projectsCreateForOrgResponseValidator(status, body) + ctx.body = + orgsCreateOrUpdateCustomPropertiesValuesForReposResponseValidator( + status, + body, + ) ctx.status = status return next() }, @@ -34286,11 +36377,12 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), merge_commit_title: z.enum(["PR_TITLE", "MERGE_MESSAGE"]).optional(), merge_commit_message: z.enum(["PR_BODY", "PR_TITLE", "BLANK"]).optional(), + custom_properties: z.record(z.any()).optional(), }) const reposCreateInOrgResponseValidator = responseValidationFactory( [ - ["201", s_repository], + ["201", s_full_repository], ["403", s_basic_error], ["422", s_validation_error], ], @@ -34314,7 +36406,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with201() { - return new KoaRuntimeResponse(201) + return new KoaRuntimeResponse(201) }, with403() { return new KoaRuntimeResponse(403) @@ -34473,6 +36565,132 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const reposGetOrgRuleSuitesParamSchema = z.object({ org: z.string() }) + + const reposGetOrgRuleSuitesQuerySchema = z.object({ + repository_name: z.coerce.number().optional(), + time_period: z.enum(["hour", "day", "week", "month"]).optional(), + actor_name: z.string().optional(), + rule_suite_result: z.enum(["pass", "fail", "bypass", "all"]).optional(), + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) + + const reposGetOrgRuleSuitesResponseValidator = responseValidationFactory( + [ + ["200", s_rule_suites], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.get( + "reposGetOrgRuleSuites", + "/orgs/:org/rulesets/rule-suites", + async (ctx, next) => { + const input = { + params: parseRequestInput( + reposGetOrgRuleSuitesParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + reposGetOrgRuleSuitesQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposGetOrgRuleSuites(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposGetOrgRuleSuitesResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const reposGetOrgRuleSuiteParamSchema = z.object({ + org: z.string(), + rule_suite_id: z.coerce.number(), + }) + + const reposGetOrgRuleSuiteResponseValidator = responseValidationFactory( + [ + ["200", s_rule_suite], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) + + router.get( + "reposGetOrgRuleSuite", + "/orgs/:org/rulesets/rule-suites/:rule_suite_id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + reposGetOrgRuleSuiteParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with500() { + return new KoaRuntimeResponse(500) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposGetOrgRuleSuite(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposGetOrgRuleSuiteResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + const reposGetOrgRulesetParamSchema = z.object({ org: z.string(), ruleset_id: z.coerce.number(), @@ -34676,6 +36894,7 @@ export function createRouter(implementation: Implementation): KoaRouter { per_page: z.coerce.number().optional(), before: z.string().optional(), after: z.string().optional(), + validity: z.string().optional(), }) const secretScanningListAlertsForOrgResponseValidator = @@ -41778,6 +43997,62 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const actionsForceCancelWorkflowRunParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + run_id: z.coerce.number(), + }) + + const actionsForceCancelWorkflowRunResponseValidator = + responseValidationFactory( + [ + ["202", s_empty_object], + ["409", s_basic_error], + ], + undefined, + ) + + router.post( + "actionsForceCancelWorkflowRun", + "/repos/:owner/:repo/actions/runs/:run_id/force-cancel", + async (ctx, next) => { + const input = { + params: parseRequestInput( + actionsForceCancelWorkflowRunParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with202() { + return new KoaRuntimeResponse(202) + }, + with409() { + return new KoaRuntimeResponse(409) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .actionsForceCancelWorkflowRun(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = actionsForceCancelWorkflowRunResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + const actionsListJobsForWorkflowRunParamSchema = z.object({ owner: z.string(), repo: z.string(), @@ -43405,10 +45680,6 @@ export function createRouter(implementation: Implementation): KoaRouter { repo: z.string(), }) - const reposListAutolinksQuerySchema = z.object({ - page: z.coerce.number().optional(), - }) - const reposListAutolinksResponseValidator = responseValidationFactory( [["200", z.array(s_autolink)]], undefined, @@ -43424,11 +45695,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposListAutolinksQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } @@ -46174,7 +48441,16 @@ export function createRouter(implementation: Implementation): KoaRouter { details_url: z.string().optional(), external_id: z.string().optional(), started_at: z.string().datetime({ offset: true }).optional(), - status: z.enum(["queued", "in_progress", "completed"]).optional(), + status: z + .enum([ + "queued", + "in_progress", + "completed", + "waiting", + "requested", + "pending", + ]) + .optional(), conclusion: z .enum([ "action_required", @@ -47605,7 +49881,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const codeScanningUploadSarifBodySchema = z.object({ commit_sha: s_code_scanning_analysis_commit_sha, - ref: s_code_scanning_ref, + ref: s_code_scanning_ref_full, sarif: s_code_scanning_analysis_sarif_file, checkout_uri: z.string().optional(), started_at: z.string().datetime({ offset: true }).optional(), @@ -48321,6 +50597,102 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const codespacesCheckPermissionsForDevcontainerParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + }) + + const codespacesCheckPermissionsForDevcontainerQuerySchema = z.object({ + ref: z.string(), + devcontainer_path: z.string(), + }) + + const codespacesCheckPermissionsForDevcontainerResponseValidator = + responseValidationFactory( + [ + ["200", s_codespaces_permissions_check_for_devcontainer], + ["401", s_basic_error], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + [ + "503", + z.object({ + code: z.string().optional(), + message: z.string().optional(), + documentation_url: z.string().optional(), + }), + ], + ], + undefined, + ) + + router.get( + "codespacesCheckPermissionsForDevcontainer", + "/repos/:owner/:repo/codespaces/permissions_check", + async (ctx, next) => { + const input = { + params: parseRequestInput( + codespacesCheckPermissionsForDevcontainerParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + codespacesCheckPermissionsForDevcontainerQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse( + 200, + ) + }, + with401() { + return new KoaRuntimeResponse(401) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + with503() { + return new KoaRuntimeResponse<{ + code?: string + documentation_url?: string + message?: string + }>(503) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .codespacesCheckPermissionsForDevcontainer(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = codespacesCheckPermissionsForDevcontainerResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + const codespacesListRepoSecretsParamSchema = z.object({ owner: z.string(), repo: z.string(), @@ -49435,6 +51807,7 @@ export function createRouter(implementation: Implementation): KoaRouter { responseValidationFactory( [ ["200", z.array(s_branch_short)], + ["409", s_basic_error], ["422", s_validation_error], ], undefined, @@ -49458,6 +51831,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with200() { return new KoaRuntimeResponse(200) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -49622,7 +51998,10 @@ export function createRouter(implementation: Implementation): KoaRouter { const reposListPullRequestsAssociatedWithCommitResponseValidator = responseValidationFactory( - [["200", z.array(s_pull_request_simple)]], + [ + ["200", z.array(s_pull_request_simple)], + ["409", s_basic_error], + ], undefined, ) @@ -49648,6 +52027,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with200() { return new KoaRuntimeResponse(200) }, + with409() { + return new KoaRuntimeResponse(409) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, @@ -49686,6 +52068,7 @@ export function createRouter(implementation: Implementation): KoaRouter { [ ["200", s_commit], ["404", s_basic_error], + ["409", s_basic_error], ["422", s_validation_error], ["500", s_basic_error], [ @@ -49725,6 +52108,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -50571,16 +52957,517 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, - with422() { - return new KoaRuntimeResponse(422) - }, + with422() { + return new KoaRuntimeResponse(422) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .dependabotListAlertsForRepo(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = dependabotListAlertsForRepoResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const dependabotGetAlertParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + alert_number: s_alert_number, + }) + + const dependabotGetAlertResponseValidator = responseValidationFactory( + [ + ["200", s_dependabot_alert], + ["304", z.undefined()], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "dependabotGetAlert", + "/repos/:owner/:repo/dependabot/alerts/:alert_number", + async (ctx, next) => { + const input = { + params: parseRequestInput( + dependabotGetAlertParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with304() { + return new KoaRuntimeResponse(304) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .dependabotGetAlert(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = dependabotGetAlertResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const dependabotUpdateAlertParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + alert_number: s_alert_number, + }) + + const dependabotUpdateAlertBodySchema = z.object({ + state: z.enum(["dismissed", "open"]), + dismissed_reason: z + .enum([ + "fix_started", + "inaccurate", + "no_bandwidth", + "not_used", + "tolerable_risk", + ]) + .optional(), + dismissed_comment: z.string().optional(), + }) + + const dependabotUpdateAlertResponseValidator = responseValidationFactory( + [ + ["200", s_dependabot_alert], + ["400", s_scim_error], + ["403", s_basic_error], + ["404", s_basic_error], + ["409", s_basic_error], + ["422", s_validation_error_simple], + ], + undefined, + ) + + router.patch( + "dependabotUpdateAlert", + "/repos/:owner/:repo/dependabot/alerts/:alert_number", + async (ctx, next) => { + const input = { + params: parseRequestInput( + dependabotUpdateAlertParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + dependabotUpdateAlertBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with400() { + return new KoaRuntimeResponse(400) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with409() { + return new KoaRuntimeResponse(409) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .dependabotUpdateAlert(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = dependabotUpdateAlertResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const dependabotListRepoSecretsParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + }) + + const dependabotListRepoSecretsQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) + + const dependabotListRepoSecretsResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + total_count: z.coerce.number(), + secrets: z.array(s_dependabot_secret), + }), + ], + ], + undefined, + ) + + router.get( + "dependabotListRepoSecrets", + "/repos/:owner/:repo/dependabot/secrets", + async (ctx, next) => { + const input = { + params: parseRequestInput( + dependabotListRepoSecretsParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + dependabotListRepoSecretsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + secrets: t_dependabot_secret[] + total_count: number + }>(200) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .dependabotListRepoSecrets(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = dependabotListRepoSecretsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const dependabotGetRepoPublicKeyParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + }) + + const dependabotGetRepoPublicKeyResponseValidator = responseValidationFactory( + [["200", s_dependabot_public_key]], + undefined, + ) + + router.get( + "dependabotGetRepoPublicKey", + "/repos/:owner/:repo/dependabot/secrets/public-key", + async (ctx, next) => { + const input = { + params: parseRequestInput( + dependabotGetRepoPublicKeyParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .dependabotGetRepoPublicKey(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = dependabotGetRepoPublicKeyResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const dependabotGetRepoSecretParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + secret_name: z.string(), + }) + + const dependabotGetRepoSecretResponseValidator = responseValidationFactory( + [["200", s_dependabot_secret]], + undefined, + ) + + router.get( + "dependabotGetRepoSecret", + "/repos/:owner/:repo/dependabot/secrets/:secret_name", + async (ctx, next) => { + const input = { + params: parseRequestInput( + dependabotGetRepoSecretParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .dependabotGetRepoSecret(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = dependabotGetRepoSecretResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const dependabotCreateOrUpdateRepoSecretParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + secret_name: z.string(), + }) + + const dependabotCreateOrUpdateRepoSecretBodySchema = z.object({ + encrypted_value: z.string().optional(), + key_id: z.string().optional(), + }) + + const dependabotCreateOrUpdateRepoSecretResponseValidator = + responseValidationFactory( + [ + ["201", s_empty_object], + ["204", z.undefined()], + ], + undefined, + ) + + router.put( + "dependabotCreateOrUpdateRepoSecret", + "/repos/:owner/:repo/dependabot/secrets/:secret_name", + async (ctx, next) => { + const input = { + params: parseRequestInput( + dependabotCreateOrUpdateRepoSecretParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + dependabotCreateOrUpdateRepoSecretBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with201() { + return new KoaRuntimeResponse(201) + }, + with204() { + return new KoaRuntimeResponse(204) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .dependabotCreateOrUpdateRepoSecret(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = dependabotCreateOrUpdateRepoSecretResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const dependabotDeleteRepoSecretParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + secret_name: z.string(), + }) + + const dependabotDeleteRepoSecretResponseValidator = responseValidationFactory( + [["204", z.undefined()]], + undefined, + ) + + router.delete( + "dependabotDeleteRepoSecret", + "/repos/:owner/:repo/dependabot/secrets/:secret_name", + async (ctx, next) => { + const input = { + params: parseRequestInput( + dependabotDeleteRepoSecretParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .dependabotDeleteRepoSecret(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = dependabotDeleteRepoSecretResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const dependencyGraphDiffRangeParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + basehead: z.string(), + }) + + const dependencyGraphDiffRangeQuerySchema = z.object({ + name: z.string().optional(), + }) + + const dependencyGraphDiffRangeResponseValidator = responseValidationFactory( + [ + ["200", s_dependency_graph_diff], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "dependencyGraphDiffRange", + "/repos/:owner/:repo/dependency-graph/compare/:basehead", + async (ctx, next) => { + const input = { + params: parseRequestInput( + dependencyGraphDiffRangeParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + dependencyGraphDiffRangeQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .dependabotListAlertsForRepo(input, responder, ctx) + .dependencyGraphDiffRange(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -50588,22 +53475,20 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependabotListAlertsForRepoResponseValidator(status, body) + ctx.body = dependencyGraphDiffRangeResponseValidator(status, body) ctx.status = status return next() }, ) - const dependabotGetAlertParamSchema = z.object({ + const dependencyGraphExportSbomParamSchema = z.object({ owner: z.string(), repo: z.string(), - alert_number: s_alert_number, }) - const dependabotGetAlertResponseValidator = responseValidationFactory( + const dependencyGraphExportSbomResponseValidator = responseValidationFactory( [ - ["200", s_dependabot_alert], - ["304", z.undefined()], + ["200", s_dependency_graph_spdx_sbom], ["403", s_basic_error], ["404", s_basic_error], ], @@ -50611,12 +53496,12 @@ export function createRouter(implementation: Implementation): KoaRouter { ) router.get( - "dependabotGetAlert", - "/repos/:owner/:repo/dependabot/alerts/:alert_number", + "dependencyGraphExportSbom", + "/repos/:owner/:repo/dependency-graph/sbom", async (ctx, next) => { const input = { params: parseRequestInput( - dependabotGetAlertParamSchema, + dependencyGraphExportSbomParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -50626,10 +53511,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with304() { - return new KoaRuntimeResponse(304) + return new KoaRuntimeResponse(200) }, with403() { return new KoaRuntimeResponse(403) @@ -50643,7 +53525,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .dependabotGetAlert(input, responder, ctx) + .dependencyGraphExportSbom(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -50651,80 +53533,61 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependabotGetAlertResponseValidator(status, body) + ctx.body = dependencyGraphExportSbomResponseValidator(status, body) ctx.status = status return next() }, ) - const dependabotUpdateAlertParamSchema = z.object({ + const dependencyGraphCreateRepositorySnapshotParamSchema = z.object({ owner: z.string(), repo: z.string(), - alert_number: s_alert_number, }) - const dependabotUpdateAlertBodySchema = z.object({ - state: z.enum(["dismissed", "open"]), - dismissed_reason: z - .enum([ - "fix_started", - "inaccurate", - "no_bandwidth", - "not_used", - "tolerable_risk", - ]) - .optional(), - dismissed_comment: z.string().optional(), - }) + const dependencyGraphCreateRepositorySnapshotBodySchema = s_snapshot - const dependabotUpdateAlertResponseValidator = responseValidationFactory( - [ - ["200", s_dependabot_alert], - ["400", s_scim_error], - ["403", s_basic_error], - ["404", s_basic_error], - ["409", s_basic_error], - ["422", s_validation_error_simple], - ], - undefined, - ) + const dependencyGraphCreateRepositorySnapshotResponseValidator = + responseValidationFactory( + [ + [ + "201", + z.object({ + id: z.coerce.number(), + created_at: z.string(), + result: z.string(), + message: z.string(), + }), + ], + ], + undefined, + ) - router.patch( - "dependabotUpdateAlert", - "/repos/:owner/:repo/dependabot/alerts/:alert_number", + router.post( + "dependencyGraphCreateRepositorySnapshot", + "/repos/:owner/:repo/dependency-graph/snapshots", async (ctx, next) => { const input = { params: parseRequestInput( - dependabotUpdateAlertParamSchema, + dependencyGraphCreateRepositorySnapshotParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - dependabotUpdateAlertBodySchema, + dependencyGraphCreateRepositorySnapshotBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with400() { - return new KoaRuntimeResponse(400) - }, - with403() { - return new KoaRuntimeResponse(403) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - with409() { - return new KoaRuntimeResponse(409) - }, - with422() { - return new KoaRuntimeResponse(422) + with201() { + return new KoaRuntimeResponse<{ + created_at: string + id: number + message: string + result: string + }>(201) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -50732,7 +53595,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .dependabotUpdateAlert(input, responder, ctx) + .dependencyGraphCreateRepositorySnapshot(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -50740,47 +53603,46 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependabotUpdateAlertResponseValidator(status, body) + ctx.body = dependencyGraphCreateRepositorySnapshotResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const dependabotListRepoSecretsParamSchema = z.object({ + const reposListDeploymentsParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const dependabotListRepoSecretsQuerySchema = z.object({ + const reposListDeploymentsQuerySchema = z.object({ + sha: z.string().optional(), + ref: z.string().optional(), + task: z.string().optional(), + environment: z.string().nullable().optional(), per_page: z.coerce.number().optional(), page: z.coerce.number().optional(), }) - const dependabotListRepoSecretsResponseValidator = responseValidationFactory( - [ - [ - "200", - z.object({ - total_count: z.coerce.number(), - secrets: z.array(s_dependabot_secret), - }), - ], - ], + const reposListDeploymentsResponseValidator = responseValidationFactory( + [["200", z.array(s_deployment)]], undefined, ) router.get( - "dependabotListRepoSecrets", - "/repos/:owner/:repo/dependabot/secrets", + "reposListDeployments", + "/repos/:owner/:repo/deployments", async (ctx, next) => { const input = { params: parseRequestInput( - dependabotListRepoSecretsParamSchema, + reposListDeploymentsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - dependabotListRepoSecretsQuerySchema, + reposListDeploymentsQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -50789,10 +53651,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse<{ - secrets: t_dependabot_secret[] - total_count: number - }>(200) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -50800,7 +53659,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .dependabotListRepoSecrets(input, responder, ctx) + .reposListDeployments(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -50808,39 +53667,71 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependabotListRepoSecretsResponseValidator(status, body) + ctx.body = reposListDeploymentsResponseValidator(status, body) ctx.status = status return next() }, ) - const dependabotGetRepoPublicKeyParamSchema = z.object({ + const reposCreateDeploymentParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const dependabotGetRepoPublicKeyResponseValidator = responseValidationFactory( - [["200", s_dependabot_public_key]], + const reposCreateDeploymentBodySchema = z.object({ + ref: z.string(), + task: z.string().optional(), + auto_merge: z.coerce.boolean().optional(), + required_contexts: z.array(z.string()).optional(), + payload: z.union([z.record(z.any()), z.string()]).optional(), + environment: z.string().optional(), + description: z.string().nullable().optional(), + transient_environment: z.coerce.boolean().optional(), + production_environment: z.coerce.boolean().optional(), + }) + + const reposCreateDeploymentResponseValidator = responseValidationFactory( + [ + ["201", s_deployment], + ["202", z.object({ message: z.string().optional() })], + ["409", z.undefined()], + ["422", s_validation_error], + ], undefined, ) - router.get( - "dependabotGetRepoPublicKey", - "/repos/:owner/:repo/dependabot/secrets/public-key", + router.post( + "reposCreateDeployment", + "/repos/:owner/:repo/deployments", async (ctx, next) => { const input = { params: parseRequestInput( - dependabotGetRepoPublicKeyParamSchema, + reposCreateDeploymentParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, + body: parseRequestInput( + reposCreateDeploymentBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with201() { + return new KoaRuntimeResponse(201) + }, + with202() { + return new KoaRuntimeResponse<{ + message?: string + }>(202) + }, + with409() { + return new KoaRuntimeResponse(409) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -50848,7 +53739,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .dependabotGetRepoPublicKey(input, responder, ctx) + .reposCreateDeployment(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -50856,30 +53747,33 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependabotGetRepoPublicKeyResponseValidator(status, body) + ctx.body = reposCreateDeploymentResponseValidator(status, body) ctx.status = status return next() }, ) - const dependabotGetRepoSecretParamSchema = z.object({ + const reposGetDeploymentParamSchema = z.object({ owner: z.string(), repo: z.string(), - secret_name: z.string(), + deployment_id: z.coerce.number(), }) - const dependabotGetRepoSecretResponseValidator = responseValidationFactory( - [["200", s_dependabot_secret]], + const reposGetDeploymentResponseValidator = responseValidationFactory( + [ + ["200", s_deployment], + ["404", s_basic_error], + ], undefined, ) router.get( - "dependabotGetRepoSecret", - "/repos/:owner/:repo/dependabot/secrets/:secret_name", + "reposGetDeployment", + "/repos/:owner/:repo/deployments/:deployment_id", async (ctx, next) => { const input = { params: parseRequestInput( - dependabotGetRepoSecretParamSchema, + reposGetDeploymentParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -50889,7 +53783,10 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -50897,7 +53794,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .dependabotGetRepoSecret(input, responder, ctx) + .reposGetDeployment(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -50905,64 +53802,58 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependabotGetRepoSecretResponseValidator(status, body) + ctx.body = reposGetDeploymentResponseValidator(status, body) ctx.status = status return next() }, ) - const dependabotCreateOrUpdateRepoSecretParamSchema = z.object({ + const reposDeleteDeploymentParamSchema = z.object({ owner: z.string(), repo: z.string(), - secret_name: z.string(), - }) - - const dependabotCreateOrUpdateRepoSecretBodySchema = z.object({ - encrypted_value: z.string().optional(), - key_id: z.string().optional(), + deployment_id: z.coerce.number(), }) - const dependabotCreateOrUpdateRepoSecretResponseValidator = - responseValidationFactory( - [ - ["201", s_empty_object], - ["204", z.undefined()], - ], - undefined, - ) + const reposDeleteDeploymentResponseValidator = responseValidationFactory( + [ + ["204", z.undefined()], + ["404", s_basic_error], + ["422", s_validation_error_simple], + ], + undefined, + ) - router.put( - "dependabotCreateOrUpdateRepoSecret", - "/repos/:owner/:repo/dependabot/secrets/:secret_name", + router.delete( + "reposDeleteDeployment", + "/repos/:owner/:repo/deployments/:deployment_id", async (ctx, next) => { const input = { params: parseRequestInput( - dependabotCreateOrUpdateRepoSecretParamSchema, + reposDeleteDeploymentParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - dependabotCreateOrUpdateRepoSecretBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) - }, with204() { return new KoaRuntimeResponse(204) }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .dependabotCreateOrUpdateRepoSecret(input, responder, ctx) + .reposDeleteDeployment(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -50970,43 +53861,56 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependabotCreateOrUpdateRepoSecretResponseValidator( - status, - body, - ) + ctx.body = reposDeleteDeploymentResponseValidator(status, body) ctx.status = status return next() }, ) - const dependabotDeleteRepoSecretParamSchema = z.object({ + const reposListDeploymentStatusesParamSchema = z.object({ owner: z.string(), repo: z.string(), - secret_name: z.string(), + deployment_id: z.coerce.number(), }) - const dependabotDeleteRepoSecretResponseValidator = responseValidationFactory( - [["204", z.undefined()]], - undefined, - ) + const reposListDeploymentStatusesQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) - router.delete( - "dependabotDeleteRepoSecret", - "/repos/:owner/:repo/dependabot/secrets/:secret_name", + const reposListDeploymentStatusesResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_deployment_status)], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "reposListDeploymentStatuses", + "/repos/:owner/:repo/deployments/:deployment_id/statuses", async (ctx, next) => { const input = { params: parseRequestInput( - dependabotDeleteRepoSecretParamSchema, + reposListDeploymentStatusesParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + reposListDeploymentStatusesQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with200() { + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51014,7 +53918,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .dependabotDeleteRepoSecret(input, responder, ctx) + .reposListDeploymentStatuses(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51022,58 +53926,69 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependabotDeleteRepoSecretResponseValidator(status, body) + ctx.body = reposListDeploymentStatusesResponseValidator(status, body) ctx.status = status return next() }, ) - const dependencyGraphDiffRangeParamSchema = z.object({ + const reposCreateDeploymentStatusParamSchema = z.object({ owner: z.string(), repo: z.string(), - basehead: z.string(), + deployment_id: z.coerce.number(), }) - const dependencyGraphDiffRangeQuerySchema = z.object({ - name: z.string().optional(), + const reposCreateDeploymentStatusBodySchema = z.object({ + state: z.enum([ + "error", + "failure", + "inactive", + "in_progress", + "queued", + "pending", + "success", + ]), + target_url: z.string().optional(), + log_url: z.string().optional(), + description: z.string().optional(), + environment: z.string().optional(), + environment_url: z.string().optional(), + auto_inactive: z.coerce.boolean().optional(), }) - const dependencyGraphDiffRangeResponseValidator = responseValidationFactory( - [ - ["200", s_dependency_graph_diff], - ["403", s_basic_error], - ["404", s_basic_error], - ], - undefined, - ) + const reposCreateDeploymentStatusResponseValidator = + responseValidationFactory( + [ + ["201", s_deployment_status], + ["422", s_validation_error], + ], + undefined, + ) - router.get( - "dependencyGraphDiffRange", - "/repos/:owner/:repo/dependency-graph/compare/:basehead", + router.post( + "reposCreateDeploymentStatus", + "/repos/:owner/:repo/deployments/:deployment_id/statuses", async (ctx, next) => { const input = { params: parseRequestInput( - dependencyGraphDiffRangeParamSchema, + reposCreateDeploymentStatusParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - dependencyGraphDiffRangeQuerySchema, - ctx.query, - RequestInputType.QueryString, + query: undefined, + body: parseRequestInput( + reposCreateDeploymentStatusBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with403() { - return new KoaRuntimeResponse(403) + with201() { + return new KoaRuntimeResponse(201) }, - with404() { - return new KoaRuntimeResponse(404) + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51081,7 +53996,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .dependencyGraphDiffRange(input, responder, ctx) + .reposCreateDeploymentStatus(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51089,33 +54004,34 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependencyGraphDiffRangeResponseValidator(status, body) + ctx.body = reposCreateDeploymentStatusResponseValidator(status, body) ctx.status = status return next() }, ) - const dependencyGraphExportSbomParamSchema = z.object({ + const reposGetDeploymentStatusParamSchema = z.object({ owner: z.string(), repo: z.string(), + deployment_id: z.coerce.number(), + status_id: z.coerce.number(), }) - const dependencyGraphExportSbomResponseValidator = responseValidationFactory( + const reposGetDeploymentStatusResponseValidator = responseValidationFactory( [ - ["200", s_dependency_graph_spdx_sbom], - ["403", s_basic_error], + ["200", s_deployment_status], ["404", s_basic_error], ], undefined, ) router.get( - "dependencyGraphExportSbom", - "/repos/:owner/:repo/dependency-graph/sbom", + "reposGetDeploymentStatus", + "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id", async (ctx, next) => { const input = { params: parseRequestInput( - dependencyGraphExportSbomParamSchema, + reposGetDeploymentStatusParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -51125,10 +54041,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with403() { - return new KoaRuntimeResponse(403) + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) @@ -51139,7 +54052,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .dependencyGraphExportSbom(input, responder, ctx) + .reposGetDeploymentStatus(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51147,61 +54060,58 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependencyGraphExportSbomResponseValidator(status, body) + ctx.body = reposGetDeploymentStatusResponseValidator(status, body) ctx.status = status return next() }, ) - const dependencyGraphCreateRepositorySnapshotParamSchema = z.object({ + const reposCreateDispatchEventParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const dependencyGraphCreateRepositorySnapshotBodySchema = s_snapshot + const reposCreateDispatchEventBodySchema = z.object({ + event_type: z.string(), + client_payload: z.record(z.any()).optional(), + }) - const dependencyGraphCreateRepositorySnapshotResponseValidator = - responseValidationFactory( - [ - [ - "201", - z.object({ - id: z.coerce.number(), - created_at: z.string(), - result: z.string(), - message: z.string(), - }), - ], - ], - undefined, - ) + const reposCreateDispatchEventResponseValidator = responseValidationFactory( + [ + ["204", z.undefined()], + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) router.post( - "dependencyGraphCreateRepositorySnapshot", - "/repos/:owner/:repo/dependency-graph/snapshots", + "reposCreateDispatchEvent", + "/repos/:owner/:repo/dispatches", async (ctx, next) => { const input = { params: parseRequestInput( - dependencyGraphCreateRepositorySnapshotParamSchema, + reposCreateDispatchEventParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - dependencyGraphCreateRepositorySnapshotBodySchema, + reposCreateDispatchEventBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with201() { - return new KoaRuntimeResponse<{ - created_at: string - id: number - message: string - result: string - }>(201) + with204() { + return new KoaRuntimeResponse(204) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51209,7 +54119,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .dependencyGraphCreateRepositorySnapshot(input, responder, ctx) + .reposCreateDispatchEvent(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51217,46 +54127,47 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = dependencyGraphCreateRepositorySnapshotResponseValidator( - status, - body, - ) + ctx.body = reposCreateDispatchEventResponseValidator(status, body) ctx.status = status return next() }, ) - const reposListDeploymentsParamSchema = z.object({ + const reposGetAllEnvironmentsParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposListDeploymentsQuerySchema = z.object({ - sha: z.string().optional(), - ref: z.string().optional(), - task: z.string().optional(), - environment: z.string().nullable().optional(), + const reposGetAllEnvironmentsQuerySchema = z.object({ per_page: z.coerce.number().optional(), page: z.coerce.number().optional(), }) - const reposListDeploymentsResponseValidator = responseValidationFactory( - [["200", z.array(s_deployment)]], + const reposGetAllEnvironmentsResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + total_count: z.coerce.number().optional(), + environments: z.array(s_environment).optional(), + }), + ], + ], undefined, ) router.get( - "reposListDeployments", - "/repos/:owner/:repo/deployments", + "reposGetAllEnvironments", + "/repos/:owner/:repo/environments", async (ctx, next) => { const input = { params: parseRequestInput( - reposListDeploymentsParamSchema, + reposGetAllEnvironmentsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - reposListDeploymentsQuerySchema, + reposGetAllEnvironmentsQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -51265,7 +54176,10 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse<{ + environments?: t_environment[] + total_count?: number + }>(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51273,7 +54187,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposListDeployments(input, responder, ctx) + .reposGetAllEnvironments(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51281,71 +54195,40 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposListDeploymentsResponseValidator(status, body) + ctx.body = reposGetAllEnvironmentsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposCreateDeploymentParamSchema = z.object({ + const reposGetEnvironmentParamSchema = z.object({ owner: z.string(), repo: z.string(), + environment_name: z.string(), }) - const reposCreateDeploymentBodySchema = z.object({ - ref: z.string(), - task: z.string().optional(), - auto_merge: z.coerce.boolean().optional(), - required_contexts: z.array(z.string()).optional(), - payload: z.union([z.record(z.any()), z.string()]).optional(), - environment: z.string().optional(), - description: z.string().nullable().optional(), - transient_environment: z.coerce.boolean().optional(), - production_environment: z.coerce.boolean().optional(), - }) - - const reposCreateDeploymentResponseValidator = responseValidationFactory( - [ - ["201", s_deployment], - ["202", z.object({ message: z.string().optional() })], - ["409", z.undefined()], - ["422", s_validation_error], - ], + const reposGetEnvironmentResponseValidator = responseValidationFactory( + [["200", s_environment]], undefined, ) - router.post( - "reposCreateDeployment", - "/repos/:owner/:repo/deployments", + router.get( + "reposGetEnvironment", + "/repos/:owner/:repo/environments/:environment_name", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateDeploymentParamSchema, + reposGetEnvironmentParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - reposCreateDeploymentBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) - }, - with202() { - return new KoaRuntimeResponse<{ - message?: string - }>(202) - }, - with409() { - return new KoaRuntimeResponse(409) - }, - with422() { - return new KoaRuntimeResponse(422) + with200() { + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51353,7 +54236,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateDeployment(input, responder, ctx) + .reposGetEnvironment(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51361,46 +54244,69 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateDeploymentResponseValidator(status, body) + ctx.body = reposGetEnvironmentResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetDeploymentParamSchema = z.object({ + const reposCreateOrUpdateEnvironmentParamSchema = z.object({ owner: z.string(), repo: z.string(), - deployment_id: z.coerce.number(), + environment_name: z.string(), }) - const reposGetDeploymentResponseValidator = responseValidationFactory( - [ - ["200", s_deployment], - ["404", s_basic_error], - ], - undefined, - ) + const reposCreateOrUpdateEnvironmentBodySchema = z + .object({ + wait_timer: s_wait_timer.optional(), + prevent_self_review: s_prevent_self_review.optional(), + reviewers: z + .array( + z.object({ + type: s_deployment_reviewer_type.optional(), + id: z.coerce.number().optional(), + }), + ) + .nullable() + .optional(), + deployment_branch_policy: s_deployment_branch_policy_settings.optional(), + }) + .nullable() + .optional() - router.get( - "reposGetDeployment", - "/repos/:owner/:repo/deployments/:deployment_id", + const reposCreateOrUpdateEnvironmentResponseValidator = + responseValidationFactory( + [ + ["200", s_environment], + ["422", s_basic_error], + ], + undefined, + ) + + router.put( + "reposCreateOrUpdateEnvironment", + "/repos/:owner/:repo/environments/:environment_name", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetDeploymentParamSchema, + reposCreateOrUpdateEnvironmentParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, + body: parseRequestInput( + reposCreateOrUpdateEnvironmentBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, - with404() { - return new KoaRuntimeResponse(404) + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51408,7 +54314,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetDeployment(input, responder, ctx) + .reposCreateOrUpdateEnvironment(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51416,34 +54322,30 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetDeploymentResponseValidator(status, body) + ctx.body = reposCreateOrUpdateEnvironmentResponseValidator(status, body) ctx.status = status return next() }, ) - const reposDeleteDeploymentParamSchema = z.object({ + const reposDeleteAnEnvironmentParamSchema = z.object({ owner: z.string(), repo: z.string(), - deployment_id: z.coerce.number(), + environment_name: z.string(), }) - const reposDeleteDeploymentResponseValidator = responseValidationFactory( - [ - ["204", z.undefined()], - ["404", s_basic_error], - ["422", s_validation_error_simple], - ], + const reposDeleteAnEnvironmentResponseValidator = responseValidationFactory( + [["204", z.undefined()]], undefined, ) router.delete( - "reposDeleteDeployment", - "/repos/:owner/:repo/deployments/:deployment_id", + "reposDeleteAnEnvironment", + "/repos/:owner/:repo/environments/:environment_name", async (ctx, next) => { const input = { params: parseRequestInput( - reposDeleteDeploymentParamSchema, + reposDeleteAnEnvironmentParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -51455,19 +54357,13 @@ export function createRouter(implementation: Implementation): KoaRouter { with204() { return new KoaRuntimeResponse(204) }, - with404() { - return new KoaRuntimeResponse(404) - }, - with422() { - return new KoaRuntimeResponse(422) - }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .reposDeleteDeployment(input, responder, ctx) + .reposDeleteAnEnvironment(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51475,44 +54371,49 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDeleteDeploymentResponseValidator(status, body) + ctx.body = reposDeleteAnEnvironmentResponseValidator(status, body) ctx.status = status return next() }, ) - const reposListDeploymentStatusesParamSchema = z.object({ + const reposListDeploymentBranchPoliciesParamSchema = z.object({ owner: z.string(), repo: z.string(), - deployment_id: z.coerce.number(), + environment_name: z.string(), }) - const reposListDeploymentStatusesQuerySchema = z.object({ + const reposListDeploymentBranchPoliciesQuerySchema = z.object({ per_page: z.coerce.number().optional(), page: z.coerce.number().optional(), }) - const reposListDeploymentStatusesResponseValidator = + const reposListDeploymentBranchPoliciesResponseValidator = responseValidationFactory( [ - ["200", z.array(s_deployment_status)], - ["404", s_basic_error], + [ + "200", + z.object({ + total_count: z.coerce.number(), + branch_policies: z.array(s_deployment_branch_policy), + }), + ], ], undefined, ) router.get( - "reposListDeploymentStatuses", - "/repos/:owner/:repo/deployments/:deployment_id/statuses", + "reposListDeploymentBranchPolicies", + "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies", async (ctx, next) => { const input = { params: parseRequestInput( - reposListDeploymentStatusesParamSchema, + reposListDeploymentBranchPoliciesParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - reposListDeploymentStatusesQuerySchema, + reposListDeploymentBranchPoliciesQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -51521,10 +54422,10 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with404() { - return new KoaRuntimeResponse(404) + return new KoaRuntimeResponse<{ + branch_policies: t_deployment_branch_policy[] + total_count: number + }>(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51532,7 +54433,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposListDeploymentStatuses(input, responder, ctx) + .reposListDeploymentBranchPolicies(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51540,69 +54441,61 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposListDeploymentStatusesResponseValidator(status, body) + ctx.body = reposListDeploymentBranchPoliciesResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposCreateDeploymentStatusParamSchema = z.object({ + const reposCreateDeploymentBranchPolicyParamSchema = z.object({ owner: z.string(), repo: z.string(), - deployment_id: z.coerce.number(), + environment_name: z.string(), }) - const reposCreateDeploymentStatusBodySchema = z.object({ - state: z.enum([ - "error", - "failure", - "inactive", - "in_progress", - "queued", - "pending", - "success", - ]), - target_url: z.string().optional(), - log_url: z.string().optional(), - description: z.string().optional(), - environment: z.string().optional(), - environment_url: z.string().optional(), - auto_inactive: z.coerce.boolean().optional(), - }) + const reposCreateDeploymentBranchPolicyBodySchema = + s_deployment_branch_policy_name_pattern_with_type - const reposCreateDeploymentStatusResponseValidator = + const reposCreateDeploymentBranchPolicyResponseValidator = responseValidationFactory( [ - ["201", s_deployment_status], - ["422", s_validation_error], + ["200", s_deployment_branch_policy], + ["303", z.undefined()], + ["404", z.undefined()], ], undefined, ) router.post( - "reposCreateDeploymentStatus", - "/repos/:owner/:repo/deployments/:deployment_id/statuses", + "reposCreateDeploymentBranchPolicy", + "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateDeploymentStatusParamSchema, + reposCreateDeploymentBranchPolicyParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - reposCreateDeploymentStatusBodySchema, + reposCreateDeploymentBranchPolicyBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with201() { - return new KoaRuntimeResponse(201) + with200() { + return new KoaRuntimeResponse(200) }, - with422() { - return new KoaRuntimeResponse(422) + with303() { + return new KoaRuntimeResponse(303) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51610,7 +54503,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateDeploymentStatus(input, responder, ctx) + .reposCreateDeploymentBranchPolicy(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51618,34 +54511,32 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateDeploymentStatusResponseValidator(status, body) + ctx.body = reposCreateDeploymentBranchPolicyResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposGetDeploymentStatusParamSchema = z.object({ + const reposGetDeploymentBranchPolicyParamSchema = z.object({ owner: z.string(), repo: z.string(), - deployment_id: z.coerce.number(), - status_id: z.coerce.number(), + environment_name: z.string(), + branch_policy_id: z.coerce.number(), }) - const reposGetDeploymentStatusResponseValidator = responseValidationFactory( - [ - ["200", s_deployment_status], - ["404", s_basic_error], - ], - undefined, - ) + const reposGetDeploymentBranchPolicyResponseValidator = + responseValidationFactory([["200", s_deployment_branch_policy]], undefined) router.get( - "reposGetDeploymentStatus", - "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id", + "reposGetDeploymentBranchPolicy", + "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies/:branch_policy_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetDeploymentStatusParamSchema, + reposGetDeploymentBranchPolicyParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -51655,10 +54546,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with404() { - return new KoaRuntimeResponse(404) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51666,7 +54554,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetDeploymentStatus(input, responder, ctx) + .reposGetDeploymentBranchPolicy(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51674,54 +54562,46 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetDeploymentStatusResponseValidator(status, body) + ctx.body = reposGetDeploymentBranchPolicyResponseValidator(status, body) ctx.status = status return next() }, ) - const reposCreateDispatchEventParamSchema = z.object({ + const reposUpdateDeploymentBranchPolicyParamSchema = z.object({ owner: z.string(), repo: z.string(), + environment_name: z.string(), + branch_policy_id: z.coerce.number(), }) - const reposCreateDispatchEventBodySchema = z.object({ - event_type: z.string(), - client_payload: z.record(z.any()).optional(), - }) + const reposUpdateDeploymentBranchPolicyBodySchema = + s_deployment_branch_policy_name_pattern - const reposCreateDispatchEventResponseValidator = responseValidationFactory( - [ - ["204", z.undefined()], - ["422", s_validation_error], - ], - undefined, - ) + const reposUpdateDeploymentBranchPolicyResponseValidator = + responseValidationFactory([["200", s_deployment_branch_policy]], undefined) - router.post( - "reposCreateDispatchEvent", - "/repos/:owner/:repo/dispatches", + router.put( + "reposUpdateDeploymentBranchPolicy", + "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies/:branch_policy_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateDispatchEventParamSchema, + reposUpdateDeploymentBranchPolicyParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - reposCreateDispatchEventBodySchema, + reposUpdateDeploymentBranchPolicyBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with204() { - return new KoaRuntimeResponse(204) - }, - with422() { - return new KoaRuntimeResponse(422) + with200() { + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51729,7 +54609,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateDispatchEvent(input, responder, ctx) + .reposUpdateDeploymentBranchPolicy(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51737,57 +54617,106 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateDispatchEventResponseValidator(status, body) + ctx.body = reposUpdateDeploymentBranchPolicyResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposGetAllEnvironmentsParamSchema = z.object({ + const reposDeleteDeploymentBranchPolicyParamSchema = z.object({ owner: z.string(), repo: z.string(), + environment_name: z.string(), + branch_policy_id: z.coerce.number(), }) - const reposGetAllEnvironmentsQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), + const reposDeleteDeploymentBranchPolicyResponseValidator = + responseValidationFactory([["204", z.undefined()]], undefined) + + router.delete( + "reposDeleteDeploymentBranchPolicy", + "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies/:branch_policy_id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + reposDeleteDeploymentBranchPolicyParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposDeleteDeploymentBranchPolicy(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposDeleteDeploymentBranchPolicyResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const reposGetAllDeploymentProtectionRulesParamSchema = z.object({ + environment_name: z.string(), + repo: z.string(), + owner: z.string(), }) - const reposGetAllEnvironmentsResponseValidator = responseValidationFactory( - [ + const reposGetAllDeploymentProtectionRulesResponseValidator = + responseValidationFactory( [ - "200", - z.object({ - total_count: z.coerce.number().optional(), - environments: z.array(s_environment).optional(), - }), + [ + "200", + z.object({ + total_count: z.coerce.number().optional(), + custom_deployment_protection_rules: z + .array(s_deployment_protection_rule) + .optional(), + }), + ], ], - ], - undefined, - ) + undefined, + ) router.get( - "reposGetAllEnvironments", - "/repos/:owner/:repo/environments", + "reposGetAllDeploymentProtectionRules", + "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetAllEnvironmentsParamSchema, + reposGetAllDeploymentProtectionRulesParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposGetAllEnvironmentsQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { with200() { return new KoaRuntimeResponse<{ - environments?: t_environment[] + custom_deployment_protection_rules?: t_deployment_protection_rule[] total_count?: number }>(200) }, @@ -51797,7 +54726,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetAllEnvironments(input, responder, ctx) + .reposGetAllDeploymentProtectionRules(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51805,40 +54734,127 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetAllEnvironmentsResponseValidator(status, body) + ctx.body = reposGetAllDeploymentProtectionRulesResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposGetEnvironmentParamSchema = z.object({ - owner: z.string(), - repo: z.string(), + const reposCreateDeploymentProtectionRuleParamSchema = z.object({ environment_name: z.string(), + repo: z.string(), + owner: z.string(), }) - const reposGetEnvironmentResponseValidator = responseValidationFactory( - [["200", s_environment]], - undefined, + const reposCreateDeploymentProtectionRuleBodySchema = z.object({ + integration_id: z.coerce.number().optional(), + }) + + const reposCreateDeploymentProtectionRuleResponseValidator = + responseValidationFactory( + [["201", s_deployment_protection_rule]], + undefined, + ) + + router.post( + "reposCreateDeploymentProtectionRule", + "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules", + async (ctx, next) => { + const input = { + params: parseRequestInput( + reposCreateDeploymentProtectionRuleParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + reposCreateDeploymentProtectionRuleBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with201() { + return new KoaRuntimeResponse(201) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposCreateDeploymentProtectionRule(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposCreateDeploymentProtectionRuleResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, ) + const reposListCustomDeploymentRuleIntegrationsParamSchema = z.object({ + environment_name: z.string(), + repo: z.string(), + owner: z.string(), + }) + + const reposListCustomDeploymentRuleIntegrationsQuerySchema = z.object({ + page: z.coerce.number().optional(), + per_page: z.coerce.number().optional(), + }) + + const reposListCustomDeploymentRuleIntegrationsResponseValidator = + responseValidationFactory( + [ + [ + "200", + z.object({ + total_count: z.coerce.number().optional(), + available_custom_deployment_protection_rule_integrations: z + .array(s_custom_deployment_rule_app) + .optional(), + }), + ], + ], + undefined, + ) + router.get( - "reposGetEnvironment", - "/repos/:owner/:repo/environments/:environment_name", + "reposListCustomDeploymentRuleIntegrations", + "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules/apps", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetEnvironmentParamSchema, + reposListCustomDeploymentRuleIntegrationsParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + reposListCustomDeploymentRuleIntegrationsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse<{ + available_custom_deployment_protection_rule_integrations?: t_custom_deployment_rule_app[] + total_count?: number + }>(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51846,7 +54862,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetEnvironment(input, responder, ctx) + .reposListCustomDeploymentRuleIntegrations(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51854,68 +54870,45 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetEnvironmentResponseValidator(status, body) + ctx.body = reposListCustomDeploymentRuleIntegrationsResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposCreateOrUpdateEnvironmentParamSchema = z.object({ + const reposGetCustomDeploymentProtectionRuleParamSchema = z.object({ owner: z.string(), repo: z.string(), environment_name: z.string(), + protection_rule_id: z.coerce.number(), }) - const reposCreateOrUpdateEnvironmentBodySchema = z - .object({ - wait_timer: s_wait_timer.optional(), - reviewers: z - .array( - z.object({ - type: s_deployment_reviewer_type.optional(), - id: z.coerce.number().optional(), - }), - ) - .nullable() - .optional(), - deployment_branch_policy: s_deployment_branch_policy_settings.optional(), - }) - .nullable() - .optional() - - const reposCreateOrUpdateEnvironmentResponseValidator = + const reposGetCustomDeploymentProtectionRuleResponseValidator = responseValidationFactory( - [ - ["200", s_environment], - ["422", s_basic_error], - ], + [["200", s_deployment_protection_rule]], undefined, ) - router.put( - "reposCreateOrUpdateEnvironment", - "/repos/:owner/:repo/environments/:environment_name", + router.get( + "reposGetCustomDeploymentProtectionRule", + "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules/:protection_rule_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateOrUpdateEnvironmentParamSchema, + reposGetCustomDeploymentProtectionRuleParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - reposCreateOrUpdateEnvironmentBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with422() { - return new KoaRuntimeResponse(422) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -51923,7 +54916,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateOrUpdateEnvironment(input, responder, ctx) + .reposGetCustomDeploymentProtectionRule(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51931,30 +54924,32 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateOrUpdateEnvironmentResponseValidator(status, body) + ctx.body = reposGetCustomDeploymentProtectionRuleResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposDeleteAnEnvironmentParamSchema = z.object({ - owner: z.string(), - repo: z.string(), + const reposDisableDeploymentProtectionRuleParamSchema = z.object({ environment_name: z.string(), + repo: z.string(), + owner: z.string(), + protection_rule_id: z.coerce.number(), }) - const reposDeleteAnEnvironmentResponseValidator = responseValidationFactory( - [["204", z.undefined()]], - undefined, - ) + const reposDisableDeploymentProtectionRuleResponseValidator = + responseValidationFactory([["204", z.undefined()]], undefined) router.delete( - "reposDeleteAnEnvironment", - "/repos/:owner/:repo/environments/:environment_name", + "reposDisableDeploymentProtectionRule", + "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules/:protection_rule_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposDeleteAnEnvironmentParamSchema, + reposDisableDeploymentProtectionRuleParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -51972,7 +54967,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposDeleteAnEnvironment(input, responder, ctx) + .reposDisableDeploymentProtectionRule(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -51980,31 +54975,34 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDeleteAnEnvironmentResponseValidator(status, body) + ctx.body = reposDisableDeploymentProtectionRuleResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposListDeploymentBranchPoliciesParamSchema = z.object({ + const actionsListEnvironmentSecretsParamSchema = z.object({ owner: z.string(), repo: z.string(), environment_name: z.string(), }) - const reposListDeploymentBranchPoliciesQuerySchema = z.object({ + const actionsListEnvironmentSecretsQuerySchema = z.object({ per_page: z.coerce.number().optional(), page: z.coerce.number().optional(), }) - const reposListDeploymentBranchPoliciesResponseValidator = + const actionsListEnvironmentSecretsResponseValidator = responseValidationFactory( [ [ "200", z.object({ total_count: z.coerce.number(), - branch_policies: z.array(s_deployment_branch_policy), + secrets: z.array(s_actions_secret), }), ], ], @@ -52012,17 +55010,17 @@ export function createRouter(implementation: Implementation): KoaRouter { ) router.get( - "reposListDeploymentBranchPolicies", - "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies", + "actionsListEnvironmentSecrets", + "/repos/:owner/:repo/environments/:environment_name/secrets", async (ctx, next) => { const input = { params: parseRequestInput( - reposListDeploymentBranchPoliciesParamSchema, + actionsListEnvironmentSecretsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - reposListDeploymentBranchPoliciesQuerySchema, + actionsListEnvironmentSecretsQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -52032,7 +55030,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { return new KoaRuntimeResponse<{ - branch_policies: t_deployment_branch_policy[] + secrets: t_actions_secret[] total_count: number }>(200) }, @@ -52042,7 +55040,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposListDeploymentBranchPolicies(input, responder, ctx) + .actionsListEnvironmentSecrets(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52050,61 +55048,38 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposListDeploymentBranchPoliciesResponseValidator( - status, - body, - ) + ctx.body = actionsListEnvironmentSecretsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposCreateDeploymentBranchPolicyParamSchema = z.object({ + const actionsGetEnvironmentPublicKeyParamSchema = z.object({ owner: z.string(), repo: z.string(), environment_name: z.string(), }) - const reposCreateDeploymentBranchPolicyBodySchema = - s_deployment_branch_policy_name_pattern - - const reposCreateDeploymentBranchPolicyResponseValidator = - responseValidationFactory( - [ - ["200", s_deployment_branch_policy], - ["303", z.undefined()], - ["404", z.undefined()], - ], - undefined, - ) + const actionsGetEnvironmentPublicKeyResponseValidator = + responseValidationFactory([["200", s_actions_public_key]], undefined) - router.post( - "reposCreateDeploymentBranchPolicy", - "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies", + router.get( + "actionsGetEnvironmentPublicKey", + "/repos/:owner/:repo/environments/:environment_name/secrets/public-key", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateDeploymentBranchPolicyParamSchema, + actionsGetEnvironmentPublicKeyParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - reposCreateDeploymentBranchPolicyBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with303() { - return new KoaRuntimeResponse(303) - }, - with404() { - return new KoaRuntimeResponse(404) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -52112,7 +55087,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateDeploymentBranchPolicy(input, responder, ctx) + .actionsGetEnvironmentPublicKey(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52120,32 +55095,29 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateDeploymentBranchPolicyResponseValidator( - status, - body, - ) + ctx.body = actionsGetEnvironmentPublicKeyResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetDeploymentBranchPolicyParamSchema = z.object({ + const actionsGetEnvironmentSecretParamSchema = z.object({ owner: z.string(), repo: z.string(), environment_name: z.string(), - branch_policy_id: z.coerce.number(), + secret_name: z.string(), }) - const reposGetDeploymentBranchPolicyResponseValidator = - responseValidationFactory([["200", s_deployment_branch_policy]], undefined) + const actionsGetEnvironmentSecretResponseValidator = + responseValidationFactory([["200", s_actions_secret]], undefined) router.get( - "reposGetDeploymentBranchPolicy", - "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies/:branch_policy_id", + "actionsGetEnvironmentSecret", + "/repos/:owner/:repo/environments/:environment_name/secrets/:secret_name", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetDeploymentBranchPolicyParamSchema, + actionsGetEnvironmentSecretParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -52155,7 +55127,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -52163,7 +55135,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetDeploymentBranchPolicy(input, responder, ctx) + .actionsGetEnvironmentSecret(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52171,46 +55143,57 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetDeploymentBranchPolicyResponseValidator(status, body) + ctx.body = actionsGetEnvironmentSecretResponseValidator(status, body) ctx.status = status return next() }, ) - const reposUpdateDeploymentBranchPolicyParamSchema = z.object({ + const actionsCreateOrUpdateEnvironmentSecretParamSchema = z.object({ owner: z.string(), repo: z.string(), environment_name: z.string(), - branch_policy_id: z.coerce.number(), + secret_name: z.string(), }) - const reposUpdateDeploymentBranchPolicyBodySchema = - s_deployment_branch_policy_name_pattern + const actionsCreateOrUpdateEnvironmentSecretBodySchema = z.object({ + encrypted_value: z.string(), + key_id: z.string(), + }) - const reposUpdateDeploymentBranchPolicyResponseValidator = - responseValidationFactory([["200", s_deployment_branch_policy]], undefined) + const actionsCreateOrUpdateEnvironmentSecretResponseValidator = + responseValidationFactory( + [ + ["201", s_empty_object], + ["204", z.undefined()], + ], + undefined, + ) router.put( - "reposUpdateDeploymentBranchPolicy", - "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies/:branch_policy_id", + "actionsCreateOrUpdateEnvironmentSecret", + "/repos/:owner/:repo/environments/:environment_name/secrets/:secret_name", async (ctx, next) => { const input = { params: parseRequestInput( - reposUpdateDeploymentBranchPolicyParamSchema, + actionsCreateOrUpdateEnvironmentSecretParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - reposUpdateDeploymentBranchPolicyBodySchema, + actionsCreateOrUpdateEnvironmentSecretBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with201() { + return new KoaRuntimeResponse(201) + }, + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -52218,7 +55201,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposUpdateDeploymentBranchPolicy(input, responder, ctx) + .actionsCreateOrUpdateEnvironmentSecret(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52226,7 +55209,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposUpdateDeploymentBranchPolicyResponseValidator( + ctx.body = actionsCreateOrUpdateEnvironmentSecretResponseValidator( status, body, ) @@ -52235,23 +55218,23 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) - const reposDeleteDeploymentBranchPolicyParamSchema = z.object({ + const actionsDeleteEnvironmentSecretParamSchema = z.object({ owner: z.string(), repo: z.string(), environment_name: z.string(), - branch_policy_id: z.coerce.number(), + secret_name: z.string(), }) - const reposDeleteDeploymentBranchPolicyResponseValidator = + const actionsDeleteEnvironmentSecretResponseValidator = responseValidationFactory([["204", z.undefined()]], undefined) router.delete( - "reposDeleteDeploymentBranchPolicy", - "/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies/:branch_policy_id", + "actionsDeleteEnvironmentSecret", + "/repos/:owner/:repo/environments/:environment_name/secrets/:secret_name", async (ctx, next) => { const input = { params: parseRequestInput( - reposDeleteDeploymentBranchPolicyParamSchema, + actionsDeleteEnvironmentSecretParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -52269,7 +55252,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposDeleteDeploymentBranchPolicy(input, responder, ctx) + .actionsDeleteEnvironmentSecret(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52277,31 +55260,31 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDeleteDeploymentBranchPolicyResponseValidator( - status, - body, - ) + ctx.body = actionsDeleteEnvironmentSecretResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetAllDeploymentProtectionRulesParamSchema = z.object({ - environment_name: z.string(), - repo: z.string(), + const actionsListEnvironmentVariablesParamSchema = z.object({ owner: z.string(), + repo: z.string(), + environment_name: z.string(), }) - const reposGetAllDeploymentProtectionRulesResponseValidator = + const actionsListEnvironmentVariablesQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) + + const actionsListEnvironmentVariablesResponseValidator = responseValidationFactory( [ [ "200", z.object({ - total_count: z.coerce.number().optional(), - custom_deployment_protection_rules: z - .array(s_deployment_protection_rule) - .optional(), + total_count: z.coerce.number(), + variables: z.array(s_actions_variable), }), ], ], @@ -52309,24 +55292,28 @@ export function createRouter(implementation: Implementation): KoaRouter { ) router.get( - "reposGetAllDeploymentProtectionRules", - "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules", + "actionsListEnvironmentVariables", + "/repos/:owner/:repo/environments/:environment_name/variables", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetAllDeploymentProtectionRulesParamSchema, + actionsListEnvironmentVariablesParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + actionsListEnvironmentVariablesQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { with200() { return new KoaRuntimeResponse<{ - custom_deployment_protection_rules?: t_deployment_protection_rule[] - total_count?: number + total_count: number + variables: t_actions_variable[] }>(200) }, withStatus(status: StatusCode) { @@ -52335,7 +55322,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetAllDeploymentProtectionRules(input, responder, ctx) + .actionsListEnvironmentVariables(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52343,44 +55330,39 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetAllDeploymentProtectionRulesResponseValidator( - status, - body, - ) + ctx.body = actionsListEnvironmentVariablesResponseValidator(status, body) ctx.status = status return next() }, ) - const reposCreateDeploymentProtectionRuleParamSchema = z.object({ - environment_name: z.string(), - repo: z.string(), + const actionsCreateEnvironmentVariableParamSchema = z.object({ owner: z.string(), + repo: z.string(), + environment_name: z.string(), }) - const reposCreateDeploymentProtectionRuleBodySchema = z.object({ - integration_id: z.coerce.number().optional(), + const actionsCreateEnvironmentVariableBodySchema = z.object({ + name: z.string(), + value: z.string(), }) - const reposCreateDeploymentProtectionRuleResponseValidator = - responseValidationFactory( - [["201", s_deployment_protection_rule]], - undefined, - ) + const actionsCreateEnvironmentVariableResponseValidator = + responseValidationFactory([["201", s_empty_object]], undefined) router.post( - "reposCreateDeploymentProtectionRule", - "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules", + "actionsCreateEnvironmentVariable", + "/repos/:owner/:repo/environments/:environment_name/variables", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateDeploymentProtectionRuleParamSchema, + actionsCreateEnvironmentVariableParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - reposCreateDeploymentProtectionRuleBodySchema, + actionsCreateEnvironmentVariableBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -52388,7 +55370,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with201() { - return new KoaRuntimeResponse(201) + return new KoaRuntimeResponse(201) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -52396,7 +55378,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateDeploymentProtectionRule(input, responder, ctx) + .actionsCreateEnvironmentVariable(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52404,66 +55386,39 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateDeploymentProtectionRuleResponseValidator( - status, - body, - ) + ctx.body = actionsCreateEnvironmentVariableResponseValidator(status, body) ctx.status = status return next() }, ) - const reposListCustomDeploymentRuleIntegrationsParamSchema = z.object({ - environment_name: z.string(), - repo: z.string(), + const actionsGetEnvironmentVariableParamSchema = z.object({ owner: z.string(), + repo: z.string(), + environment_name: z.string(), + name: z.string(), }) - const reposListCustomDeploymentRuleIntegrationsQuerySchema = z.object({ - page: z.coerce.number().optional(), - per_page: z.coerce.number().optional(), - }) - - const reposListCustomDeploymentRuleIntegrationsResponseValidator = - responseValidationFactory( - [ - [ - "200", - z.object({ - total_count: z.coerce.number().optional(), - available_custom_deployment_protection_rule_integrations: z - .array(s_custom_deployment_rule_app) - .optional(), - }), - ], - ], - undefined, - ) + const actionsGetEnvironmentVariableResponseValidator = + responseValidationFactory([["200", s_actions_variable]], undefined) router.get( - "reposListCustomDeploymentRuleIntegrations", - "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules/apps", + "actionsGetEnvironmentVariable", + "/repos/:owner/:repo/environments/:environment_name/variables/:name", async (ctx, next) => { const input = { params: parseRequestInput( - reposListCustomDeploymentRuleIntegrationsParamSchema, + actionsGetEnvironmentVariableParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposListCustomDeploymentRuleIntegrationsQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse<{ - available_custom_deployment_protection_rule_integrations?: t_custom_deployment_rule_app[] - total_count?: number - }>(200) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -52471,7 +55426,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposListCustomDeploymentRuleIntegrations(input, responder, ctx) + .actionsGetEnvironmentVariable(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52479,45 +55434,48 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposListCustomDeploymentRuleIntegrationsResponseValidator( - status, - body, - ) + ctx.body = actionsGetEnvironmentVariableResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetCustomDeploymentProtectionRuleParamSchema = z.object({ + const actionsUpdateEnvironmentVariableParamSchema = z.object({ owner: z.string(), repo: z.string(), + name: z.string(), environment_name: z.string(), - protection_rule_id: z.coerce.number(), }) - const reposGetCustomDeploymentProtectionRuleResponseValidator = - responseValidationFactory( - [["200", s_deployment_protection_rule]], - undefined, - ) + const actionsUpdateEnvironmentVariableBodySchema = z.object({ + name: z.string().optional(), + value: z.string().optional(), + }) - router.get( - "reposGetCustomDeploymentProtectionRule", - "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules/:protection_rule_id", + const actionsUpdateEnvironmentVariableResponseValidator = + responseValidationFactory([["204", z.undefined()]], undefined) + + router.patch( + "actionsUpdateEnvironmentVariable", + "/repos/:owner/:repo/environments/:environment_name/variables/:name", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetCustomDeploymentProtectionRuleParamSchema, + actionsUpdateEnvironmentVariableParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, + body: parseRequestInput( + actionsUpdateEnvironmentVariableBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -52525,7 +55483,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetCustomDeploymentProtectionRule(input, responder, ctx) + .actionsUpdateEnvironmentVariable(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52533,32 +55491,29 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetCustomDeploymentProtectionRuleResponseValidator( - status, - body, - ) + ctx.body = actionsUpdateEnvironmentVariableResponseValidator(status, body) ctx.status = status return next() }, ) - const reposDisableDeploymentProtectionRuleParamSchema = z.object({ - environment_name: z.string(), - repo: z.string(), + const actionsDeleteEnvironmentVariableParamSchema = z.object({ owner: z.string(), - protection_rule_id: z.coerce.number(), + repo: z.string(), + name: z.string(), + environment_name: z.string(), }) - const reposDisableDeploymentProtectionRuleResponseValidator = + const actionsDeleteEnvironmentVariableResponseValidator = responseValidationFactory([["204", z.undefined()]], undefined) router.delete( - "reposDisableDeploymentProtectionRule", - "/repos/:owner/:repo/environments/:environment_name/deployment_protection_rules/:protection_rule_id", + "actionsDeleteEnvironmentVariable", + "/repos/:owner/:repo/environments/:environment_name/variables/:name", async (ctx, next) => { const input = { params: parseRequestInput( - reposDisableDeploymentProtectionRuleParamSchema, + actionsDeleteEnvironmentVariableParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -52576,7 +55531,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposDisableDeploymentProtectionRule(input, responder, ctx) + .actionsDeleteEnvironmentVariable(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -52584,10 +55539,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDisableDeploymentProtectionRuleResponseValidator( - status, - body, - ) + ctx.body = actionsDeleteEnvironmentVariableResponseValidator(status, body) ctx.status = status return next() }, @@ -52879,6 +55831,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ["200", s_blob], ["403", s_basic_error], ["404", s_basic_error], + ["409", s_basic_error], ["422", s_validation_error], ], undefined, @@ -52908,6 +55861,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -52961,6 +55917,7 @@ export function createRouter(implementation: Implementation): KoaRouter { [ ["201", s_git_commit], ["404", s_basic_error], + ["409", s_basic_error], ["422", s_validation_error], ], undefined, @@ -52991,6 +55948,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -53024,6 +55984,7 @@ export function createRouter(implementation: Implementation): KoaRouter { [ ["200", s_git_commit], ["404", s_basic_error], + ["409", s_basic_error], ], undefined, ) @@ -53049,6 +56010,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with409() { + return new KoaRuntimeResponse(409) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, @@ -53076,7 +56040,10 @@ export function createRouter(implementation: Implementation): KoaRouter { }) const gitListMatchingRefsResponseValidator = responseValidationFactory( - [["200", z.array(s_git_ref)]], + [ + ["200", z.array(s_git_ref)], + ["409", s_basic_error], + ], undefined, ) @@ -53098,6 +56065,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with200() { return new KoaRuntimeResponse(200) }, + with409() { + return new KoaRuntimeResponse(409) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, @@ -53128,6 +56098,7 @@ export function createRouter(implementation: Implementation): KoaRouter { [ ["200", s_git_ref], ["404", s_basic_error], + ["409", s_basic_error], ], undefined, ) @@ -53153,6 +56124,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with409() { + return new KoaRuntimeResponse(409) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, @@ -53183,6 +56157,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const gitCreateRefResponseValidator = responseValidationFactory( [ ["201", s_git_ref], + ["409", s_basic_error], ["422", s_validation_error], ], undefined, @@ -53210,6 +56185,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with201() { return new KoaRuntimeResponse(201) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -53247,6 +56225,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const gitUpdateRefResponseValidator = responseValidationFactory( [ ["200", s_git_ref], + ["409", s_basic_error], ["422", s_validation_error], ], undefined, @@ -53274,6 +56253,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with200() { return new KoaRuntimeResponse(200) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -53306,6 +56288,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const gitDeleteRefResponseValidator = responseValidationFactory( [ ["204", z.undefined()], + ["409", s_basic_error], ["422", s_validation_error], ], undefined, @@ -53329,6 +56312,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with204() { return new KoaRuntimeResponse(204) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -53374,6 +56360,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const gitCreateTagResponseValidator = responseValidationFactory( [ ["201", s_git_tag], + ["409", s_basic_error], ["422", s_validation_error], ], undefined, @@ -53401,6 +56388,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with201() { return new KoaRuntimeResponse(201) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -53434,6 +56424,7 @@ export function createRouter(implementation: Implementation): KoaRouter { [ ["200", s_git_tag], ["404", s_basic_error], + ["409", s_basic_error], ], undefined, ) @@ -53459,6 +56450,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with409() { + return new KoaRuntimeResponse(409) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, @@ -53504,6 +56498,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ["201", s_git_tree], ["403", s_basic_error], ["404", s_basic_error], + ["409", s_basic_error], ["422", s_validation_error], ], undefined, @@ -53537,6 +56532,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -53572,6 +56570,7 @@ export function createRouter(implementation: Implementation): KoaRouter { [ ["200", s_git_tree], ["404", s_basic_error], + ["409", s_basic_error], ["422", s_validation_error], ], undefined, @@ -53602,6 +56601,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with409() { + return new KoaRuntimeResponse(409) + }, with422() { return new KoaRuntimeResponse(422) }, @@ -53702,8 +56704,6 @@ export function createRouter(implementation: Implementation): KoaRouter { content_type: s_webhook_config_content_type.optional(), secret: s_webhook_config_secret.optional(), insecure_ssl: s_webhook_config_insecure_ssl.optional(), - token: z.string().optional(), - digest: z.string().optional(), }) .optional(), events: z.array(z.string()).optional(), @@ -53835,16 +56835,7 @@ export function createRouter(implementation: Implementation): KoaRouter { }) const reposUpdateWebhookBodySchema = z.object({ - config: z - .object({ - url: s_webhook_config_url, - content_type: s_webhook_config_content_type.optional(), - secret: s_webhook_config_secret.optional(), - insecure_ssl: s_webhook_config_insecure_ssl.optional(), - address: z.string().optional(), - room: z.string().optional(), - }) - .optional(), + config: s_webhook_config.optional(), events: z.array(z.string()).optional(), add_events: z.array(z.string()).optional(), remove_events: z.array(z.string()).optional(), @@ -57951,8 +60942,15 @@ export function createRouter(implementation: Implementation): KoaRouter { repo: z.string(), }) + const licensesGetForRepoQuerySchema = z.object({ + ref: s_code_scanning_ref.optional(), + }) + const licensesGetForRepoResponseValidator = responseValidationFactory( - [["200", s_license_content]], + [ + ["200", s_license_content], + ["404", s_basic_error], + ], undefined, ) @@ -57966,7 +60964,11 @@ export function createRouter(implementation: Implementation): KoaRouter { ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + licensesGetForRepoQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } @@ -57974,6 +60976,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with200() { return new KoaRuntimeResponse(200) }, + with404() { + return new KoaRuntimeResponse(404) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, @@ -59117,7 +62122,8 @@ export function createRouter(implementation: Implementation): KoaRouter { }) const reposCreatePagesDeploymentBodySchema = z.object({ - artifact_url: z.string(), + artifact_id: z.coerce.number().optional(), + artifact_url: z.string().optional(), environment: z.string().optional(), pages_build_version: z.string(), oidc_token: z.string(), @@ -59135,7 +62141,7 @@ export function createRouter(implementation: Implementation): KoaRouter { router.post( "reposCreatePagesDeployment", - "/repos/:owner/:repo/pages/deployment", + "/repos/:owner/:repo/pages/deployments", async (ctx, next) => { const input = { params: parseRequestInput( @@ -59184,6 +62190,116 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const reposGetPagesDeploymentParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + pages_deployment_id: z.union([z.coerce.number(), z.string()]), + }) + + const reposGetPagesDeploymentResponseValidator = responseValidationFactory( + [ + ["200", s_pages_deployment_status], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "reposGetPagesDeployment", + "/repos/:owner/:repo/pages/deployments/:pages_deployment_id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + reposGetPagesDeploymentParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposGetPagesDeployment(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposGetPagesDeploymentResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const reposCancelPagesDeploymentParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + pages_deployment_id: z.union([z.coerce.number(), z.string()]), + }) + + const reposCancelPagesDeploymentResponseValidator = responseValidationFactory( + [ + ["204", z.undefined()], + ["404", s_basic_error], + ], + undefined, + ) + + router.post( + "reposCancelPagesDeployment", + "/repos/:owner/:repo/pages/deployments/:pages_deployment_id/cancel", + async (ctx, next) => { + const input = { + params: parseRequestInput( + reposCancelPagesDeploymentParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposCancelPagesDeployment(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposCancelPagesDeploymentResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + const reposGetPagesHealthCheckParamSchema = z.object({ owner: z.string(), repo: z.string(), @@ -59250,6 +62366,66 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const reposCheckPrivateVulnerabilityReportingParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + }) + + const reposCheckPrivateVulnerabilityReportingResponseValidator = + responseValidationFactory( + [ + ["200", z.object({ enabled: z.coerce.boolean() })], + ["422", s_scim_error], + ], + undefined, + ) + + router.get( + "reposCheckPrivateVulnerabilityReporting", + "/repos/:owner/:repo/private-vulnerability-reporting", + async (ctx, next) => { + const input = { + params: parseRequestInput( + reposCheckPrivateVulnerabilityReportingParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + enabled: boolean + }>(200) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposCheckPrivateVulnerabilityReporting(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposCheckPrivateVulnerabilityReportingResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + const reposEnablePrivateVulnerabilityReportingParamSchema = z.object({ owner: z.string(), repo: z.string(), @@ -59525,6 +62701,139 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const reposGetCustomPropertiesValuesParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + }) + + const reposGetCustomPropertiesValuesResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_custom_property_value)], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "reposGetCustomPropertiesValues", + "/repos/:owner/:repo/properties/values", + async (ctx, next) => { + const input = { + params: parseRequestInput( + reposGetCustomPropertiesValuesParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposGetCustomPropertiesValues(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposGetCustomPropertiesValuesResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const reposCreateOrUpdateCustomPropertiesValuesParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + }) + + const reposCreateOrUpdateCustomPropertiesValuesBodySchema = z.object({ + properties: z.array(s_custom_property_value), + }) + + const reposCreateOrUpdateCustomPropertiesValuesResponseValidator = + responseValidationFactory( + [ + ["204", z.undefined()], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) + + router.patch( + "reposCreateOrUpdateCustomPropertiesValues", + "/repos/:owner/:repo/properties/values", + async (ctx, next) => { + const input = { + params: parseRequestInput( + reposCreateOrUpdateCustomPropertiesValuesParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + reposCreateOrUpdateCustomPropertiesValuesBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with204() { + return new KoaRuntimeResponse(204) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposCreateOrUpdateCustomPropertiesValues(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposCreateOrUpdateCustomPropertiesValuesResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + const pullsListParamSchema = z.object({ owner: z.string(), repo: z.string() }) const pullsListQuerySchema = z.object({ @@ -60109,6 +63418,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ["200", s_pull_request], ["304", z.undefined()], ["404", s_basic_error], + ["406", s_basic_error], ["500", s_basic_error], [ "503", @@ -60146,6 +63456,9 @@ export function createRouter(implementation: Implementation): KoaRouter { with404() { return new KoaRuntimeResponse(404) }, + with406() { + return new KoaRuntimeResponse(406) + }, with500() { return new KoaRuntimeResponse(500) }, @@ -61857,514 +65170,50 @@ export function createRouter(implementation: Implementation): KoaRouter { make_latest: z.enum(["true", "false", "legacy"]).optional(), }) - const reposCreateReleaseResponseValidator = responseValidationFactory( - [ - ["201", s_release], - ["404", s_basic_error], - ["422", s_validation_error], - ], - undefined, - ) - - router.post( - "reposCreateRelease", - "/repos/:owner/:repo/releases", - async (ctx, next) => { - const input = { - params: parseRequestInput( - reposCreateReleaseParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: undefined, - body: parseRequestInput( - reposCreateReleaseBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), - } - - const responder = { - with201() { - return new KoaRuntimeResponse(201) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - with422() { - return new KoaRuntimeResponse(422) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposCreateRelease(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposCreateReleaseResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const reposGetReleaseAssetParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - asset_id: z.coerce.number(), - }) - - const reposGetReleaseAssetResponseValidator = responseValidationFactory( - [ - ["200", s_release_asset], - ["302", z.undefined()], - ["404", s_basic_error], - ], - undefined, - ) - - router.get( - "reposGetReleaseAsset", - "/repos/:owner/:repo/releases/assets/:asset_id", - async (ctx, next) => { - const input = { - params: parseRequestInput( - reposGetReleaseAssetParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: undefined, - body: undefined, - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with302() { - return new KoaRuntimeResponse(302) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposGetReleaseAsset(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposGetReleaseAssetResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const reposUpdateReleaseAssetParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - asset_id: z.coerce.number(), - }) - - const reposUpdateReleaseAssetBodySchema = z - .object({ - name: z.string().optional(), - label: z.string().optional(), - state: z.string().optional(), - }) - .optional() - - const reposUpdateReleaseAssetResponseValidator = responseValidationFactory( - [["200", s_release_asset]], - undefined, - ) - - router.patch( - "reposUpdateReleaseAsset", - "/repos/:owner/:repo/releases/assets/:asset_id", - async (ctx, next) => { - const input = { - params: parseRequestInput( - reposUpdateReleaseAssetParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: undefined, - body: parseRequestInput( - reposUpdateReleaseAssetBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposUpdateReleaseAsset(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposUpdateReleaseAssetResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const reposDeleteReleaseAssetParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - asset_id: z.coerce.number(), - }) - - const reposDeleteReleaseAssetResponseValidator = responseValidationFactory( - [["204", z.undefined()]], - undefined, - ) - - router.delete( - "reposDeleteReleaseAsset", - "/repos/:owner/:repo/releases/assets/:asset_id", - async (ctx, next) => { - const input = { - params: parseRequestInput( - reposDeleteReleaseAssetParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: undefined, - body: undefined, - } - - const responder = { - with204() { - return new KoaRuntimeResponse(204) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposDeleteReleaseAsset(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposDeleteReleaseAssetResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const reposGenerateReleaseNotesParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - }) - - const reposGenerateReleaseNotesBodySchema = z.object({ - tag_name: z.string(), - target_commitish: z.string().optional(), - previous_tag_name: z.string().optional(), - configuration_file_path: z.string().optional(), - }) - - const reposGenerateReleaseNotesResponseValidator = responseValidationFactory( - [ - ["200", s_release_notes_content], - ["404", s_basic_error], - ], - undefined, - ) - - router.post( - "reposGenerateReleaseNotes", - "/repos/:owner/:repo/releases/generate-notes", - async (ctx, next) => { - const input = { - params: parseRequestInput( - reposGenerateReleaseNotesParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: undefined, - body: parseRequestInput( - reposGenerateReleaseNotesBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposGenerateReleaseNotes(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposGenerateReleaseNotesResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const reposGetLatestReleaseParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - }) - - const reposGetLatestReleaseResponseValidator = responseValidationFactory( - [["200", s_release]], - undefined, - ) - - router.get( - "reposGetLatestRelease", - "/repos/:owner/:repo/releases/latest", - async (ctx, next) => { - const input = { - params: parseRequestInput( - reposGetLatestReleaseParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: undefined, - body: undefined, - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposGetLatestRelease(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposGetLatestReleaseResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const reposGetReleaseByTagParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - tag: z.string(), - }) - - const reposGetReleaseByTagResponseValidator = responseValidationFactory( - [ - ["200", s_release], - ["404", s_basic_error], - ], - undefined, - ) - - router.get( - "reposGetReleaseByTag", - "/repos/:owner/:repo/releases/tags/:tag", - async (ctx, next) => { - const input = { - params: parseRequestInput( - reposGetReleaseByTagParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: undefined, - body: undefined, - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposGetReleaseByTag(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposGetReleaseByTagResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const reposGetReleaseParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - release_id: z.coerce.number(), - }) - - const reposGetReleaseResponseValidator = responseValidationFactory( - [ - ["200", s_release], - ["401", z.undefined()], - ], - undefined, - ) - - router.get( - "reposGetRelease", - "/repos/:owner/:repo/releases/:release_id", - async (ctx, next) => { - const input = { - params: parseRequestInput( - reposGetReleaseParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: undefined, - body: undefined, - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with401() { - return new KoaRuntimeResponse(401) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposGetRelease(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposGetReleaseResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const reposUpdateReleaseParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - release_id: z.coerce.number(), - }) - - const reposUpdateReleaseBodySchema = z - .object({ - tag_name: z.string().optional(), - target_commitish: z.string().optional(), - name: z.string().optional(), - body: z.string().optional(), - draft: z.coerce.boolean().optional(), - prerelease: z.coerce.boolean().optional(), - make_latest: z.enum(["true", "false", "legacy"]).optional(), - discussion_category_name: z.string().optional(), - }) - .optional() - - const reposUpdateReleaseResponseValidator = responseValidationFactory( + const reposCreateReleaseResponseValidator = responseValidationFactory( [ - ["200", s_release], + ["201", s_release], ["404", s_basic_error], + ["422", s_validation_error], ], undefined, ) - router.patch( - "reposUpdateRelease", - "/repos/:owner/:repo/releases/:release_id", + router.post( + "reposCreateRelease", + "/repos/:owner/:repo/releases", async (ctx, next) => { const input = { params: parseRequestInput( - reposUpdateReleaseParamSchema, + reposCreateReleaseParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - reposUpdateReleaseBodySchema, + reposCreateReleaseBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with201() { + return new KoaRuntimeResponse(201) }, with404() { return new KoaRuntimeResponse(404) }, + with422() { + return new KoaRuntimeResponse(422) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .reposUpdateRelease(input, responder, ctx) + .reposCreateRelease(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62372,30 +65221,34 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposUpdateReleaseResponseValidator(status, body) + ctx.body = reposCreateReleaseResponseValidator(status, body) ctx.status = status return next() }, ) - const reposDeleteReleaseParamSchema = z.object({ + const reposGetReleaseAssetParamSchema = z.object({ owner: z.string(), repo: z.string(), - release_id: z.coerce.number(), + asset_id: z.coerce.number(), }) - const reposDeleteReleaseResponseValidator = responseValidationFactory( - [["204", z.undefined()]], + const reposGetReleaseAssetResponseValidator = responseValidationFactory( + [ + ["200", s_release_asset], + ["302", z.undefined()], + ["404", s_basic_error], + ], undefined, ) - router.delete( - "reposDeleteRelease", - "/repos/:owner/:repo/releases/:release_id", + router.get( + "reposGetReleaseAsset", + "/repos/:owner/:repo/releases/assets/:asset_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposDeleteReleaseParamSchema, + reposGetReleaseAssetParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -62404,8 +65257,14 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with200() { + return new KoaRuntimeResponse(200) + }, + with302() { + return new KoaRuntimeResponse(302) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -62413,7 +65272,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposDeleteRelease(input, responder, ctx) + .reposGetReleaseAsset(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62421,49 +65280,52 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDeleteReleaseResponseValidator(status, body) + ctx.body = reposGetReleaseAssetResponseValidator(status, body) ctx.status = status return next() }, ) - const reposListReleaseAssetsParamSchema = z.object({ + const reposUpdateReleaseAssetParamSchema = z.object({ owner: z.string(), repo: z.string(), - release_id: z.coerce.number(), + asset_id: z.coerce.number(), }) - const reposListReleaseAssetsQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), - }) + const reposUpdateReleaseAssetBodySchema = z + .object({ + name: z.string().optional(), + label: z.string().optional(), + state: z.string().optional(), + }) + .optional() - const reposListReleaseAssetsResponseValidator = responseValidationFactory( - [["200", z.array(s_release_asset)]], + const reposUpdateReleaseAssetResponseValidator = responseValidationFactory( + [["200", s_release_asset]], undefined, ) - router.get( - "reposListReleaseAssets", - "/repos/:owner/:repo/releases/:release_id/assets", + router.patch( + "reposUpdateReleaseAsset", + "/repos/:owner/:repo/releases/assets/:asset_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposListReleaseAssetsParamSchema, + reposUpdateReleaseAssetParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposListReleaseAssetsQuerySchema, - ctx.query, - RequestInputType.QueryString, + query: undefined, + body: parseRequestInput( + reposUpdateReleaseAssetBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -62471,7 +65333,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposListReleaseAssets(input, responder, ctx) + .reposUpdateReleaseAsset(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62479,61 +65341,40 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposListReleaseAssetsResponseValidator(status, body) + ctx.body = reposUpdateReleaseAssetResponseValidator(status, body) ctx.status = status return next() }, ) - const reposUploadReleaseAssetParamSchema = z.object({ + const reposDeleteReleaseAssetParamSchema = z.object({ owner: z.string(), repo: z.string(), - release_id: z.coerce.number(), - }) - - const reposUploadReleaseAssetQuerySchema = z.object({ - name: z.string(), - label: z.string().optional(), + asset_id: z.coerce.number(), }) - const reposUploadReleaseAssetBodySchema = z.string().optional() - - const reposUploadReleaseAssetResponseValidator = responseValidationFactory( - [ - ["201", s_release_asset], - ["422", z.undefined()], - ], + const reposDeleteReleaseAssetResponseValidator = responseValidationFactory( + [["204", z.undefined()]], undefined, ) - router.post( - "reposUploadReleaseAsset", - "/repos/:owner/:repo/releases/:release_id/assets", + router.delete( + "reposDeleteReleaseAsset", + "/repos/:owner/:repo/releases/assets/:asset_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposUploadReleaseAssetParamSchema, + reposDeleteReleaseAssetParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposUploadReleaseAssetQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), - body: parseRequestInput( - reposUploadReleaseAssetBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + query: undefined, + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) - }, - with422() { - return new KoaRuntimeResponse(422) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -62541,7 +65382,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposUploadReleaseAsset(input, responder, ctx) + .reposDeleteReleaseAsset(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62549,55 +65390,53 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposUploadReleaseAssetResponseValidator(status, body) + ctx.body = reposDeleteReleaseAssetResponseValidator(status, body) ctx.status = status return next() }, ) - const reactionsListForReleaseParamSchema = z.object({ + const reposGenerateReleaseNotesParamSchema = z.object({ owner: z.string(), repo: z.string(), - release_id: z.coerce.number(), }) - const reactionsListForReleaseQuerySchema = z.object({ - content: z - .enum(["+1", "laugh", "heart", "hooray", "rocket", "eyes"]) - .optional(), - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), + const reposGenerateReleaseNotesBodySchema = z.object({ + tag_name: z.string(), + target_commitish: z.string().optional(), + previous_tag_name: z.string().optional(), + configuration_file_path: z.string().optional(), }) - const reactionsListForReleaseResponseValidator = responseValidationFactory( + const reposGenerateReleaseNotesResponseValidator = responseValidationFactory( [ - ["200", z.array(s_reaction)], + ["200", s_release_notes_content], ["404", s_basic_error], ], undefined, ) - router.get( - "reactionsListForRelease", - "/repos/:owner/:repo/releases/:release_id/reactions", + router.post( + "reposGenerateReleaseNotes", + "/repos/:owner/:repo/releases/generate-notes", async (ctx, next) => { const input = { params: parseRequestInput( - reactionsListForReleaseParamSchema, + reposGenerateReleaseNotesParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reactionsListForReleaseQuerySchema, - ctx.query, - RequestInputType.QueryString, + query: undefined, + body: parseRequestInput( + reposGenerateReleaseNotesBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) @@ -62608,7 +65447,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reactionsListForRelease(input, responder, ctx) + .reposGenerateReleaseNotes(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62616,58 +65455,39 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reactionsListForReleaseResponseValidator(status, body) + ctx.body = reposGenerateReleaseNotesResponseValidator(status, body) ctx.status = status return next() }, ) - const reactionsCreateForReleaseParamSchema = z.object({ + const reposGetLatestReleaseParamSchema = z.object({ owner: z.string(), repo: z.string(), - release_id: z.coerce.number(), - }) - - const reactionsCreateForReleaseBodySchema = z.object({ - content: z.enum(["+1", "laugh", "heart", "hooray", "rocket", "eyes"]), }) - const reactionsCreateForReleaseResponseValidator = responseValidationFactory( - [ - ["200", s_reaction], - ["201", s_reaction], - ["422", s_validation_error], - ], + const reposGetLatestReleaseResponseValidator = responseValidationFactory( + [["200", s_release]], undefined, ) - router.post( - "reactionsCreateForRelease", - "/repos/:owner/:repo/releases/:release_id/reactions", + router.get( + "reposGetLatestRelease", + "/repos/:owner/:repo/releases/latest", async (ctx, next) => { const input = { params: parseRequestInput( - reactionsCreateForReleaseParamSchema, + reposGetLatestReleaseParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - reactionsCreateForReleaseBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with201() { - return new KoaRuntimeResponse(201) - }, - with422() { - return new KoaRuntimeResponse(422) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -62675,7 +65495,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reactionsCreateForRelease(input, responder, ctx) + .reposGetLatestRelease(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62683,31 +65503,33 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reactionsCreateForReleaseResponseValidator(status, body) + ctx.body = reposGetLatestReleaseResponseValidator(status, body) ctx.status = status return next() }, ) - const reactionsDeleteForReleaseParamSchema = z.object({ + const reposGetReleaseByTagParamSchema = z.object({ owner: z.string(), repo: z.string(), - release_id: z.coerce.number(), - reaction_id: z.coerce.number(), + tag: z.string(), }) - const reactionsDeleteForReleaseResponseValidator = responseValidationFactory( - [["204", z.undefined()]], + const reposGetReleaseByTagResponseValidator = responseValidationFactory( + [ + ["200", s_release], + ["404", s_basic_error], + ], undefined, ) - router.delete( - "reactionsDeleteForRelease", - "/repos/:owner/:repo/releases/:release_id/reactions/:reaction_id", + router.get( + "reposGetReleaseByTag", + "/repos/:owner/:repo/releases/tags/:tag", async (ctx, next) => { const input = { params: parseRequestInput( - reactionsDeleteForReleaseParamSchema, + reposGetReleaseByTagParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -62716,8 +65538,11 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with200() { + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -62725,7 +65550,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reactionsDeleteForRelease(input, responder, ctx) + .reposGetReleaseByTag(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62733,49 +65558,46 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reactionsDeleteForReleaseResponseValidator(status, body) + ctx.body = reposGetReleaseByTagResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetBranchRulesParamSchema = z.object({ + const reposGetReleaseParamSchema = z.object({ owner: z.string(), repo: z.string(), - branch: z.string(), - }) - - const reposGetBranchRulesQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), + release_id: z.coerce.number(), }) - const reposGetBranchRulesResponseValidator = responseValidationFactory( - [["200", z.array(s_repository_rule_detailed)]], + const reposGetReleaseResponseValidator = responseValidationFactory( + [ + ["200", s_release], + ["401", z.undefined()], + ], undefined, ) router.get( - "reposGetBranchRules", - "/repos/:owner/:repo/rules/branches/:branch", + "reposGetRelease", + "/repos/:owner/:repo/releases/:release_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetBranchRulesParamSchema, + reposGetReleaseParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposGetBranchRulesQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) + }, + with401() { + return new KoaRuntimeResponse(401) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -62783,7 +65605,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetBranchRules(input, responder, ctx) + .reposGetRelease(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62791,67 +65613,71 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetBranchRulesResponseValidator(status, body) + ctx.body = reposGetReleaseResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetRepoRulesetsParamSchema = z.object({ + const reposUpdateReleaseParamSchema = z.object({ owner: z.string(), repo: z.string(), + release_id: z.coerce.number(), }) - const reposGetRepoRulesetsQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), - includes_parents: z.coerce.boolean().optional(), - }) + const reposUpdateReleaseBodySchema = z + .object({ + tag_name: z.string().optional(), + target_commitish: z.string().optional(), + name: z.string().optional(), + body: z.string().optional(), + draft: z.coerce.boolean().optional(), + prerelease: z.coerce.boolean().optional(), + make_latest: z.enum(["true", "false", "legacy"]).optional(), + discussion_category_name: z.string().optional(), + }) + .optional() - const reposGetRepoRulesetsResponseValidator = responseValidationFactory( + const reposUpdateReleaseResponseValidator = responseValidationFactory( [ - ["200", z.array(s_repository_ruleset)], + ["200", s_release], ["404", s_basic_error], - ["500", s_basic_error], ], undefined, ) - router.get( - "reposGetRepoRulesets", - "/repos/:owner/:repo/rulesets", + router.patch( + "reposUpdateRelease", + "/repos/:owner/:repo/releases/:release_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetRepoRulesetsParamSchema, + reposUpdateReleaseParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposGetRepoRulesetsQuerySchema, - ctx.query, - RequestInputType.QueryString, + query: undefined, + body: parseRequestInput( + reposUpdateReleaseBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) }, - with500() { - return new KoaRuntimeResponse(500) - }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .reposGetRepoRulesets(input, responder, ctx) + .reposUpdateRelease(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62859,62 +65685,40 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetRepoRulesetsResponseValidator(status, body) + ctx.body = reposUpdateReleaseResponseValidator(status, body) ctx.status = status return next() }, ) - const reposCreateRepoRulesetParamSchema = z.object({ + const reposDeleteReleaseParamSchema = z.object({ owner: z.string(), repo: z.string(), + release_id: z.coerce.number(), }) - const reposCreateRepoRulesetBodySchema = z.object({ - name: z.string(), - target: z.enum(["branch", "tag"]).optional(), - enforcement: s_repository_rule_enforcement, - bypass_actors: z.array(s_repository_ruleset_bypass_actor).optional(), - conditions: s_repository_ruleset_conditions.optional(), - rules: z.array(s_repository_rule).optional(), - }) - - const reposCreateRepoRulesetResponseValidator = responseValidationFactory( - [ - ["201", s_repository_ruleset], - ["404", s_basic_error], - ["500", s_basic_error], - ], + const reposDeleteReleaseResponseValidator = responseValidationFactory( + [["204", z.undefined()]], undefined, ) - router.post( - "reposCreateRepoRuleset", - "/repos/:owner/:repo/rulesets", + router.delete( + "reposDeleteRelease", + "/repos/:owner/:repo/releases/:release_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateRepoRulesetParamSchema, + reposDeleteReleaseParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - reposCreateRepoRulesetBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - with500() { - return new KoaRuntimeResponse(500) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -62922,7 +65726,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateRepoRuleset(input, responder, ctx) + .reposDeleteRelease(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62930,43 +65734,40 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateRepoRulesetResponseValidator(status, body) + ctx.body = reposDeleteReleaseResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetRepoRulesetParamSchema = z.object({ + const reposListReleaseAssetsParamSchema = z.object({ owner: z.string(), repo: z.string(), - ruleset_id: z.coerce.number(), + release_id: z.coerce.number(), }) - const reposGetRepoRulesetQuerySchema = z.object({ - includes_parents: z.coerce.boolean().optional(), + const reposListReleaseAssetsQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), }) - const reposGetRepoRulesetResponseValidator = responseValidationFactory( - [ - ["200", s_repository_ruleset], - ["404", s_basic_error], - ["500", s_basic_error], - ], + const reposListReleaseAssetsResponseValidator = responseValidationFactory( + [["200", z.array(s_release_asset)]], undefined, ) router.get( - "reposGetRepoRuleset", - "/repos/:owner/:repo/rulesets/:ruleset_id", + "reposListReleaseAssets", + "/repos/:owner/:repo/releases/:release_id/assets", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetRepoRulesetParamSchema, + reposListReleaseAssetsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - reposGetRepoRulesetQuerySchema, + reposListReleaseAssetsQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -62975,13 +65776,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - with500() { - return new KoaRuntimeResponse(500) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -62989,7 +65784,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetRepoRuleset(input, responder, ctx) + .reposListReleaseAssets(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -62997,65 +65792,61 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetRepoRulesetResponseValidator(status, body) + ctx.body = reposListReleaseAssetsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposUpdateRepoRulesetParamSchema = z.object({ + const reposUploadReleaseAssetParamSchema = z.object({ owner: z.string(), repo: z.string(), - ruleset_id: z.coerce.number(), + release_id: z.coerce.number(), }) - const reposUpdateRepoRulesetBodySchema = z - .object({ - name: z.string().optional(), - target: z.enum(["branch", "tag"]).optional(), - enforcement: s_repository_rule_enforcement.optional(), - bypass_actors: z.array(s_repository_ruleset_bypass_actor).optional(), - conditions: s_repository_ruleset_conditions.optional(), - rules: z.array(s_repository_rule).optional(), - }) - .optional() + const reposUploadReleaseAssetQuerySchema = z.object({ + name: z.string(), + label: z.string().optional(), + }) - const reposUpdateRepoRulesetResponseValidator = responseValidationFactory( + const reposUploadReleaseAssetBodySchema = z.string().optional() + + const reposUploadReleaseAssetResponseValidator = responseValidationFactory( [ - ["200", s_repository_ruleset], - ["404", s_basic_error], - ["500", s_basic_error], + ["201", s_release_asset], + ["422", z.undefined()], ], undefined, ) - router.put( - "reposUpdateRepoRuleset", - "/repos/:owner/:repo/rulesets/:ruleset_id", + router.post( + "reposUploadReleaseAsset", + "/repos/:owner/:repo/releases/:release_id/assets", async (ctx, next) => { const input = { params: parseRequestInput( - reposUpdateRepoRulesetParamSchema, + reposUploadReleaseAssetParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + reposUploadReleaseAssetQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: parseRequestInput( - reposUpdateRepoRulesetBodySchema, + reposUploadReleaseAssetBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with404() { - return new KoaRuntimeResponse(404) + with201() { + return new KoaRuntimeResponse(201) }, - with500() { - return new KoaRuntimeResponse(500) + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63063,7 +65854,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposUpdateRepoRuleset(input, responder, ctx) + .reposUploadReleaseAsset(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63071,58 +65862,66 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposUpdateRepoRulesetResponseValidator(status, body) + ctx.body = reposUploadReleaseAssetResponseValidator(status, body) ctx.status = status return next() }, ) - const reposDeleteRepoRulesetParamSchema = z.object({ + const reactionsListForReleaseParamSchema = z.object({ owner: z.string(), repo: z.string(), - ruleset_id: z.coerce.number(), + release_id: z.coerce.number(), }) - const reposDeleteRepoRulesetResponseValidator = responseValidationFactory( + const reactionsListForReleaseQuerySchema = z.object({ + content: z + .enum(["+1", "laugh", "heart", "hooray", "rocket", "eyes"]) + .optional(), + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) + + const reactionsListForReleaseResponseValidator = responseValidationFactory( [ - ["204", z.undefined()], + ["200", z.array(s_reaction)], ["404", s_basic_error], - ["500", s_basic_error], ], undefined, ) - router.delete( - "reposDeleteRepoRuleset", - "/repos/:owner/:repo/rulesets/:ruleset_id", + router.get( + "reactionsListForRelease", + "/repos/:owner/:repo/releases/:release_id/reactions", async (ctx, next) => { const input = { params: parseRequestInput( - reposDeleteRepoRulesetParamSchema, + reactionsListForReleaseParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + reactionsListForReleaseQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with200() { + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) }, - with500() { - return new KoaRuntimeResponse(500) - }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .reposDeleteRepoRuleset(input, responder, ctx) + .reactionsListForRelease(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63130,77 +65929,58 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDeleteRepoRulesetResponseValidator(status, body) + ctx.body = reactionsListForReleaseResponseValidator(status, body) ctx.status = status return next() }, ) - const secretScanningListAlertsForRepoParamSchema = z.object({ + const reactionsCreateForReleaseParamSchema = z.object({ owner: z.string(), repo: z.string(), + release_id: z.coerce.number(), }) - const secretScanningListAlertsForRepoQuerySchema = z.object({ - state: z.enum(["open", "resolved"]).optional(), - secret_type: z.string().optional(), - resolution: z.string().optional(), - sort: z.enum(["created", "updated"]).optional(), - direction: z.enum(["asc", "desc"]).optional(), - page: z.coerce.number().optional(), - per_page: z.coerce.number().optional(), - before: z.string().optional(), - after: z.string().optional(), + const reactionsCreateForReleaseBodySchema = z.object({ + content: z.enum(["+1", "laugh", "heart", "hooray", "rocket", "eyes"]), }) - const secretScanningListAlertsForRepoResponseValidator = - responseValidationFactory( - [ - ["200", z.array(s_secret_scanning_alert)], - ["404", z.undefined()], - [ - "503", - z.object({ - code: z.string().optional(), - message: z.string().optional(), - documentation_url: z.string().optional(), - }), - ], - ], - undefined, - ) + const reactionsCreateForReleaseResponseValidator = responseValidationFactory( + [ + ["200", s_reaction], + ["201", s_reaction], + ["422", s_validation_error], + ], + undefined, + ) - router.get( - "secretScanningListAlertsForRepo", - "/repos/:owner/:repo/secret-scanning/alerts", + router.post( + "reactionsCreateForRelease", + "/repos/:owner/:repo/releases/:release_id/reactions", async (ctx, next) => { const input = { params: parseRequestInput( - secretScanningListAlertsForRepoParamSchema, + reactionsCreateForReleaseParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - secretScanningListAlertsForRepoQuerySchema, - ctx.query, - RequestInputType.QueryString, + query: undefined, + body: parseRequestInput( + reactionsCreateForReleaseBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, - with404() { - return new KoaRuntimeResponse(404) + with201() { + return new KoaRuntimeResponse(201) }, - with503() { - return new KoaRuntimeResponse<{ - code?: string - documentation_url?: string - message?: string - }>(503) + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63208,7 +65988,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .secretScanningListAlertsForRepo(input, responder, ctx) + .reactionsCreateForRelease(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63216,42 +65996,31 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = secretScanningListAlertsForRepoResponseValidator(status, body) + ctx.body = reactionsCreateForReleaseResponseValidator(status, body) ctx.status = status return next() }, ) - const secretScanningGetAlertParamSchema = z.object({ + const reactionsDeleteForReleaseParamSchema = z.object({ owner: z.string(), repo: z.string(), - alert_number: s_alert_number, + release_id: z.coerce.number(), + reaction_id: z.coerce.number(), }) - const secretScanningGetAlertResponseValidator = responseValidationFactory( - [ - ["200", s_secret_scanning_alert], - ["304", z.undefined()], - ["404", z.undefined()], - [ - "503", - z.object({ - code: z.string().optional(), - message: z.string().optional(), - documentation_url: z.string().optional(), - }), - ], - ], + const reactionsDeleteForReleaseResponseValidator = responseValidationFactory( + [["204", z.undefined()]], undefined, ) - router.get( - "secretScanningGetAlert", - "/repos/:owner/:repo/secret-scanning/alerts/:alert_number", + router.delete( + "reactionsDeleteForRelease", + "/repos/:owner/:repo/releases/:release_id/reactions/:reaction_id", async (ctx, next) => { const input = { params: parseRequestInput( - secretScanningGetAlertParamSchema, + reactionsDeleteForReleaseParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -63260,21 +66029,8 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with304() { - return new KoaRuntimeResponse(304) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - with503() { - return new KoaRuntimeResponse<{ - code?: string - documentation_url?: string - message?: string - }>(503) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63282,7 +66038,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .secretScanningGetAlert(input, responder, ctx) + .reactionsDeleteForRelease(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63290,79 +66046,49 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = secretScanningGetAlertResponseValidator(status, body) + ctx.body = reactionsDeleteForReleaseResponseValidator(status, body) ctx.status = status return next() }, ) - const secretScanningUpdateAlertParamSchema = z.object({ + const reposGetBranchRulesParamSchema = z.object({ owner: z.string(), repo: z.string(), - alert_number: s_alert_number, + branch: z.string(), }) - const secretScanningUpdateAlertBodySchema = z.object({ - state: s_secret_scanning_alert_state, - resolution: s_secret_scanning_alert_resolution.optional(), - resolution_comment: s_secret_scanning_alert_resolution_comment.optional(), + const reposGetBranchRulesQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), }) - const secretScanningUpdateAlertResponseValidator = responseValidationFactory( - [ - ["200", s_secret_scanning_alert], - ["400", z.undefined()], - ["404", z.undefined()], - ["422", z.undefined()], - [ - "503", - z.object({ - code: z.string().optional(), - message: z.string().optional(), - documentation_url: z.string().optional(), - }), - ], - ], + const reposGetBranchRulesResponseValidator = responseValidationFactory( + [["200", z.array(s_repository_rule_detailed)]], undefined, ) - router.patch( - "secretScanningUpdateAlert", - "/repos/:owner/:repo/secret-scanning/alerts/:alert_number", + router.get( + "reposGetBranchRules", + "/repos/:owner/:repo/rules/branches/:branch", async (ctx, next) => { const input = { params: parseRequestInput( - secretScanningUpdateAlertParamSchema, + reposGetBranchRulesParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, - body: parseRequestInput( - secretScanningUpdateAlertBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, + query: parseRequestInput( + reposGetBranchRulesQuerySchema, + ctx.query, + RequestInputType.QueryString, ), + body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with400() { - return new KoaRuntimeResponse(400) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - with422() { - return new KoaRuntimeResponse(422) - }, - with503() { - return new KoaRuntimeResponse<{ - code?: string - documentation_url?: string - message?: string - }>(503) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63370,7 +66096,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .secretScanningUpdateAlert(input, responder, ctx) + .reposGetBranchRules(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63378,52 +66104,44 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = secretScanningUpdateAlertResponseValidator(status, body) + ctx.body = reposGetBranchRulesResponseValidator(status, body) ctx.status = status return next() }, ) - const secretScanningListLocationsForAlertParamSchema = z.object({ + const reposGetRepoRulesetsParamSchema = z.object({ owner: z.string(), repo: z.string(), - alert_number: s_alert_number, }) - const secretScanningListLocationsForAlertQuerySchema = z.object({ - page: z.coerce.number().optional(), + const reposGetRepoRulesetsQuerySchema = z.object({ per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + includes_parents: z.coerce.boolean().optional(), }) - const secretScanningListLocationsForAlertResponseValidator = - responseValidationFactory( - [ - ["200", z.array(s_secret_scanning_location)], - ["404", z.undefined()], - [ - "503", - z.object({ - code: z.string().optional(), - message: z.string().optional(), - documentation_url: z.string().optional(), - }), - ], - ], - undefined, - ) + const reposGetRepoRulesetsResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_repository_ruleset)], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) router.get( - "secretScanningListLocationsForAlert", - "/repos/:owner/:repo/secret-scanning/alerts/:alert_number/locations", + "reposGetRepoRulesets", + "/repos/:owner/:repo/rulesets", async (ctx, next) => { const input = { params: parseRequestInput( - secretScanningListLocationsForAlertParamSchema, + reposGetRepoRulesetsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - secretScanningListLocationsForAlertQuerySchema, + reposGetRepoRulesetsQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -63432,17 +66150,13 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, with404() { - return new KoaRuntimeResponse(404) + return new KoaRuntimeResponse(404) }, - with503() { - return new KoaRuntimeResponse<{ - code?: string - documentation_url?: string - message?: string - }>(503) + with500() { + return new KoaRuntimeResponse(500) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63450,7 +66164,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .secretScanningListLocationsForAlert(input, responder, ctx) + .reposGetRepoRulesets(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63458,74 +66172,70 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = secretScanningListLocationsForAlertResponseValidator( - status, - body, - ) + ctx.body = reposGetRepoRulesetsResponseValidator(status, body) ctx.status = status return next() }, ) - const securityAdvisoriesListRepositoryAdvisoriesParamSchema = z.object({ + const reposCreateRepoRulesetParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const securityAdvisoriesListRepositoryAdvisoriesQuerySchema = z.object({ - direction: z.enum(["asc", "desc"]).optional(), - sort: z.enum(["created", "updated", "published"]).optional(), - before: z.string().optional(), - after: z.string().optional(), - per_page: z.coerce.number().min(1).max(100).optional(), - state: z.enum(["triage", "draft", "published", "closed"]).optional(), + const reposCreateRepoRulesetBodySchema = z.object({ + name: z.string(), + target: z.enum(["branch", "tag"]).optional(), + enforcement: s_repository_rule_enforcement, + bypass_actors: z.array(s_repository_ruleset_bypass_actor).optional(), + conditions: s_repository_ruleset_conditions.optional(), + rules: z.array(s_repository_rule).optional(), }) - const securityAdvisoriesListRepositoryAdvisoriesResponseValidator = - responseValidationFactory( - [ - ["200", z.array(s_repository_advisory)], - ["400", s_scim_error], - ["404", s_basic_error], - ], - undefined, - ) + const reposCreateRepoRulesetResponseValidator = responseValidationFactory( + [ + ["201", s_repository_ruleset], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) - router.get( - "securityAdvisoriesListRepositoryAdvisories", - "/repos/:owner/:repo/security-advisories", + router.post( + "reposCreateRepoRuleset", + "/repos/:owner/:repo/rulesets", async (ctx, next) => { const input = { params: parseRequestInput( - securityAdvisoriesListRepositoryAdvisoriesParamSchema, + reposCreateRepoRulesetParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - securityAdvisoriesListRepositoryAdvisoriesQuerySchema, - ctx.query, - RequestInputType.QueryString, + query: undefined, + body: parseRequestInput( + reposCreateRepoRulesetBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with400() { - return new KoaRuntimeResponse(400) + with201() { + return new KoaRuntimeResponse(201) }, with404() { return new KoaRuntimeResponse(404) }, + with500() { + return new KoaRuntimeResponse(500) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .securityAdvisoriesListRepositoryAdvisories(input, responder, ctx) + .reposCreateRepoRuleset(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63533,64 +66243,62 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = securityAdvisoriesListRepositoryAdvisoriesResponseValidator( - status, - body, - ) + ctx.body = reposCreateRepoRulesetResponseValidator(status, body) ctx.status = status return next() }, ) - const securityAdvisoriesCreateRepositoryAdvisoryParamSchema = z.object({ + const reposGetRepoRuleSuitesParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const securityAdvisoriesCreateRepositoryAdvisoryBodySchema = - s_repository_advisory_create + const reposGetRepoRuleSuitesQuerySchema = z.object({ + ref: z.string().optional(), + time_period: z.enum(["hour", "day", "week", "month"]).optional(), + actor_name: z.string().optional(), + rule_suite_result: z.enum(["pass", "fail", "bypass", "all"]).optional(), + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) - const securityAdvisoriesCreateRepositoryAdvisoryResponseValidator = - responseValidationFactory( - [ - ["201", s_repository_advisory], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ], - undefined, - ) + const reposGetRepoRuleSuitesResponseValidator = responseValidationFactory( + [ + ["200", s_rule_suites], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) - router.post( - "securityAdvisoriesCreateRepositoryAdvisory", - "/repos/:owner/:repo/security-advisories", + router.get( + "reposGetRepoRuleSuites", + "/repos/:owner/:repo/rulesets/rule-suites", async (ctx, next) => { const input = { params: parseRequestInput( - securityAdvisoriesCreateRepositoryAdvisoryParamSchema, + reposGetRepoRuleSuitesParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, - body: parseRequestInput( - securityAdvisoriesCreateRepositoryAdvisoryBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, + query: parseRequestInput( + reposGetRepoRuleSuitesQuerySchema, + ctx.query, + RequestInputType.QueryString, ), + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) - }, - with403() { - return new KoaRuntimeResponse(403) + with200() { + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) }, - with422() { - return new KoaRuntimeResponse(422) + with500() { + return new KoaRuntimeResponse(500) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63598,7 +66306,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .securityAdvisoriesCreateRepositoryAdvisory(input, responder, ctx) + .reposGetRepoRuleSuites(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63606,62 +66314,50 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = securityAdvisoriesCreateRepositoryAdvisoryResponseValidator( - status, - body, - ) + ctx.body = reposGetRepoRuleSuitesResponseValidator(status, body) ctx.status = status return next() }, ) - const securityAdvisoriesCreatePrivateVulnerabilityReportParamSchema = - z.object({ owner: z.string(), repo: z.string() }) - - const securityAdvisoriesCreatePrivateVulnerabilityReportBodySchema = - s_private_vulnerability_report_create + const reposGetRepoRuleSuiteParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + rule_suite_id: z.coerce.number(), + }) - const securityAdvisoriesCreatePrivateVulnerabilityReportResponseValidator = - responseValidationFactory( - [ - ["201", s_repository_advisory], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ], - undefined, - ) + const reposGetRepoRuleSuiteResponseValidator = responseValidationFactory( + [ + ["200", s_rule_suite], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) - router.post( - "securityAdvisoriesCreatePrivateVulnerabilityReport", - "/repos/:owner/:repo/security-advisories/reports", + router.get( + "reposGetRepoRuleSuite", + "/repos/:owner/:repo/rulesets/rule-suites/:rule_suite_id", async (ctx, next) => { const input = { params: parseRequestInput( - securityAdvisoriesCreatePrivateVulnerabilityReportParamSchema, + reposGetRepoRuleSuiteParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - securityAdvisoriesCreatePrivateVulnerabilityReportBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) - }, - with403() { - return new KoaRuntimeResponse(403) + with200() { + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) }, - with422() { - return new KoaRuntimeResponse(422) + with500() { + return new KoaRuntimeResponse(500) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63669,11 +66365,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .securityAdvisoriesCreatePrivateVulnerabilityReport( - input, - responder, - ctx, - ) + .reposGetRepoRuleSuite(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63681,63 +66373,66 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = - securityAdvisoriesCreatePrivateVulnerabilityReportResponseValidator( - status, - body, - ) + ctx.body = reposGetRepoRuleSuiteResponseValidator(status, body) ctx.status = status return next() }, ) - const securityAdvisoriesGetRepositoryAdvisoryParamSchema = z.object({ + const reposGetRepoRulesetParamSchema = z.object({ owner: z.string(), repo: z.string(), - ghsa_id: z.string(), + ruleset_id: z.coerce.number(), }) - const securityAdvisoriesGetRepositoryAdvisoryResponseValidator = - responseValidationFactory( - [ - ["200", s_repository_advisory], - ["403", s_basic_error], - ["404", s_basic_error], - ], - undefined, - ) + const reposGetRepoRulesetQuerySchema = z.object({ + includes_parents: z.coerce.boolean().optional(), + }) + + const reposGetRepoRulesetResponseValidator = responseValidationFactory( + [ + ["200", s_repository_ruleset], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) router.get( - "securityAdvisoriesGetRepositoryAdvisory", - "/repos/:owner/:repo/security-advisories/:ghsa_id", + "reposGetRepoRuleset", + "/repos/:owner/:repo/rulesets/:ruleset_id", async (ctx, next) => { const input = { params: parseRequestInput( - securityAdvisoriesGetRepositoryAdvisoryParamSchema, + reposGetRepoRulesetParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + reposGetRepoRulesetQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with403() { - return new KoaRuntimeResponse(403) + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) }, + with500() { + return new KoaRuntimeResponse(500) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .securityAdvisoriesGetRepositoryAdvisory(input, responder, ctx) + .reposGetRepoRuleset(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63745,48 +66440,51 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = securityAdvisoriesGetRepositoryAdvisoryResponseValidator( - status, - body, - ) + ctx.body = reposGetRepoRulesetResponseValidator(status, body) ctx.status = status return next() }, ) - const securityAdvisoriesUpdateRepositoryAdvisoryParamSchema = z.object({ + const reposUpdateRepoRulesetParamSchema = z.object({ owner: z.string(), repo: z.string(), - ghsa_id: z.string(), + ruleset_id: z.coerce.number(), }) - const securityAdvisoriesUpdateRepositoryAdvisoryBodySchema = - s_repository_advisory_update + const reposUpdateRepoRulesetBodySchema = z + .object({ + name: z.string().optional(), + target: z.enum(["branch", "tag"]).optional(), + enforcement: s_repository_rule_enforcement.optional(), + bypass_actors: z.array(s_repository_ruleset_bypass_actor).optional(), + conditions: s_repository_ruleset_conditions.optional(), + rules: z.array(s_repository_rule).optional(), + }) + .optional() - const securityAdvisoriesUpdateRepositoryAdvisoryResponseValidator = - responseValidationFactory( - [ - ["200", s_repository_advisory], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ], - undefined, - ) + const reposUpdateRepoRulesetResponseValidator = responseValidationFactory( + [ + ["200", s_repository_ruleset], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) - router.patch( - "securityAdvisoriesUpdateRepositoryAdvisory", - "/repos/:owner/:repo/security-advisories/:ghsa_id", + router.put( + "reposUpdateRepoRuleset", + "/repos/:owner/:repo/rulesets/:ruleset_id", async (ctx, next) => { const input = { params: parseRequestInput( - securityAdvisoriesUpdateRepositoryAdvisoryParamSchema, + reposUpdateRepoRulesetParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - securityAdvisoriesUpdateRepositoryAdvisoryBodySchema, + reposUpdateRepoRulesetBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -63794,16 +66492,13 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with403() { - return new KoaRuntimeResponse(403) + return new KoaRuntimeResponse(200) }, with404() { return new KoaRuntimeResponse(404) }, - with422() { - return new KoaRuntimeResponse(422) + with500() { + return new KoaRuntimeResponse(500) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63811,7 +66506,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .securityAdvisoriesUpdateRepositoryAdvisory(input, responder, ctx) + .reposUpdateRepoRuleset(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63819,37 +66514,34 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = securityAdvisoriesUpdateRepositoryAdvisoryResponseValidator( - status, - body, - ) + ctx.body = reposUpdateRepoRulesetResponseValidator(status, body) ctx.status = status return next() }, ) - const securityAdvisoriesCreateRepositoryAdvisoryCveRequestParamSchema = - z.object({ owner: z.string(), repo: z.string(), ghsa_id: z.string() }) + const reposDeleteRepoRulesetParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + ruleset_id: z.coerce.number(), + }) - const securityAdvisoriesCreateRepositoryAdvisoryCveRequestResponseValidator = - responseValidationFactory( - [ - ["202", z.record(z.any())], - ["400", s_scim_error], - ["403", s_basic_error], - ["404", s_basic_error], - ["422", s_validation_error], - ], - undefined, - ) + const reposDeleteRepoRulesetResponseValidator = responseValidationFactory( + [ + ["204", z.undefined()], + ["404", s_basic_error], + ["500", s_basic_error], + ], + undefined, + ) - router.post( - "securityAdvisoriesCreateRepositoryAdvisoryCveRequest", - "/repos/:owner/:repo/security-advisories/:ghsa_id/cve", + router.delete( + "reposDeleteRepoRuleset", + "/repos/:owner/:repo/rulesets/:ruleset_id", async (ctx, next) => { const input = { params: parseRequestInput( - securityAdvisoriesCreateRepositoryAdvisoryCveRequestParamSchema, + reposDeleteRepoRulesetParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -63858,22 +66550,14 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with202() { - return new KoaRuntimeResponse<{ - [key: string]: unknown | undefined - }>(202) - }, - with400() { - return new KoaRuntimeResponse(400) - }, - with403() { - return new KoaRuntimeResponse(403) + with204() { + return new KoaRuntimeResponse(204) }, with404() { return new KoaRuntimeResponse(404) }, - with422() { - return new KoaRuntimeResponse(422) + with500() { + return new KoaRuntimeResponse(500) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63881,11 +66565,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .securityAdvisoriesCreateRepositoryAdvisoryCveRequest( - input, - responder, - ctx, - ) + .reposDeleteRepoRuleset(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63893,47 +66573,59 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = - securityAdvisoriesCreateRepositoryAdvisoryCveRequestResponseValidator( - status, - body, - ) + ctx.body = reposDeleteRepoRulesetResponseValidator(status, body) ctx.status = status return next() }, ) - const activityListStargazersForRepoParamSchema = z.object({ + const secretScanningListAlertsForRepoParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const activityListStargazersForRepoQuerySchema = z.object({ - per_page: z.coerce.number().optional(), + const secretScanningListAlertsForRepoQuerySchema = z.object({ + state: z.enum(["open", "resolved"]).optional(), + secret_type: z.string().optional(), + resolution: z.string().optional(), + sort: z.enum(["created", "updated"]).optional(), + direction: z.enum(["asc", "desc"]).optional(), page: z.coerce.number().optional(), + per_page: z.coerce.number().optional(), + before: z.string().optional(), + after: z.string().optional(), + validity: z.string().optional(), }) - const activityListStargazersForRepoResponseValidator = + const secretScanningListAlertsForRepoResponseValidator = responseValidationFactory( [ - ["200", z.union([z.array(s_simple_user), z.array(s_stargazer)])], - ["422", s_validation_error], + ["200", z.array(s_secret_scanning_alert)], + ["404", z.undefined()], + [ + "503", + z.object({ + code: z.string().optional(), + message: z.string().optional(), + documentation_url: z.string().optional(), + }), + ], ], undefined, ) router.get( - "activityListStargazersForRepo", - "/repos/:owner/:repo/stargazers", + "secretScanningListAlertsForRepo", + "/repos/:owner/:repo/secret-scanning/alerts", async (ctx, next) => { const input = { params: parseRequestInput( - activityListStargazersForRepoParamSchema, + secretScanningListAlertsForRepoParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - activityListStargazersForRepoQuerySchema, + secretScanningListAlertsForRepoQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -63942,10 +66634,17 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, - with422() { - return new KoaRuntimeResponse(422) + with404() { + return new KoaRuntimeResponse(404) + }, + with503() { + return new KoaRuntimeResponse<{ + code?: string + documentation_url?: string + message?: string + }>(503) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -63953,7 +66652,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .activityListStargazersForRepo(input, responder, ctx) + .secretScanningListAlertsForRepo(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -63961,33 +66660,42 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = activityListStargazersForRepoResponseValidator(status, body) + ctx.body = secretScanningListAlertsForRepoResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetCodeFrequencyStatsParamSchema = z.object({ + const secretScanningGetAlertParamSchema = z.object({ owner: z.string(), repo: z.string(), + alert_number: s_alert_number, }) - const reposGetCodeFrequencyStatsResponseValidator = responseValidationFactory( + const secretScanningGetAlertResponseValidator = responseValidationFactory( [ - ["200", z.array(s_code_frequency_stat)], - ["202", z.record(z.any())], - ["204", z.undefined()], + ["200", s_secret_scanning_alert], + ["304", z.undefined()], + ["404", z.undefined()], + [ + "503", + z.object({ + code: z.string().optional(), + message: z.string().optional(), + documentation_url: z.string().optional(), + }), + ], ], undefined, ) router.get( - "reposGetCodeFrequencyStats", - "/repos/:owner/:repo/stats/code_frequency", + "secretScanningGetAlert", + "/repos/:owner/:repo/secret-scanning/alerts/:alert_number", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetCodeFrequencyStatsParamSchema, + secretScanningGetAlertParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -63997,15 +66705,20 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, - with202() { - return new KoaRuntimeResponse<{ - [key: string]: unknown | undefined - }>(202) + with304() { + return new KoaRuntimeResponse(304) }, - with204() { - return new KoaRuntimeResponse(204) + with404() { + return new KoaRuntimeResponse(404) + }, + with503() { + return new KoaRuntimeResponse<{ + code?: string + documentation_url?: string + message?: string + }>(503) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64013,7 +66726,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetCodeFrequencyStats(input, responder, ctx) + .secretScanningGetAlert(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64021,52 +66734,79 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetCodeFrequencyStatsResponseValidator(status, body) + ctx.body = secretScanningGetAlertResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetCommitActivityStatsParamSchema = z.object({ + const secretScanningUpdateAlertParamSchema = z.object({ owner: z.string(), repo: z.string(), + alert_number: s_alert_number, }) - const reposGetCommitActivityStatsResponseValidator = - responseValidationFactory( + const secretScanningUpdateAlertBodySchema = z.object({ + state: s_secret_scanning_alert_state, + resolution: s_secret_scanning_alert_resolution.optional(), + resolution_comment: s_secret_scanning_alert_resolution_comment.optional(), + }) + + const secretScanningUpdateAlertResponseValidator = responseValidationFactory( + [ + ["200", s_secret_scanning_alert], + ["400", z.undefined()], + ["404", z.undefined()], + ["422", z.undefined()], [ - ["200", z.array(s_commit_activity)], - ["202", z.record(z.any())], - ["204", z.undefined()], + "503", + z.object({ + code: z.string().optional(), + message: z.string().optional(), + documentation_url: z.string().optional(), + }), ], - undefined, - ) + ], + undefined, + ) - router.get( - "reposGetCommitActivityStats", - "/repos/:owner/:repo/stats/commit_activity", + router.patch( + "secretScanningUpdateAlert", + "/repos/:owner/:repo/secret-scanning/alerts/:alert_number", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetCommitActivityStatsParamSchema, + secretScanningUpdateAlertParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, + body: parseRequestInput( + secretScanningUpdateAlertBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, - with202() { - return new KoaRuntimeResponse<{ - [key: string]: unknown | undefined - }>(202) + with400() { + return new KoaRuntimeResponse(400) }, - with204() { - return new KoaRuntimeResponse(204) + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + with503() { + return new KoaRuntimeResponse<{ + code?: string + documentation_url?: string + message?: string + }>(503) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64074,7 +66814,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetCommitActivityStats(input, responder, ctx) + .secretScanningUpdateAlert(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64082,51 +66822,71 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetCommitActivityStatsResponseValidator(status, body) + ctx.body = secretScanningUpdateAlertResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetContributorsStatsParamSchema = z.object({ + const secretScanningListLocationsForAlertParamSchema = z.object({ owner: z.string(), repo: z.string(), + alert_number: s_alert_number, }) - const reposGetContributorsStatsResponseValidator = responseValidationFactory( - [ - ["200", z.array(s_contributor_activity)], - ["202", z.record(z.any())], - ["204", z.undefined()], - ], - undefined, - ) + const secretScanningListLocationsForAlertQuerySchema = z.object({ + page: z.coerce.number().optional(), + per_page: z.coerce.number().optional(), + }) + + const secretScanningListLocationsForAlertResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_secret_scanning_location)], + ["404", z.undefined()], + [ + "503", + z.object({ + code: z.string().optional(), + message: z.string().optional(), + documentation_url: z.string().optional(), + }), + ], + ], + undefined, + ) router.get( - "reposGetContributorsStats", - "/repos/:owner/:repo/stats/contributors", + "secretScanningListLocationsForAlert", + "/repos/:owner/:repo/secret-scanning/alerts/:alert_number/locations", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetContributorsStatsParamSchema, + secretScanningListLocationsForAlertParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + secretScanningListLocationsForAlertQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, - with202() { - return new KoaRuntimeResponse<{ - [key: string]: unknown | undefined - }>(202) + with404() { + return new KoaRuntimeResponse(404) }, - with204() { - return new KoaRuntimeResponse(204) + with503() { + return new KoaRuntimeResponse<{ + code?: string + documentation_url?: string + message?: string + }>(503) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64134,7 +66894,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetContributorsStats(input, responder, ctx) + .secretScanningListLocationsForAlert(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64142,42 +66902,63 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetContributorsStatsResponseValidator(status, body) + ctx.body = secretScanningListLocationsForAlertResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposGetParticipationStatsParamSchema = z.object({ + const securityAdvisoriesListRepositoryAdvisoriesParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposGetParticipationStatsResponseValidator = responseValidationFactory( - [ - ["200", s_participation_stats], - ["404", s_basic_error], - ], - undefined, - ) + const securityAdvisoriesListRepositoryAdvisoriesQuerySchema = z.object({ + direction: z.enum(["asc", "desc"]).optional(), + sort: z.enum(["created", "updated", "published"]).optional(), + before: z.string().optional(), + after: z.string().optional(), + per_page: z.coerce.number().min(1).max(100).optional(), + state: z.enum(["triage", "draft", "published", "closed"]).optional(), + }) + + const securityAdvisoriesListRepositoryAdvisoriesResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_repository_advisory)], + ["400", s_scim_error], + ["404", s_basic_error], + ], + undefined, + ) router.get( - "reposGetParticipationStats", - "/repos/:owner/:repo/stats/participation", + "securityAdvisoriesListRepositoryAdvisories", + "/repos/:owner/:repo/security-advisories", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetParticipationStatsParamSchema, + securityAdvisoriesListRepositoryAdvisoriesParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + securityAdvisoriesListRepositoryAdvisoriesQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) + }, + with400() { + return new KoaRuntimeResponse(400) }, with404() { return new KoaRuntimeResponse(404) @@ -64188,7 +66969,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetParticipationStats(input, responder, ctx) + .securityAdvisoriesListRepositoryAdvisories(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64196,45 +66977,135 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetParticipationStatsResponseValidator(status, body) + ctx.body = securityAdvisoriesListRepositoryAdvisoriesResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposGetPunchCardStatsParamSchema = z.object({ + const securityAdvisoriesCreateRepositoryAdvisoryParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposGetPunchCardStatsResponseValidator = responseValidationFactory( - [ - ["200", z.array(s_code_frequency_stat)], - ["204", z.undefined()], - ], - undefined, + const securityAdvisoriesCreateRepositoryAdvisoryBodySchema = + s_repository_advisory_create + + const securityAdvisoriesCreateRepositoryAdvisoryResponseValidator = + responseValidationFactory( + [ + ["201", s_repository_advisory], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) + + router.post( + "securityAdvisoriesCreateRepositoryAdvisory", + "/repos/:owner/:repo/security-advisories", + async (ctx, next) => { + const input = { + params: parseRequestInput( + securityAdvisoriesCreateRepositoryAdvisoryParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + securityAdvisoriesCreateRepositoryAdvisoryBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with201() { + return new KoaRuntimeResponse(201) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .securityAdvisoriesCreateRepositoryAdvisory(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = securityAdvisoriesCreateRepositoryAdvisoryResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, ) - router.get( - "reposGetPunchCardStats", - "/repos/:owner/:repo/stats/punch_card", + const securityAdvisoriesCreatePrivateVulnerabilityReportParamSchema = + z.object({ owner: z.string(), repo: z.string() }) + + const securityAdvisoriesCreatePrivateVulnerabilityReportBodySchema = + s_private_vulnerability_report_create + + const securityAdvisoriesCreatePrivateVulnerabilityReportResponseValidator = + responseValidationFactory( + [ + ["201", s_repository_advisory], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) + + router.post( + "securityAdvisoriesCreatePrivateVulnerabilityReport", + "/repos/:owner/:repo/security-advisories/reports", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetPunchCardStatsParamSchema, + securityAdvisoriesCreatePrivateVulnerabilityReportParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, + body: parseRequestInput( + securityAdvisoriesCreatePrivateVulnerabilityReportBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with201() { + return new KoaRuntimeResponse(201) }, - with204() { - return new KoaRuntimeResponse(204) + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64242,7 +67113,11 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetPunchCardStats(input, responder, ctx) + .securityAdvisoriesCreatePrivateVulnerabilityReport( + input, + responder, + ctx, + ) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64250,51 +67125,55 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetPunchCardStatsResponseValidator(status, body) + ctx.body = + securityAdvisoriesCreatePrivateVulnerabilityReportResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const reposCreateCommitStatusParamSchema = z.object({ + const securityAdvisoriesGetRepositoryAdvisoryParamSchema = z.object({ owner: z.string(), repo: z.string(), - sha: z.string(), - }) - - const reposCreateCommitStatusBodySchema = z.object({ - state: z.enum(["error", "failure", "pending", "success"]), - target_url: z.string().nullable().optional(), - description: z.string().nullable().optional(), - context: z.string().optional(), + ghsa_id: z.string(), }) - const reposCreateCommitStatusResponseValidator = responseValidationFactory( - [["201", s_status]], - undefined, - ) + const securityAdvisoriesGetRepositoryAdvisoryResponseValidator = + responseValidationFactory( + [ + ["200", s_repository_advisory], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) - router.post( - "reposCreateCommitStatus", - "/repos/:owner/:repo/statuses/:sha", + router.get( + "securityAdvisoriesGetRepositoryAdvisory", + "/repos/:owner/:repo/security-advisories/:ghsa_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateCommitStatusParamSchema, + securityAdvisoriesGetRepositoryAdvisoryParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - reposCreateCommitStatusBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) + with200() { + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64302,7 +67181,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateCommitStatus(input, responder, ctx) + .securityAdvisoriesGetRepositoryAdvisory(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64310,46 +67189,65 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateCommitStatusResponseValidator(status, body) + ctx.body = securityAdvisoriesGetRepositoryAdvisoryResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const activityListWatchersForRepoParamSchema = z.object({ + const securityAdvisoriesUpdateRepositoryAdvisoryParamSchema = z.object({ owner: z.string(), repo: z.string(), + ghsa_id: z.string(), }) - const activityListWatchersForRepoQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), - }) + const securityAdvisoriesUpdateRepositoryAdvisoryBodySchema = + s_repository_advisory_update - const activityListWatchersForRepoResponseValidator = - responseValidationFactory([["200", z.array(s_simple_user)]], undefined) + const securityAdvisoriesUpdateRepositoryAdvisoryResponseValidator = + responseValidationFactory( + [ + ["200", s_repository_advisory], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) - router.get( - "activityListWatchersForRepo", - "/repos/:owner/:repo/subscribers", + router.patch( + "securityAdvisoriesUpdateRepositoryAdvisory", + "/repos/:owner/:repo/security-advisories/:ghsa_id", async (ctx, next) => { const input = { params: parseRequestInput( - activityListWatchersForRepoParamSchema, + securityAdvisoriesUpdateRepositoryAdvisoryParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - activityListWatchersForRepoQuerySchema, - ctx.query, - RequestInputType.QueryString, + query: undefined, + body: parseRequestInput( + securityAdvisoriesUpdateRepositoryAdvisoryBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64357,7 +67255,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .activityListWatchersForRepo(input, responder, ctx) + .securityAdvisoriesUpdateRepositoryAdvisory(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64365,34 +67263,37 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = activityListWatchersForRepoResponseValidator(status, body) + ctx.body = securityAdvisoriesUpdateRepositoryAdvisoryResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const activityGetRepoSubscriptionParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - }) + const securityAdvisoriesCreateRepositoryAdvisoryCveRequestParamSchema = + z.object({ owner: z.string(), repo: z.string(), ghsa_id: z.string() }) - const activityGetRepoSubscriptionResponseValidator = + const securityAdvisoriesCreateRepositoryAdvisoryCveRequestResponseValidator = responseValidationFactory( [ - ["200", s_repository_subscription], + ["202", z.record(z.any())], + ["400", s_scim_error], ["403", s_basic_error], - ["404", z.undefined()], + ["404", s_basic_error], + ["422", s_validation_error], ], undefined, ) - router.get( - "activityGetRepoSubscription", - "/repos/:owner/:repo/subscription", + router.post( + "securityAdvisoriesCreateRepositoryAdvisoryCveRequest", + "/repos/:owner/:repo/security-advisories/:ghsa_id/cve", async (ctx, next) => { const input = { params: parseRequestInput( - activityGetRepoSubscriptionParamSchema, + securityAdvisoriesCreateRepositoryAdvisoryCveRequestParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -64401,14 +67302,22 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with202() { + return new KoaRuntimeResponse<{ + [key: string]: unknown | undefined + }>(202) + }, + with400() { + return new KoaRuntimeResponse(400) }, with403() { return new KoaRuntimeResponse(403) }, with404() { - return new KoaRuntimeResponse(404) + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64416,7 +67325,11 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .activityGetRepoSubscription(input, responder, ctx) + .securityAdvisoriesCreateRepositoryAdvisoryCveRequest( + input, + responder, + ctx, + ) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64424,48 +67337,63 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = activityGetRepoSubscriptionResponseValidator(status, body) + ctx.body = + securityAdvisoriesCreateRepositoryAdvisoryCveRequestResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const activitySetRepoSubscriptionParamSchema = z.object({ + const securityAdvisoriesCreateForkParamSchema = z.object({ owner: z.string(), repo: z.string(), + ghsa_id: z.string(), }) - const activitySetRepoSubscriptionBodySchema = z - .object({ - subscribed: z.coerce.boolean().optional(), - ignored: z.coerce.boolean().optional(), - }) - .optional() - - const activitySetRepoSubscriptionResponseValidator = - responseValidationFactory([["200", s_repository_subscription]], undefined) + const securityAdvisoriesCreateForkResponseValidator = + responseValidationFactory( + [ + ["202", s_full_repository], + ["400", s_scim_error], + ["403", s_basic_error], + ["404", s_basic_error], + ["422", s_validation_error], + ], + undefined, + ) - router.put( - "activitySetRepoSubscription", - "/repos/:owner/:repo/subscription", + router.post( + "securityAdvisoriesCreateFork", + "/repos/:owner/:repo/security-advisories/:ghsa_id/forks", async (ctx, next) => { const input = { params: parseRequestInput( - activitySetRepoSubscriptionParamSchema, + securityAdvisoriesCreateForkParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - activitySetRepoSubscriptionBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with202() { + return new KoaRuntimeResponse(202) + }, + with400() { + return new KoaRuntimeResponse(400) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64473,7 +67401,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .activitySetRepoSubscription(input, responder, ctx) + .securityAdvisoriesCreateFork(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64481,37 +67409,55 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = activitySetRepoSubscriptionResponseValidator(status, body) + ctx.body = securityAdvisoriesCreateForkResponseValidator(status, body) ctx.status = status return next() }, ) - const activityDeleteRepoSubscriptionParamSchema = z.object({ + const activityListStargazersForRepoParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const activityDeleteRepoSubscriptionResponseValidator = - responseValidationFactory([["204", z.undefined()]], undefined) + const activityListStargazersForRepoQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) - router.delete( - "activityDeleteRepoSubscription", - "/repos/:owner/:repo/subscription", + const activityListStargazersForRepoResponseValidator = + responseValidationFactory( + [ + ["200", z.union([z.array(s_simple_user), z.array(s_stargazer)])], + ["422", s_validation_error], + ], + undefined, + ) + + router.get( + "activityListStargazersForRepo", + "/repos/:owner/:repo/stargazers", async (ctx, next) => { const input = { params: parseRequestInput( - activityDeleteRepoSubscriptionParamSchema, + activityListStargazersForRepoParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + activityListStargazersForRepoQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with200() { + return new KoaRuntimeResponse(200) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64519,7 +67465,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .activityDeleteRepoSubscription(input, responder, ctx) + .activityListStargazersForRepo(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64527,86 +67473,34 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = activityDeleteRepoSubscriptionResponseValidator(status, body) + ctx.body = activityListStargazersForRepoResponseValidator(status, body) ctx.status = status return next() }, ) - const reposListTagsParamSchema = z.object({ - owner: z.string(), - repo: z.string(), - }) - - const reposListTagsQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), - }) - - const reposListTagsResponseValidator = responseValidationFactory( - [["200", z.array(s_tag)]], - undefined, - ) - - router.get("reposListTags", "/repos/:owner/:repo/tags", async (ctx, next) => { - const input = { - params: parseRequestInput( - reposListTagsParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: parseRequestInput( - reposListTagsQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), - body: undefined, - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposListTags(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposListTagsResponseValidator(status, body) - ctx.status = status - return next() - }) - - const reposListTagProtectionParamSchema = z.object({ + const reposGetCodeFrequencyStatsParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposListTagProtectionResponseValidator = responseValidationFactory( + const reposGetCodeFrequencyStatsResponseValidator = responseValidationFactory( [ - ["200", z.array(s_tag_protection)], - ["403", s_basic_error], - ["404", s_basic_error], + ["200", z.array(s_code_frequency_stat)], + ["202", z.record(z.any())], + ["204", z.undefined()], + ["422", z.undefined()], ], undefined, ) router.get( - "reposListTagProtection", - "/repos/:owner/:repo/tags/protection", + "reposGetCodeFrequencyStats", + "/repos/:owner/:repo/stats/code_frequency", async (ctx, next) => { const input = { params: parseRequestInput( - reposListTagProtectionParamSchema, + reposGetCodeFrequencyStatsParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -64616,13 +67510,18 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, - with403() { - return new KoaRuntimeResponse(403) + with202() { + return new KoaRuntimeResponse<{ + [key: string]: unknown | undefined + }>(202) }, - with404() { - return new KoaRuntimeResponse(404) + with204() { + return new KoaRuntimeResponse(204) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64630,7 +67529,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposListTagProtection(input, responder, ctx) + .reposGetCodeFrequencyStats(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64638,55 +67537,52 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposListTagProtectionResponseValidator(status, body) + ctx.body = reposGetCodeFrequencyStatsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposCreateTagProtectionParamSchema = z.object({ + const reposGetCommitActivityStatsParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposCreateTagProtectionBodySchema = z.object({ pattern: z.string() }) - - const reposCreateTagProtectionResponseValidator = responseValidationFactory( - [ - ["201", s_tag_protection], - ["403", s_basic_error], - ["404", s_basic_error], - ], - undefined, - ) + const reposGetCommitActivityStatsResponseValidator = + responseValidationFactory( + [ + ["200", z.array(s_commit_activity)], + ["202", z.record(z.any())], + ["204", z.undefined()], + ], + undefined, + ) - router.post( - "reposCreateTagProtection", - "/repos/:owner/:repo/tags/protection", + router.get( + "reposGetCommitActivityStats", + "/repos/:owner/:repo/stats/commit_activity", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateTagProtectionParamSchema, + reposGetCommitActivityStatsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - reposCreateTagProtectionBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) + with200() { + return new KoaRuntimeResponse(200) }, - with403() { - return new KoaRuntimeResponse(403) + with202() { + return new KoaRuntimeResponse<{ + [key: string]: unknown | undefined + }>(202) }, - with404() { - return new KoaRuntimeResponse(404) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64694,7 +67590,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateTagProtection(input, responder, ctx) + .reposGetCommitActivityStats(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64702,34 +67598,33 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateTagProtectionResponseValidator(status, body) + ctx.body = reposGetCommitActivityStatsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposDeleteTagProtectionParamSchema = z.object({ + const reposGetContributorsStatsParamSchema = z.object({ owner: z.string(), repo: z.string(), - tag_protection_id: z.coerce.number(), }) - const reposDeleteTagProtectionResponseValidator = responseValidationFactory( + const reposGetContributorsStatsResponseValidator = responseValidationFactory( [ + ["200", z.array(s_contributor_activity)], + ["202", z.record(z.any())], ["204", z.undefined()], - ["403", s_basic_error], - ["404", s_basic_error], ], undefined, ) - router.delete( - "reposDeleteTagProtection", - "/repos/:owner/:repo/tags/protection/:tag_protection_id", + router.get( + "reposGetContributorsStats", + "/repos/:owner/:repo/stats/contributors", async (ctx, next) => { const input = { params: parseRequestInput( - reposDeleteTagProtectionParamSchema, + reposGetContributorsStatsParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -64738,14 +67633,16 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with200() { + return new KoaRuntimeResponse(200) }, - with403() { - return new KoaRuntimeResponse(403) + with202() { + return new KoaRuntimeResponse<{ + [key: string]: unknown | undefined + }>(202) }, - with404() { - return new KoaRuntimeResponse(404) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64753,7 +67650,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposDeleteTagProtection(input, responder, ctx) + .reposGetContributorsStats(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64761,28 +67658,32 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDeleteTagProtectionResponseValidator(status, body) + ctx.body = reposGetContributorsStatsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposDownloadTarballArchiveParamSchema = z.object({ + const reposGetParticipationStatsParamSchema = z.object({ owner: z.string(), repo: z.string(), - ref: z.string(), }) - const reposDownloadTarballArchiveResponseValidator = - responseValidationFactory([["302", z.undefined()]], undefined) + const reposGetParticipationStatsResponseValidator = responseValidationFactory( + [ + ["200", s_participation_stats], + ["404", s_basic_error], + ], + undefined, + ) router.get( - "reposDownloadTarballArchive", - "/repos/:owner/:repo/tarball/:ref", + "reposGetParticipationStats", + "/repos/:owner/:repo/stats/participation", async (ctx, next) => { const input = { params: parseRequestInput( - reposDownloadTarballArchiveParamSchema, + reposGetParticipationStatsParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -64791,8 +67692,11 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with302() { - return new KoaRuntimeResponse(302) + with200() { + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64800,7 +67704,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposDownloadTarballArchive(input, responder, ctx) + .reposGetParticipationStats(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64808,54 +67712,45 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDownloadTarballArchiveResponseValidator(status, body) + ctx.body = reposGetParticipationStatsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposListTeamsParamSchema = z.object({ + const reposGetPunchCardStatsParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposListTeamsQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), - }) - - const reposListTeamsResponseValidator = responseValidationFactory( + const reposGetPunchCardStatsResponseValidator = responseValidationFactory( [ - ["200", z.array(s_team)], - ["404", s_basic_error], + ["200", z.array(s_code_frequency_stat)], + ["204", z.undefined()], ], undefined, ) router.get( - "reposListTeams", - "/repos/:owner/:repo/teams", + "reposGetPunchCardStats", + "/repos/:owner/:repo/stats/punch_card", async (ctx, next) => { const input = { params: parseRequestInput( - reposListTeamsParamSchema, + reposGetPunchCardStatsParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposListTeamsQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, - with404() { - return new KoaRuntimeResponse(404) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64863,7 +67758,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposListTeams(input, responder, ctx) + .reposGetPunchCardStats(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64871,54 +67766,51 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposListTeamsResponseValidator(status, body) + ctx.body = reposGetPunchCardStatsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetAllTopicsParamSchema = z.object({ + const reposCreateCommitStatusParamSchema = z.object({ owner: z.string(), repo: z.string(), + sha: z.string(), }) - const reposGetAllTopicsQuerySchema = z.object({ - page: z.coerce.number().optional(), - per_page: z.coerce.number().optional(), + const reposCreateCommitStatusBodySchema = z.object({ + state: z.enum(["error", "failure", "pending", "success"]), + target_url: z.string().nullable().optional(), + description: z.string().nullable().optional(), + context: z.string().optional(), }) - const reposGetAllTopicsResponseValidator = responseValidationFactory( - [ - ["200", s_topic], - ["404", s_basic_error], - ], + const reposCreateCommitStatusResponseValidator = responseValidationFactory( + [["201", s_status]], undefined, ) - router.get( - "reposGetAllTopics", - "/repos/:owner/:repo/topics", + router.post( + "reposCreateCommitStatus", + "/repos/:owner/:repo/statuses/:sha", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetAllTopicsParamSchema, + reposCreateCommitStatusParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposGetAllTopicsQuerySchema, - ctx.query, - RequestInputType.QueryString, + query: undefined, + body: parseRequestInput( + reposCreateCommitStatusBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, ), - body: undefined, } const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with404() { - return new KoaRuntimeResponse(404) + with201() { + return new KoaRuntimeResponse(201) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64926,7 +67818,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetAllTopics(input, responder, ctx) + .reposCreateCommitStatus(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -64934,57 +67826,46 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetAllTopicsResponseValidator(status, body) + ctx.body = reposCreateCommitStatusResponseValidator(status, body) ctx.status = status return next() }, ) - const reposReplaceAllTopicsParamSchema = z.object({ + const activityListWatchersForRepoParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposReplaceAllTopicsBodySchema = z.object({ - names: z.array(z.string()), + const activityListWatchersForRepoQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), }) - const reposReplaceAllTopicsResponseValidator = responseValidationFactory( - [ - ["200", s_topic], - ["404", s_basic_error], - ["422", s_validation_error_simple], - ], - undefined, - ) + const activityListWatchersForRepoResponseValidator = + responseValidationFactory([["200", z.array(s_simple_user)]], undefined) - router.put( - "reposReplaceAllTopics", - "/repos/:owner/:repo/topics", + router.get( + "activityListWatchersForRepo", + "/repos/:owner/:repo/subscribers", async (ctx, next) => { const input = { params: parseRequestInput( - reposReplaceAllTopicsParamSchema, + activityListWatchersForRepoParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, - body: parseRequestInput( - reposReplaceAllTopicsBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, + query: parseRequestInput( + activityListWatchersForRepoQuerySchema, + ctx.query, + RequestInputType.QueryString, ), + body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with404() { - return new KoaRuntimeResponse(404) - }, - with422() { - return new KoaRuntimeResponse(422) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -64992,7 +67873,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposReplaceAllTopics(input, responder, ctx) + .activityListWatchersForRepo(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65000,61 +67881,58 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposReplaceAllTopicsResponseValidator(status, body) + ctx.body = activityListWatchersForRepoResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetClonesParamSchema = z.object({ + const activityGetRepoSubscriptionParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposGetClonesQuerySchema = z.object({ - per: z.enum(["day", "week"]).optional(), - }) - - const reposGetClonesResponseValidator = responseValidationFactory( - [ - ["200", s_clone_traffic], - ["403", s_basic_error], - ], - undefined, - ) + const activityGetRepoSubscriptionResponseValidator = + responseValidationFactory( + [ + ["200", s_repository_subscription], + ["403", s_basic_error], + ["404", z.undefined()], + ], + undefined, + ) router.get( - "reposGetClones", - "/repos/:owner/:repo/traffic/clones", + "activityGetRepoSubscription", + "/repos/:owner/:repo/subscription", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetClonesParamSchema, + activityGetRepoSubscriptionParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposGetClonesQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, with403() { return new KoaRuntimeResponse(403) }, + with404() { + return new KoaRuntimeResponse(404) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .reposGetClones(input, responder, ctx) + .activityGetRepoSubscription(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65062,45 +67940,48 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetClonesResponseValidator(status, body) + ctx.body = activityGetRepoSubscriptionResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetTopPathsParamSchema = z.object({ + const activitySetRepoSubscriptionParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposGetTopPathsResponseValidator = responseValidationFactory( - [ - ["200", z.array(s_content_traffic)], - ["403", s_basic_error], - ], - undefined, - ) + const activitySetRepoSubscriptionBodySchema = z + .object({ + subscribed: z.coerce.boolean().optional(), + ignored: z.coerce.boolean().optional(), + }) + .optional() - router.get( - "reposGetTopPaths", - "/repos/:owner/:repo/traffic/popular/paths", + const activitySetRepoSubscriptionResponseValidator = + responseValidationFactory([["200", s_repository_subscription]], undefined) + + router.put( + "activitySetRepoSubscription", + "/repos/:owner/:repo/subscription", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetTopPathsParamSchema, + activitySetRepoSubscriptionParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, + body: parseRequestInput( + activitySetRepoSubscriptionBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), } const responder = { with200() { - return new KoaRuntimeResponse(200) - }, - with403() { - return new KoaRuntimeResponse(403) + return new KoaRuntimeResponse(200) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65108,7 +67989,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetTopPaths(input, responder, ctx) + .activitySetRepoSubscription(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65116,32 +67997,27 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetTopPathsResponseValidator(status, body) + ctx.body = activitySetRepoSubscriptionResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetTopReferrersParamSchema = z.object({ + const activityDeleteRepoSubscriptionParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposGetTopReferrersResponseValidator = responseValidationFactory( - [ - ["200", z.array(s_referrer_traffic)], - ["403", s_basic_error], - ], - undefined, - ) + const activityDeleteRepoSubscriptionResponseValidator = + responseValidationFactory([["204", z.undefined()]], undefined) - router.get( - "reposGetTopReferrers", - "/repos/:owner/:repo/traffic/popular/referrers", + router.delete( + "activityDeleteRepoSubscription", + "/repos/:owner/:repo/subscription", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetTopReferrersParamSchema, + activityDeleteRepoSubscriptionParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -65150,11 +68026,8 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with403() { - return new KoaRuntimeResponse(403) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65162,7 +68035,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposGetTopReferrers(input, responder, ctx) + .activityDeleteRepoSubscription(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65170,61 +68043,110 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetTopReferrersResponseValidator(status, body) + ctx.body = activityDeleteRepoSubscriptionResponseValidator(status, body) ctx.status = status return next() }, ) - const reposGetViewsParamSchema = z.object({ + const reposListTagsParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposGetViewsQuerySchema = z.object({ - per: z.enum(["day", "week"]).optional(), + const reposListTagsQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), }) - const reposGetViewsResponseValidator = responseValidationFactory( + const reposListTagsResponseValidator = responseValidationFactory( + [["200", z.array(s_tag)]], + undefined, + ) + + router.get("reposListTags", "/repos/:owner/:repo/tags", async (ctx, next) => { + const input = { + params: parseRequestInput( + reposListTagsParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + reposListTagsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposListTags(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposListTagsResponseValidator(status, body) + ctx.status = status + return next() + }) + + const reposListTagProtectionParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + }) + + const reposListTagProtectionResponseValidator = responseValidationFactory( [ - ["200", s_view_traffic], + ["200", z.array(s_tag_protection)], ["403", s_basic_error], + ["404", s_basic_error], ], undefined, ) router.get( - "reposGetViews", - "/repos/:owner/:repo/traffic/views", + "reposListTagProtection", + "/repos/:owner/:repo/tags/protection", async (ctx, next) => { const input = { params: parseRequestInput( - reposGetViewsParamSchema, + reposListTagProtectionParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - reposGetViewsQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, with403() { return new KoaRuntimeResponse(403) }, + with404() { + return new KoaRuntimeResponse(404) + }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) }, } const response = await implementation - .reposGetViews(input, responder, ctx) + .reposListTagProtection(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65232,49 +68154,55 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposGetViewsResponseValidator(status, body) + ctx.body = reposListTagProtectionResponseValidator(status, body) ctx.status = status return next() }, ) - const reposTransferParamSchema = z.object({ + const reposCreateTagProtectionParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposTransferBodySchema = z.object({ - new_owner: z.string(), - new_name: z.string().optional(), - team_ids: z.array(z.coerce.number()).optional(), - }) + const reposCreateTagProtectionBodySchema = z.object({ pattern: z.string() }) - const reposTransferResponseValidator = responseValidationFactory( - [["202", s_minimal_repository]], + const reposCreateTagProtectionResponseValidator = responseValidationFactory( + [ + ["201", s_tag_protection], + ["403", s_basic_error], + ["404", s_basic_error], + ], undefined, ) router.post( - "reposTransfer", - "/repos/:owner/:repo/transfer", + "reposCreateTagProtection", + "/repos/:owner/:repo/tags/protection", async (ctx, next) => { const input = { params: parseRequestInput( - reposTransferParamSchema, + reposCreateTagProtectionParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - reposTransferBodySchema, + reposCreateTagProtectionBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with202() { - return new KoaRuntimeResponse(202) + with201() { + return new KoaRuntimeResponse(201) + }, + with403() { + return new KoaRuntimeResponse(403) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65282,7 +68210,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposTransfer(input, responder, ctx) + .reposCreateTagProtection(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65290,33 +68218,34 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposTransferResponseValidator(status, body) + ctx.body = reposCreateTagProtectionResponseValidator(status, body) ctx.status = status return next() }, ) - const reposCheckVulnerabilityAlertsParamSchema = z.object({ + const reposDeleteTagProtectionParamSchema = z.object({ owner: z.string(), repo: z.string(), + tag_protection_id: z.coerce.number(), }) - const reposCheckVulnerabilityAlertsResponseValidator = - responseValidationFactory( - [ - ["204", z.undefined()], - ["404", z.undefined()], - ], - undefined, - ) + const reposDeleteTagProtectionResponseValidator = responseValidationFactory( + [ + ["204", z.undefined()], + ["403", s_basic_error], + ["404", s_basic_error], + ], + undefined, + ) - router.get( - "reposCheckVulnerabilityAlerts", - "/repos/:owner/:repo/vulnerability-alerts", + router.delete( + "reposDeleteTagProtection", + "/repos/:owner/:repo/tags/protection/:tag_protection_id", async (ctx, next) => { const input = { params: parseRequestInput( - reposCheckVulnerabilityAlertsParamSchema, + reposDeleteTagProtectionParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -65328,8 +68257,11 @@ export function createRouter(implementation: Implementation): KoaRouter { with204() { return new KoaRuntimeResponse(204) }, + with403() { + return new KoaRuntimeResponse(403) + }, with404() { - return new KoaRuntimeResponse(404) + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65337,7 +68269,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCheckVulnerabilityAlerts(input, responder, ctx) + .reposDeleteTagProtection(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65345,27 +68277,28 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCheckVulnerabilityAlertsResponseValidator(status, body) + ctx.body = reposDeleteTagProtectionResponseValidator(status, body) ctx.status = status return next() }, ) - const reposEnableVulnerabilityAlertsParamSchema = z.object({ + const reposDownloadTarballArchiveParamSchema = z.object({ owner: z.string(), repo: z.string(), + ref: z.string(), }) - const reposEnableVulnerabilityAlertsResponseValidator = - responseValidationFactory([["204", z.undefined()]], undefined) + const reposDownloadTarballArchiveResponseValidator = + responseValidationFactory([["302", z.undefined()]], undefined) - router.put( - "reposEnableVulnerabilityAlerts", - "/repos/:owner/:repo/vulnerability-alerts", + router.get( + "reposDownloadTarballArchive", + "/repos/:owner/:repo/tarball/:ref", async (ctx, next) => { const input = { params: parseRequestInput( - reposEnableVulnerabilityAlertsParamSchema, + reposDownloadTarballArchiveParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -65374,8 +68307,8 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with302() { + return new KoaRuntimeResponse(302) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65383,7 +68316,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposEnableVulnerabilityAlerts(input, responder, ctx) + .reposDownloadTarballArchive(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65391,37 +68324,54 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposEnableVulnerabilityAlertsResponseValidator(status, body) + ctx.body = reposDownloadTarballArchiveResponseValidator(status, body) ctx.status = status return next() }, ) - const reposDisableVulnerabilityAlertsParamSchema = z.object({ + const reposListTeamsParamSchema = z.object({ owner: z.string(), repo: z.string(), }) - const reposDisableVulnerabilityAlertsResponseValidator = - responseValidationFactory([["204", z.undefined()]], undefined) + const reposListTeamsQuerySchema = z.object({ + per_page: z.coerce.number().optional(), + page: z.coerce.number().optional(), + }) - router.delete( - "reposDisableVulnerabilityAlerts", - "/repos/:owner/:repo/vulnerability-alerts", + const reposListTeamsResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_team)], + ["404", s_basic_error], + ], + undefined, + ) + + router.get( + "reposListTeams", + "/repos/:owner/:repo/teams", async (ctx, next) => { const input = { params: parseRequestInput( - reposDisableVulnerabilityAlertsParamSchema, + reposListTeamsParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + reposListTeamsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with200() { + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65429,7 +68379,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposDisableVulnerabilityAlerts(input, responder, ctx) + .reposListTeams(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65437,38 +68387,54 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDisableVulnerabilityAlertsResponseValidator(status, body) + ctx.body = reposListTeamsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposDownloadZipballArchiveParamSchema = z.object({ + const reposGetAllTopicsParamSchema = z.object({ owner: z.string(), repo: z.string(), - ref: z.string(), }) - const reposDownloadZipballArchiveResponseValidator = - responseValidationFactory([["302", z.undefined()]], undefined) + const reposGetAllTopicsQuerySchema = z.object({ + page: z.coerce.number().optional(), + per_page: z.coerce.number().optional(), + }) + + const reposGetAllTopicsResponseValidator = responseValidationFactory( + [ + ["200", s_topic], + ["404", s_basic_error], + ], + undefined, + ) router.get( - "reposDownloadZipballArchive", - "/repos/:owner/:repo/zipball/:ref", + "reposGetAllTopics", + "/repos/:owner/:repo/topics", async (ctx, next) => { const input = { params: parseRequestInput( - reposDownloadZipballArchiveParamSchema, + reposGetAllTopicsParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + reposGetAllTopicsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: undefined, } const responder = { - with302() { - return new KoaRuntimeResponse(302) + with200() { + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65476,7 +68442,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposDownloadZipballArchive(input, responder, ctx) + .reposGetAllTopics(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65484,51 +68450,57 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposDownloadZipballArchiveResponseValidator(status, body) + ctx.body = reposGetAllTopicsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposCreateUsingTemplateParamSchema = z.object({ - template_owner: z.string(), - template_repo: z.string(), + const reposReplaceAllTopicsParamSchema = z.object({ + owner: z.string(), + repo: z.string(), }) - const reposCreateUsingTemplateBodySchema = z.object({ - owner: z.string().optional(), - name: z.string(), - description: z.string().optional(), - include_all_branches: z.coerce.boolean().optional(), - private: z.coerce.boolean().optional(), + const reposReplaceAllTopicsBodySchema = z.object({ + names: z.array(z.string()), }) - const reposCreateUsingTemplateResponseValidator = responseValidationFactory( - [["201", s_repository]], + const reposReplaceAllTopicsResponseValidator = responseValidationFactory( + [ + ["200", s_topic], + ["404", s_basic_error], + ["422", s_validation_error_simple], + ], undefined, ) - router.post( - "reposCreateUsingTemplate", - "/repos/:template_owner/:template_repo/generate", + router.put( + "reposReplaceAllTopics", + "/repos/:owner/:repo/topics", async (ctx, next) => { const input = { params: parseRequestInput( - reposCreateUsingTemplateParamSchema, + reposReplaceAllTopicsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - reposCreateUsingTemplateBodySchema, + reposReplaceAllTopicsBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), } const responder = { - with201() { - return new KoaRuntimeResponse(201) + with200() { + return new KoaRuntimeResponse(200) + }, + with404() { + return new KoaRuntimeResponse(404) + }, + with422() { + return new KoaRuntimeResponse(422) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65536,7 +68508,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .reposCreateUsingTemplate(input, responder, ctx) + .reposReplaceAllTopics(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65544,101 +68516,41 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = reposCreateUsingTemplateResponseValidator(status, body) + ctx.body = reposReplaceAllTopicsResponseValidator(status, body) ctx.status = status return next() }, ) - const reposListPublicQuerySchema = z.object({ - since: z.coerce.number().optional(), + const reposGetClonesParamSchema = z.object({ + owner: z.string(), + repo: z.string(), }) - const reposListPublicResponseValidator = responseValidationFactory( + const reposGetClonesQuerySchema = z.object({ + per: z.enum(["day", "week"]).optional(), + }) + + const reposGetClonesResponseValidator = responseValidationFactory( [ - ["200", z.array(s_minimal_repository)], - ["304", z.undefined()], - ["422", s_validation_error], + ["200", s_clone_traffic], + ["403", s_basic_error], ], undefined, ) - router.get("reposListPublic", "/repositories", async (ctx, next) => { - const input = { - params: undefined, - query: parseRequestInput( - reposListPublicQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), - body: undefined, - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - with304() { - return new KoaRuntimeResponse(304) - }, - with422() { - return new KoaRuntimeResponse(422) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .reposListPublic(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = reposListPublicResponseValidator(status, body) - ctx.status = status - return next() - }) - - const actionsListEnvironmentSecretsParamSchema = z.object({ - repository_id: z.coerce.number(), - environment_name: z.string(), - }) - - const actionsListEnvironmentSecretsQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), - }) - - const actionsListEnvironmentSecretsResponseValidator = - responseValidationFactory( - [ - [ - "200", - z.object({ - total_count: z.coerce.number(), - secrets: z.array(s_actions_secret), - }), - ], - ], - undefined, - ) - router.get( - "actionsListEnvironmentSecrets", - "/repositories/:repository_id/environments/:environment_name/secrets", + "reposGetClones", + "/repos/:owner/:repo/traffic/clones", async (ctx, next) => { const input = { params: parseRequestInput( - actionsListEnvironmentSecretsParamSchema, + reposGetClonesParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - actionsListEnvironmentSecretsQuerySchema, + reposGetClonesQuerySchema, ctx.query, RequestInputType.QueryString, ), @@ -65647,10 +68559,10 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse<{ - secrets: t_actions_secret[] - total_count: number - }>(200) + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65658,7 +68570,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsListEnvironmentSecrets(input, responder, ctx) + .reposGetClones(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65666,27 +68578,32 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsListEnvironmentSecretsResponseValidator(status, body) + ctx.body = reposGetClonesResponseValidator(status, body) ctx.status = status return next() }, ) - const actionsGetEnvironmentPublicKeyParamSchema = z.object({ - repository_id: z.coerce.number(), - environment_name: z.string(), + const reposGetTopPathsParamSchema = z.object({ + owner: z.string(), + repo: z.string(), }) - const actionsGetEnvironmentPublicKeyResponseValidator = - responseValidationFactory([["200", s_actions_public_key]], undefined) + const reposGetTopPathsResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_content_traffic)], + ["403", s_basic_error], + ], + undefined, + ) router.get( - "actionsGetEnvironmentPublicKey", - "/repositories/:repository_id/environments/:environment_name/secrets/public-key", + "reposGetTopPaths", + "/repos/:owner/:repo/traffic/popular/paths", async (ctx, next) => { const input = { params: parseRequestInput( - actionsGetEnvironmentPublicKeyParamSchema, + reposGetTopPathsParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -65696,7 +68613,10 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65704,7 +68624,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsGetEnvironmentPublicKey(input, responder, ctx) + .reposGetTopPaths(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65712,28 +68632,32 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsGetEnvironmentPublicKeyResponseValidator(status, body) + ctx.body = reposGetTopPathsResponseValidator(status, body) ctx.status = status return next() }, ) - const actionsGetEnvironmentSecretParamSchema = z.object({ - repository_id: z.coerce.number(), - environment_name: z.string(), - secret_name: z.string(), + const reposGetTopReferrersParamSchema = z.object({ + owner: z.string(), + repo: z.string(), }) - const actionsGetEnvironmentSecretResponseValidator = - responseValidationFactory([["200", s_actions_secret]], undefined) + const reposGetTopReferrersResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_referrer_traffic)], + ["403", s_basic_error], + ], + undefined, + ) router.get( - "actionsGetEnvironmentSecret", - "/repositories/:repository_id/environments/:environment_name/secrets/:secret_name", + "reposGetTopReferrers", + "/repos/:owner/:repo/traffic/popular/referrers", async (ctx, next) => { const input = { params: parseRequestInput( - actionsGetEnvironmentSecretParamSchema, + reposGetTopReferrersParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -65743,7 +68667,10 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) + }, + with403() { + return new KoaRuntimeResponse(403) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65751,7 +68678,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsGetEnvironmentSecret(input, responder, ctx) + .reposGetTopReferrers(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65759,56 +68686,53 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsGetEnvironmentSecretResponseValidator(status, body) + ctx.body = reposGetTopReferrersResponseValidator(status, body) ctx.status = status return next() }, ) - const actionsCreateOrUpdateEnvironmentSecretParamSchema = z.object({ - repository_id: z.coerce.number(), - environment_name: z.string(), - secret_name: z.string(), + const reposGetViewsParamSchema = z.object({ + owner: z.string(), + repo: z.string(), }) - const actionsCreateOrUpdateEnvironmentSecretBodySchema = z.object({ - encrypted_value: z.string(), - key_id: z.string(), + const reposGetViewsQuerySchema = z.object({ + per: z.enum(["day", "week"]).optional(), }) - const actionsCreateOrUpdateEnvironmentSecretResponseValidator = - responseValidationFactory( - [ - ["201", s_empty_object], - ["204", z.undefined()], - ], - undefined, - ) + const reposGetViewsResponseValidator = responseValidationFactory( + [ + ["200", s_view_traffic], + ["403", s_basic_error], + ], + undefined, + ) - router.put( - "actionsCreateOrUpdateEnvironmentSecret", - "/repositories/:repository_id/environments/:environment_name/secrets/:secret_name", + router.get( + "reposGetViews", + "/repos/:owner/:repo/traffic/views", async (ctx, next) => { const input = { params: parseRequestInput( - actionsCreateOrUpdateEnvironmentSecretParamSchema, + reposGetViewsParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, - body: parseRequestInput( - actionsCreateOrUpdateEnvironmentSecretBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, + query: parseRequestInput( + reposGetViewsQuerySchema, + ctx.query, + RequestInputType.QueryString, ), + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) + with200() { + return new KoaRuntimeResponse(200) }, - with204() { - return new KoaRuntimeResponse(204) + with403() { + return new KoaRuntimeResponse(403) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65816,7 +68740,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsCreateOrUpdateEnvironmentSecret(input, responder, ctx) + .reposGetViews(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65824,41 +68748,49 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsCreateOrUpdateEnvironmentSecretResponseValidator( - status, - body, - ) + ctx.body = reposGetViewsResponseValidator(status, body) ctx.status = status return next() }, ) - const actionsDeleteEnvironmentSecretParamSchema = z.object({ - repository_id: z.coerce.number(), - environment_name: z.string(), - secret_name: z.string(), + const reposTransferParamSchema = z.object({ + owner: z.string(), + repo: z.string(), }) - const actionsDeleteEnvironmentSecretResponseValidator = - responseValidationFactory([["204", z.undefined()]], undefined) + const reposTransferBodySchema = z.object({ + new_owner: z.string(), + new_name: z.string().optional(), + team_ids: z.array(z.coerce.number()).optional(), + }) - router.delete( - "actionsDeleteEnvironmentSecret", - "/repositories/:repository_id/environments/:environment_name/secrets/:secret_name", + const reposTransferResponseValidator = responseValidationFactory( + [["202", s_minimal_repository]], + undefined, + ) + + router.post( + "reposTransfer", + "/repos/:owner/:repo/transfer", async (ctx, next) => { const input = { params: parseRequestInput( - actionsDeleteEnvironmentSecretParamSchema, + reposTransferParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, + body: parseRequestInput( + reposTransferBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with202() { + return new KoaRuntimeResponse(202) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65866,7 +68798,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsDeleteEnvironmentSecret(input, responder, ctx) + .reposTransfer(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65874,60 +68806,46 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsDeleteEnvironmentSecretResponseValidator(status, body) + ctx.body = reposTransferResponseValidator(status, body) ctx.status = status return next() }, ) - const actionsListEnvironmentVariablesParamSchema = z.object({ - repository_id: z.coerce.number(), - environment_name: z.string(), - }) - - const actionsListEnvironmentVariablesQuerySchema = z.object({ - per_page: z.coerce.number().optional(), - page: z.coerce.number().optional(), + const reposCheckVulnerabilityAlertsParamSchema = z.object({ + owner: z.string(), + repo: z.string(), }) - const actionsListEnvironmentVariablesResponseValidator = + const reposCheckVulnerabilityAlertsResponseValidator = responseValidationFactory( [ - [ - "200", - z.object({ - total_count: z.coerce.number(), - variables: z.array(s_actions_variable), - }), - ], + ["204", z.undefined()], + ["404", z.undefined()], ], undefined, ) router.get( - "actionsListEnvironmentVariables", - "/repositories/:repository_id/environments/:environment_name/variables", + "reposCheckVulnerabilityAlerts", + "/repos/:owner/:repo/vulnerability-alerts", async (ctx, next) => { const input = { params: parseRequestInput( - actionsListEnvironmentVariablesParamSchema, + reposCheckVulnerabilityAlertsParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - actionsListEnvironmentVariablesQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: undefined, } const responder = { - with200() { - return new KoaRuntimeResponse<{ - total_count: number - variables: t_actions_variable[] - }>(200) + with204() { + return new KoaRuntimeResponse(204) + }, + with404() { + return new KoaRuntimeResponse(404) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65935,7 +68853,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsListEnvironmentVariables(input, responder, ctx) + .reposCheckVulnerabilityAlerts(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65943,46 +68861,37 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsListEnvironmentVariablesResponseValidator(status, body) + ctx.body = reposCheckVulnerabilityAlertsResponseValidator(status, body) ctx.status = status return next() }, ) - const actionsCreateEnvironmentVariableParamSchema = z.object({ - repository_id: z.coerce.number(), - environment_name: z.string(), - }) - - const actionsCreateEnvironmentVariableBodySchema = z.object({ - name: z.string(), - value: z.string(), + const reposEnableVulnerabilityAlertsParamSchema = z.object({ + owner: z.string(), + repo: z.string(), }) - const actionsCreateEnvironmentVariableResponseValidator = - responseValidationFactory([["201", s_empty_object]], undefined) + const reposEnableVulnerabilityAlertsResponseValidator = + responseValidationFactory([["204", z.undefined()]], undefined) - router.post( - "actionsCreateEnvironmentVariable", - "/repositories/:repository_id/environments/:environment_name/variables", + router.put( + "reposEnableVulnerabilityAlerts", + "/repos/:owner/:repo/vulnerability-alerts", async (ctx, next) => { const input = { params: parseRequestInput( - actionsCreateEnvironmentVariableParamSchema, + reposEnableVulnerabilityAlertsParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - actionsCreateEnvironmentVariableBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with201() { - return new KoaRuntimeResponse(201) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -65990,7 +68899,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsCreateEnvironmentVariable(input, responder, ctx) + .reposEnableVulnerabilityAlerts(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -65998,28 +68907,27 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsCreateEnvironmentVariableResponseValidator(status, body) + ctx.body = reposEnableVulnerabilityAlertsResponseValidator(status, body) ctx.status = status return next() }, ) - const actionsGetEnvironmentVariableParamSchema = z.object({ - repository_id: z.coerce.number(), - environment_name: z.string(), - name: z.string(), + const reposDisableVulnerabilityAlertsParamSchema = z.object({ + owner: z.string(), + repo: z.string(), }) - const actionsGetEnvironmentVariableResponseValidator = - responseValidationFactory([["200", s_actions_variable]], undefined) + const reposDisableVulnerabilityAlertsResponseValidator = + responseValidationFactory([["204", z.undefined()]], undefined) - router.get( - "actionsGetEnvironmentVariable", - "/repositories/:repository_id/environments/:environment_name/variables/:name", + router.delete( + "reposDisableVulnerabilityAlerts", + "/repos/:owner/:repo/vulnerability-alerts", async (ctx, next) => { const input = { params: parseRequestInput( - actionsGetEnvironmentVariableParamSchema, + reposDisableVulnerabilityAlertsParamSchema, ctx.params, RequestInputType.RouteParam, ), @@ -66028,8 +68936,8 @@ export function createRouter(implementation: Implementation): KoaRouter { } const responder = { - with200() { - return new KoaRuntimeResponse(200) + with204() { + return new KoaRuntimeResponse(204) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -66037,7 +68945,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsGetEnvironmentVariable(input, responder, ctx) + .reposDisableVulnerabilityAlerts(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -66045,47 +68953,38 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsGetEnvironmentVariableResponseValidator(status, body) + ctx.body = reposDisableVulnerabilityAlertsResponseValidator(status, body) ctx.status = status return next() }, ) - const actionsUpdateEnvironmentVariableParamSchema = z.object({ - repository_id: z.coerce.number(), - name: z.string(), - environment_name: z.string(), - }) - - const actionsUpdateEnvironmentVariableBodySchema = z.object({ - name: z.string().optional(), - value: z.string().optional(), + const reposDownloadZipballArchiveParamSchema = z.object({ + owner: z.string(), + repo: z.string(), + ref: z.string(), }) - const actionsUpdateEnvironmentVariableResponseValidator = - responseValidationFactory([["204", z.undefined()]], undefined) + const reposDownloadZipballArchiveResponseValidator = + responseValidationFactory([["302", z.undefined()]], undefined) - router.patch( - "actionsUpdateEnvironmentVariable", - "/repositories/:repository_id/environments/:environment_name/variables/:name", + router.get( + "reposDownloadZipballArchive", + "/repos/:owner/:repo/zipball/:ref", async (ctx, next) => { const input = { params: parseRequestInput( - actionsUpdateEnvironmentVariableParamSchema, + reposDownloadZipballArchiveParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: parseRequestInput( - actionsUpdateEnvironmentVariableBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), + body: undefined, } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with302() { + return new KoaRuntimeResponse(302) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -66093,7 +68992,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsUpdateEnvironmentVariable(input, responder, ctx) + .reposDownloadZipballArchive(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -66101,38 +69000,51 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsUpdateEnvironmentVariableResponseValidator(status, body) + ctx.body = reposDownloadZipballArchiveResponseValidator(status, body) ctx.status = status return next() }, ) - const actionsDeleteEnvironmentVariableParamSchema = z.object({ - repository_id: z.coerce.number(), + const reposCreateUsingTemplateParamSchema = z.object({ + template_owner: z.string(), + template_repo: z.string(), + }) + + const reposCreateUsingTemplateBodySchema = z.object({ + owner: z.string().optional(), name: z.string(), - environment_name: z.string(), + description: z.string().optional(), + include_all_branches: z.coerce.boolean().optional(), + private: z.coerce.boolean().optional(), }) - const actionsDeleteEnvironmentVariableResponseValidator = - responseValidationFactory([["204", z.undefined()]], undefined) + const reposCreateUsingTemplateResponseValidator = responseValidationFactory( + [["201", s_full_repository]], + undefined, + ) - router.delete( - "actionsDeleteEnvironmentVariable", - "/repositories/:repository_id/environments/:environment_name/variables/:name", + router.post( + "reposCreateUsingTemplate", + "/repos/:template_owner/:template_repo/generate", async (ctx, next) => { const input = { params: parseRequestInput( - actionsDeleteEnvironmentVariableParamSchema, + reposCreateUsingTemplateParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, - body: undefined, + body: parseRequestInput( + reposCreateUsingTemplateBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), } const responder = { - with204() { - return new KoaRuntimeResponse(204) + with201() { + return new KoaRuntimeResponse(201) }, withStatus(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -66140,7 +69052,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .actionsDeleteEnvironmentVariable(input, responder, ctx) + .reposCreateUsingTemplate(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -66148,12 +69060,65 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = actionsDeleteEnvironmentVariableResponseValidator(status, body) + ctx.body = reposCreateUsingTemplateResponseValidator(status, body) ctx.status = status return next() }, ) + const reposListPublicQuerySchema = z.object({ + since: z.coerce.number().optional(), + }) + + const reposListPublicResponseValidator = responseValidationFactory( + [ + ["200", z.array(s_minimal_repository)], + ["304", z.undefined()], + ["422", s_validation_error], + ], + undefined, + ) + + router.get("reposListPublic", "/repositories", async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + reposListPublicQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: undefined, + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + with304() { + return new KoaRuntimeResponse(304) + }, + with422() { + return new KoaRuntimeResponse(422) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .reposListPublic(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = reposListPublicResponseValidator(status, body) + ctx.status = status + return next() + }) + const searchCodeQuerySchema = z.object({ q: z.string(), sort: z.enum(["indexed"]).optional(), @@ -74067,7 +77032,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const reposCreateForAuthenticatedUserResponseValidator = responseValidationFactory( [ - ["201", s_repository], + ["201", s_full_repository], ["304", z.undefined()], ["400", s_scim_error], ["401", s_basic_error], @@ -74094,7 +77059,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with201() { - return new KoaRuntimeResponse(201) + return new KoaRuntimeResponse(201) }, with304() { return new KoaRuntimeResponse(304) diff --git a/integration-tests/typescript-koa/src/generated/api.github.com.yaml/models.ts b/integration-tests/typescript-koa/src/generated/api.github.com.yaml/models.ts index dd9cb07b..0c17163d 100644 --- a/integration-tests/typescript-koa/src/generated/api.github.com.yaml/models.ts +++ b/integration-tests/typescript-koa/src/generated/api.github.com.yaml/models.ts @@ -172,6 +172,7 @@ export type t_api_overview = { api?: string[] dependabot?: string[] domains?: { + actions?: string[] codespaces?: string[] copilot?: string[] packages?: string[] @@ -198,15 +199,26 @@ export type t_app_permissions = { actions?: "read" | "write" administration?: "read" | "write" checks?: "read" | "write" + codespaces?: "read" | "write" contents?: "read" | "write" + dependabot_secrets?: "read" | "write" deployments?: "read" | "write" + email_addresses?: "read" | "write" environments?: "read" | "write" + followers?: "read" | "write" + git_ssh_keys?: "read" | "write" + gpg_keys?: "read" | "write" + interaction_limits?: "read" | "write" issues?: "read" | "write" members?: "read" | "write" metadata?: "read" | "write" organization_administration?: "read" | "write" organization_announcement_banners?: "read" | "write" + organization_copilot_seat_management?: "write" + organization_custom_org_roles?: "read" | "write" + organization_custom_properties?: "read" | "write" | "admin" organization_custom_roles?: "read" | "write" + organization_events?: "read" organization_hooks?: "read" | "write" organization_packages?: "read" | "write" organization_personal_access_token_requests?: "read" | "write" @@ -218,13 +230,16 @@ export type t_app_permissions = { organization_user_blocking?: "read" | "write" packages?: "read" | "write" pages?: "read" | "write" + profile?: "write" pull_requests?: "read" | "write" + repository_custom_properties?: "read" | "write" repository_hooks?: "read" | "write" repository_projects?: "read" | "write" | "admin" secret_scanning_alerts?: "read" | "write" secrets?: "read" | "write" security_events?: "read" | "write" single_file?: "read" | "write" + starring?: "read" | "write" statuses?: "read" | "write" team_discussions?: "read" | "write" vulnerability_alerts?: "read" | "write" @@ -564,7 +579,13 @@ export type t_check_run = { } pull_requests: t_pull_request_minimal[] started_at: string | null - status: "queued" | "in_progress" | "completed" + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" url: string } @@ -595,7 +616,14 @@ export type t_check_suite = { repository: t_minimal_repository rerequestable?: boolean runs_rerequestable?: boolean - status: "queued" | "in_progress" | "completed" | null + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" + | null updated_at: string | null url: string | null } @@ -780,6 +808,7 @@ export type t_code_scanning_alert_rule_summary = { description?: string id?: string | null name?: string + security_severity_level?: "low" | "medium" | "high" | "critical" | null severity?: "none" | "note" | "warning" | "error" | null tags?: string[] | null } @@ -855,6 +884,7 @@ export type t_code_scanning_analysis_tool_version = string | null export type t_code_scanning_analysis_url = string export type t_code_scanning_codeql_database = { + commit_oid?: string | null content_type: string created_at: string id: number @@ -902,7 +932,7 @@ export type t_code_scanning_organization_alert_items = { most_recent_instance: t_code_scanning_alert_instance number: t_alert_number repository: t_simple_repository - rule: t_code_scanning_alert_rule + rule: t_code_scanning_alert_rule_summary state: t_code_scanning_alert_state tool: t_code_scanning_analysis_tool updated_at?: t_alert_updated_at @@ -911,6 +941,8 @@ export type t_code_scanning_organization_alert_items = { export type t_code_scanning_ref = string +export type t_code_scanning_ref_full = string + export type t_code_scanning_sarifs_receipt = { id?: t_code_scanning_analysis_sarif_id readonly url?: string @@ -1097,6 +1129,10 @@ export type t_codespaces_org_secret = { visibility: "all" | "private" | "selected" } +export type t_codespaces_permissions_check_for_devcontainer = { + accepted: boolean +} + export type t_codespaces_public_key = { created_at?: string id?: number @@ -1427,6 +1463,9 @@ export type t_converted_note_to_issue_issue_event = { } export type t_copilot_organization_details = { + cli?: "enabled" | "disabled" | "unconfigured" + ide_chat?: "enabled" | "disabled" | "unconfigured" + platform_chat?: "enabled" | "disabled" | "unconfigured" public_code_suggestions: "allow" | "block" | "unconfigured" | "unknown" seat_breakdown: t_copilot_seat_breakdown seat_management_setting: @@ -1447,9 +1486,7 @@ export type t_copilot_seat_breakdown = { } export type t_copilot_seat_details = { - assignee: { - [key: string]: unknown | undefined - } + assignee: t_simple_user | t_team | t_organization assigning_team?: t_team | null created_at: string last_activity_at?: string | null @@ -1465,6 +1502,11 @@ export type t_custom_deployment_rule_app = { slug: string } +export type t_custom_property_value = { + property_name: string + value: string | string[] | null +} + export type t_demilestoned_issue_event = { actor: t_simple_user commit_id: string | null @@ -1686,6 +1728,7 @@ export type t_deployment_branch_policy = { id?: number name?: string node_id?: string + type?: "branch" | "tag" } export type t_deployment_branch_policy_settings = { @@ -1806,6 +1849,7 @@ export type t_environment = { | { id: number node_id: string + prevent_self_review?: boolean reviewers?: { reviewer?: t_simple_user | t_team type?: t_deployment_reviewer_type @@ -1962,6 +2006,9 @@ export type t_full_repository = { contents_url: string contributors_url: string created_at: string + custom_properties?: { + [key: string]: unknown | undefined + } default_branch: string delete_branch_on_merge?: boolean deployments_url: string @@ -1979,7 +2026,7 @@ export type t_full_repository = { git_tags_url: string git_url: string has_discussions: boolean - has_downloads: boolean + has_downloads?: boolean has_issues: boolean has_pages: boolean has_projects: boolean @@ -2336,18 +2383,7 @@ export type t_gpg_key = { export type t_hook = { active: boolean - config: { - content_type?: t_webhook_config_content_type - digest?: string - email?: string - insecure_ssl?: t_webhook_config_insecure_ssl - password?: string - room?: string - secret?: t_webhook_config_secret - subdomain?: string - token?: string - url?: t_webhook_config_url - } + config: t_webhook_config created_at: string deliveries_url?: string events: string[] @@ -2773,7 +2809,13 @@ export type t_job = { runner_id: number | null runner_name: string | null started_at: string - status: "queued" | "in_progress" | "completed" + status: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" steps?: { completed_at?: string | null conclusion: string | null @@ -3495,12 +3537,10 @@ export type t_nullable_repository = { milestones_url: string mirror_url: string | null name: string - network_count?: number node_id: string notifications_url: string open_issues: number open_issues_count: number - organization?: t_nullable_simple_user owner: t_simple_user permissions?: { admin: boolean @@ -3521,127 +3561,12 @@ export type t_nullable_repository = { stargazers_url: string starred_at?: string statuses_url: string - subscribers_count?: number subscribers_url: string subscription_url: string svn_url: string tags_url: string teams_url: string temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK" - merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" - squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - use_squash_pr_title_as_default?: boolean - visibility?: string - watchers_count?: number - } | null topics?: string[] trees_url: string updated_at: string | null @@ -3727,6 +3652,16 @@ export type t_oidc_custom_sub_repo = { use_default: boolean } +export type t_org_custom_property = { + allowed_values?: string[] | null + default_value?: string | string[] | null + description?: string | null + property_name: string + required?: boolean + value_type: "string" | "single_select" + values_editable_by?: "org_actors" | "org_and_repo_actors" | null +} + export type t_org_hook = { active: boolean config: { @@ -3758,11 +3693,58 @@ export type t_org_membership = { user: t_nullable_simple_user } +export type t_org_repo_custom_property_values = { + properties: t_custom_property_value[] + repository_full_name: string + repository_id: number + repository_name: string +} + export type t_org_ruleset_conditions = | (t_repository_ruleset_conditions & t_repository_ruleset_conditions_repository_name_target) | (t_repository_ruleset_conditions & t_repository_ruleset_conditions_repository_id_target) + | (t_repository_ruleset_conditions & + t_repository_ruleset_conditions_repository_property_target) + +export type t_organization = { + avatar_url: string + blog?: string + company?: string + created_at: string + description: string | null + email?: string + events_url: string + followers: number + following: number + has_organization_projects: boolean + has_repository_projects: boolean + hooks_url: string + html_url: string + id: number + is_verified?: boolean + issues_url: string + location?: string + login: string + members_url: string + name?: string + node_id: string + plan?: { + filled_seats?: number + name?: string + private_repos?: number + seats?: number + space?: number + } + public_gists: number + public_members_url: string + public_repos: number + repos_url: string + type: string + updated_at: string + url: string +} export type t_organization_actions_secret = { created_at: string @@ -3789,6 +3771,11 @@ export type t_organization_dependabot_secret = { visibility: "all" | "private" | "selected" } +export type t_organization_fine_grained_permission = { + description: string + name: string +} + export type t_organization_full = { advanced_security_enabled_for_new_repositories?: boolean archived_at: string | null @@ -3915,6 +3902,16 @@ export type t_organization_programmatic_access_grant_request = { token_last_used_at: string | null } +export type t_organization_role = { + created_at: string + description?: string | null + id: number + name: string + organization: t_nullable_simple_user + permissions: string[] + updated_at: string +} + export type t_organization_secret_scanning_alert = { created_at?: t_alert_created_at html_url?: t_alert_html_url @@ -3934,6 +3931,7 @@ export type t_organization_secret_scanning_alert = { state?: t_secret_scanning_alert_state updated_at?: t_nullable_alert_updated_at url?: t_alert_url + validity?: "active" | "inactive" | "unknown" } export type t_organization_simple = { @@ -4033,11 +4031,27 @@ export type t_page_build_status = { } export type t_page_deployment = { + id: number | string page_url: string preview_url?: string status_url: string } +export type t_pages_deployment_status = { + status?: + | "deployment_in_progress" + | "syncing_files" + | "finished_file_sync" + | "updating_pages" + | "purging_cdn" + | "deployment_cancelled" + | "deployment_failed" + | "deployment_content_failed" + | "deployment_attempt_error" + | "deployment_lost" + | "succeed" +} + export type t_pages_health_check = { alt_domain?: { caa_error?: string | null @@ -4164,6 +4178,8 @@ export type t_porter_large_file = { size: number } +export type t_prevent_self_review = boolean + export type t_private_user = { avatar_url: string bio: string | null @@ -5232,12 +5248,10 @@ export type t_repository = { milestones_url: string mirror_url: string | null name: string - network_count?: number node_id: string notifications_url: string open_issues: number open_issues_count: number - organization?: t_nullable_simple_user owner: t_simple_user permissions?: { admin: boolean @@ -5258,127 +5272,12 @@ export type t_repository = { stargazers_url: string starred_at?: string statuses_url: string - subscribers_count?: number subscribers_url: string subscription_url: string svn_url: string tags_url: string teams_url: string temp_clone_token?: string - template_repository?: { - allow_auto_merge?: boolean - allow_merge_commit?: boolean - allow_rebase_merge?: boolean - allow_squash_merge?: boolean - allow_update_branch?: boolean - archive_url?: string - archived?: boolean - assignees_url?: string - blobs_url?: string - branches_url?: string - clone_url?: string - collaborators_url?: string - comments_url?: string - commits_url?: string - compare_url?: string - contents_url?: string - contributors_url?: string - created_at?: string - default_branch?: string - delete_branch_on_merge?: boolean - deployments_url?: string - description?: string - disabled?: boolean - downloads_url?: string - events_url?: string - fork?: boolean - forks_count?: number - forks_url?: string - full_name?: string - git_commits_url?: string - git_refs_url?: string - git_tags_url?: string - git_url?: string - has_downloads?: boolean - has_issues?: boolean - has_pages?: boolean - has_projects?: boolean - has_wiki?: boolean - homepage?: string - hooks_url?: string - html_url?: string - id?: number - is_template?: boolean - issue_comment_url?: string - issue_events_url?: string - issues_url?: string - keys_url?: string - labels_url?: string - language?: string - languages_url?: string - merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK" - merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" - merges_url?: string - milestones_url?: string - mirror_url?: string - name?: string - network_count?: number - node_id?: string - notifications_url?: string - open_issues_count?: number - owner?: { - avatar_url?: string - events_url?: string - followers_url?: string - following_url?: string - gists_url?: string - gravatar_id?: string - html_url?: string - id?: number - login?: string - node_id?: string - organizations_url?: string - received_events_url?: string - repos_url?: string - site_admin?: boolean - starred_url?: string - subscriptions_url?: string - type?: string - url?: string - } - permissions?: { - admin?: boolean - maintain?: boolean - pull?: boolean - push?: boolean - triage?: boolean - } - private?: boolean - pulls_url?: string - pushed_at?: string - releases_url?: string - size?: number - squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" - squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" - ssh_url?: string - stargazers_count?: number - stargazers_url?: string - statuses_url?: string - subscribers_count?: number - subscribers_url?: string - subscription_url?: string - svn_url?: string - tags_url?: string - teams_url?: string - temp_clone_token?: string - topics?: string[] - trees_url?: string - updated_at?: string - url?: string - use_squash_pr_title_as_default?: boolean - visibility?: string - watchers_count?: number - } | null topics?: string[] trees_url: string updated_at: string | null @@ -5432,7 +5331,7 @@ export type t_repository_advisory = { } | null summary: string readonly updated_at: string | null - url: string + readonly url: string vulnerabilities: t_repository_advisory_vulnerability[] | null readonly withdrawn_at: string | null } @@ -5487,6 +5386,7 @@ export type t_repository_rule = | t_repository_rule_committer_email_pattern | t_repository_rule_branch_name_pattern | t_repository_rule_tag_name_pattern + | t_repository_rule_workflows export type t_repository_rule_branch_name_pattern = { parameters?: { @@ -5552,6 +5452,7 @@ export type t_repository_rule_detailed = | (t_repository_rule_committer_email_pattern & t_repository_rule_ruleset_info) | (t_repository_rule_branch_name_pattern & t_repository_rule_ruleset_info) | (t_repository_rule_tag_name_pattern & t_repository_rule_ruleset_info) + | (t_repository_rule_workflows & t_repository_rule_ruleset_info) export type t_repository_rule_enforcement = "disabled" | "active" | "evaluate" @@ -5564,6 +5465,13 @@ export type t_repository_rule_params_status_check_configuration = { integration_id?: number } +export type t_repository_rule_params_workflow_file_reference = { + path: string + ref?: string + repository_id: number + sha?: string +} + export type t_repository_rule_pull_request = { parameters?: { dismiss_stale_reviews_on_push: boolean @@ -5621,6 +5529,13 @@ export type t_repository_rule_update = { type: "update" } +export type t_repository_rule_workflows = { + parameters?: { + workflows: t_repository_rule_params_workflow_file_reference[] + } + type: "workflows" +} + export type t_repository_ruleset = { _links?: { html?: { @@ -5631,7 +5546,7 @@ export type t_repository_ruleset = { } } bypass_actors?: t_repository_ruleset_bypass_actor[] - conditions?: t_repository_ruleset_conditions | t_org_ruleset_conditions + conditions?: t_repository_ruleset_conditions | t_org_ruleset_conditions | null created_at?: string current_user_can_bypass?: "always" | "pull_requests_only" | "never" enforcement: t_repository_rule_enforcement @@ -5672,6 +5587,18 @@ export type t_repository_ruleset_conditions_repository_name_target = { } } +export type t_repository_ruleset_conditions_repository_property_spec = { + name: string + property_values: string[] +} + +export type t_repository_ruleset_conditions_repository_property_target = { + repository_property: { + exclude?: t_repository_ruleset_conditions_repository_property_spec[] + include?: t_repository_ruleset_conditions_repository_property_spec[] + } +} + export type t_repository_subscription = { created_at: string ignored: boolean @@ -5789,7 +5716,7 @@ export type t_root = { followers_url: string following_url: string gists_url: string - hub_url: string + hub_url?: string issue_search_url: string issues_url: string keys_url: string @@ -5811,6 +5738,45 @@ export type t_root = { user_url: string } +export type t_rule_suite = { + actor_id?: number | null + actor_name?: string | null + after_sha?: string + before_sha?: string + evaluation_result?: "pass" | "fail" + id?: number + pushed_at?: string + ref?: string + repository_id?: number + repository_name?: string + result?: "pass" | "fail" | "bypass" + rule_evaluations?: { + details?: string + enforcement?: "active" | "evaluate" | "deleted ruleset" + result?: "pass" | "fail" + rule_source?: { + id?: number | null + name?: string | null + type?: string + } + rule_type?: string + }[] +} + +export type t_rule_suites = { + actor_id?: number + actor_name?: string + after_sha?: string + before_sha?: string + evaluation_result?: "pass" | "fail" + id?: number + pushed_at?: string + ref?: string + repository_id?: number + repository_name?: string + result?: "pass" | "fail" | "bypass" +}[] + export type t_runner = { busy: boolean id: number @@ -5874,6 +5840,7 @@ export type t_secret_scanning_alert = { state?: t_secret_scanning_alert_state updated_at?: t_nullable_alert_updated_at url?: t_alert_url + validity?: "active" | "inactive" | "unknown" } export type t_secret_scanning_alert_resolution = @@ -5888,12 +5855,34 @@ export type t_secret_scanning_alert_resolution_comment = string | null export type t_secret_scanning_alert_state = "open" | "resolved" export type t_secret_scanning_location = { - details: + details?: | t_secret_scanning_location_commit + | t_secret_scanning_location_wiki_commit | t_secret_scanning_location_issue_title | t_secret_scanning_location_issue_body | t_secret_scanning_location_issue_comment - type: "commit" | "issue_title" | "issue_body" | "issue_comment" + | t_secret_scanning_location_discussion_title + | t_secret_scanning_location_discussion_body + | t_secret_scanning_location_discussion_comment + | t_secret_scanning_location_pull_request_title + | t_secret_scanning_location_pull_request_body + | t_secret_scanning_location_pull_request_comment + | t_secret_scanning_location_pull_request_review + | t_secret_scanning_location_pull_request_review_comment + type?: + | "commit" + | "wiki_commit" + | "issue_title" + | "issue_body" + | "issue_comment" + | "discussion_title" + | "discussion_body" + | "discussion_comment" + | "pull_request_title" + | "pull_request_body" + | "pull_request_comment" + | "pull_request_review" + | "pull_request_review_comment" } export type t_secret_scanning_location_commit = { @@ -5908,6 +5897,18 @@ export type t_secret_scanning_location_commit = { start_line: number } +export type t_secret_scanning_location_discussion_body = { + discussion_body_url: string +} + +export type t_secret_scanning_location_discussion_comment = { + discussion_comment_url: string +} + +export type t_secret_scanning_location_discussion_title = { + discussion_title_url: string +} + export type t_secret_scanning_location_issue_body = { issue_body_url: string } @@ -5920,6 +5921,38 @@ export type t_secret_scanning_location_issue_title = { issue_title_url: string } +export type t_secret_scanning_location_pull_request_body = { + pull_request_body_url: string +} + +export type t_secret_scanning_location_pull_request_comment = { + pull_request_comment_url: string +} + +export type t_secret_scanning_location_pull_request_review = { + pull_request_review_url: string +} + +export type t_secret_scanning_location_pull_request_review_comment = { + pull_request_review_comment_url: string +} + +export type t_secret_scanning_location_pull_request_title = { + pull_request_title_url: string +} + +export type t_secret_scanning_location_wiki_commit = { + blob_sha: string + commit_sha: string + commit_url: string + end_column: number + end_line: number + page_url: string + path: string + start_column: number + start_line: number +} + export type t_security_advisory_credit_types = | "analyst" | "finder" @@ -6477,7 +6510,6 @@ export type t_team_repository = { tags_url: string teams_url: string temp_clone_token?: string - template_repository?: t_nullable_repository topics?: string[] trees_url: string updated_at: string | null @@ -7008,7 +7040,8 @@ export type t_ActionsCreateEnvironmentVariableBodySchema = { export type t_ActionsCreateEnvironmentVariableParamSchema = { environment_name: string - repository_id: number + owner: string + repo: string } export type t_ActionsCreateOrUpdateEnvironmentSecretBodySchema = { @@ -7018,7 +7051,8 @@ export type t_ActionsCreateOrUpdateEnvironmentSecretBodySchema = { export type t_ActionsCreateOrUpdateEnvironmentSecretParamSchema = { environment_name: string - repository_id: number + owner: string + repo: string secret_name: string } @@ -7121,14 +7155,16 @@ export type t_ActionsDeleteArtifactParamSchema = { export type t_ActionsDeleteEnvironmentSecretParamSchema = { environment_name: string - repository_id: number + owner: string + repo: string secret_name: string } export type t_ActionsDeleteEnvironmentVariableParamSchema = { environment_name: string name: string - repository_id: number + owner: string + repo: string } export type t_ActionsDeleteOrgSecretParamSchema = { @@ -7226,6 +7262,12 @@ export type t_ActionsEnableWorkflowParamSchema = { workflow_id: number | string } +export type t_ActionsForceCancelWorkflowRunParamSchema = { + owner: string + repo: string + run_id: number +} + export type t_ActionsGenerateRunnerJitconfigForOrgBodySchema = { labels: string[] name: string @@ -7303,19 +7345,22 @@ export type t_ActionsGetCustomOidcSubClaimForRepoParamSchema = { export type t_ActionsGetEnvironmentPublicKeyParamSchema = { environment_name: string - repository_id: number + owner: string + repo: string } export type t_ActionsGetEnvironmentSecretParamSchema = { environment_name: string - repository_id: number + owner: string + repo: string secret_name: string } export type t_ActionsGetEnvironmentVariableParamSchema = { environment_name: string name: string - repository_id: number + owner: string + repo: string } export type t_ActionsGetGithubActionsDefaultWorkflowPermissionsOrganizationParamSchema = @@ -7455,7 +7500,8 @@ export type t_ActionsListArtifactsForRepoQuerySchema = { export type t_ActionsListEnvironmentSecretsParamSchema = { environment_name: string - repository_id: number + owner: string + repo: string } export type t_ActionsListEnvironmentSecretsQuerySchema = { @@ -7465,7 +7511,8 @@ export type t_ActionsListEnvironmentSecretsQuerySchema = { export type t_ActionsListEnvironmentVariablesParamSchema = { environment_name: string - repository_id: number + owner: string + repo: string } export type t_ActionsListEnvironmentVariablesQuerySchema = { @@ -7941,7 +7988,8 @@ export type t_ActionsUpdateEnvironmentVariableBodySchema = { export type t_ActionsUpdateEnvironmentVariableParamSchema = { environment_name: string name: string - repository_id: number + owner: string + repo: string } export type t_ActionsUpdateOrgVariableBodySchema = { @@ -8163,6 +8211,10 @@ export type t_ActivityMarkRepoNotificationsAsReadParamSchema = { repo: string } +export type t_ActivityMarkThreadAsDoneParamSchema = { + thread_id: number +} + export type t_ActivityMarkThreadAsReadParamSchema = { thread_id: number } @@ -8577,7 +8629,13 @@ export type t_ChecksUpdateBodySchema = { title?: string } started_at?: string - status?: "queued" | "in_progress" | "completed" + status?: + | "queued" + | "in_progress" + | "completed" + | "waiting" + | "requested" + | "pending" } export type t_ChecksUpdateParamSchema = { @@ -8751,7 +8809,7 @@ export type t_CodeScanningUpdateDefaultSetupBodySchema = { | "swift" )[] query_suite?: "default" | "extended" - state: "configured" | "not-configured" + state?: "configured" | "not-configured" } export type t_CodeScanningUpdateDefaultSetupParamSchema = { @@ -8762,7 +8820,7 @@ export type t_CodeScanningUpdateDefaultSetupParamSchema = { export type t_CodeScanningUploadSarifBodySchema = { checkout_uri?: string commit_sha: t_code_scanning_analysis_commit_sha - ref: t_code_scanning_ref + ref: t_code_scanning_ref_full sarif: t_code_scanning_analysis_sarif_file started_at?: string tool_name?: string @@ -8790,6 +8848,16 @@ export type t_CodespacesAddSelectedRepoToOrgSecretParamSchema = { secret_name: string } +export type t_CodespacesCheckPermissionsForDevcontainerParamSchema = { + owner: string + repo: string +} + +export type t_CodespacesCheckPermissionsForDevcontainerQuerySchema = { + devcontainer_path: string + ref: string +} + export type t_CodespacesCodespaceMachinesForAuthenticatedUserParamSchema = { codespace_name: string } @@ -9155,19 +9223,19 @@ export type t_CodespacesUpdateForAuthenticatedUserParamSchema = { codespace_name: string } -export type t_CopilotAddCopilotForBusinessSeatsForTeamsBodySchema = { +export type t_CopilotAddCopilotSeatsForTeamsBodySchema = { selected_teams: string[] } -export type t_CopilotAddCopilotForBusinessSeatsForTeamsParamSchema = { +export type t_CopilotAddCopilotSeatsForTeamsParamSchema = { org: string } -export type t_CopilotAddCopilotForBusinessSeatsForUsersBodySchema = { +export type t_CopilotAddCopilotSeatsForUsersBodySchema = { selected_usernames: string[] } -export type t_CopilotAddCopilotForBusinessSeatsForUsersParamSchema = { +export type t_CopilotAddCopilotSeatsForUsersParamSchema = { org: string } @@ -9191,7 +9259,7 @@ export type t_CopilotGetCopilotOrganizationDetailsParamSchema = { org: string } -export type t_CopilotGetCopilotSeatAssignmentDetailsForUserParamSchema = { +export type t_CopilotGetCopilotSeatDetailsForUserParamSchema = { org: string username: string } @@ -10204,6 +10272,10 @@ export type t_LicensesGetForRepoParamSchema = { repo: string } +export type t_LicensesGetForRepoQuerySchema = { + ref?: t_code_scanning_ref +} + export type t_MarkdownRenderBodySchema = { context?: string mode?: "markdown" | "gfm" @@ -10410,6 +10482,18 @@ export type t_OrgsAddSecurityManagerTeamParamSchema = { team_slug: string } +export type t_OrgsAssignTeamToOrgRoleParamSchema = { + org: string + role_id: number + team_slug: string +} + +export type t_OrgsAssignUserToOrgRoleParamSchema = { + org: string + role_id: number + username: string +} + export type t_OrgsBlockUserParamSchema = { org: string username: string @@ -10444,10 +10528,20 @@ export type t_OrgsConvertMemberToOutsideCollaboratorParamSchema = { username: string } +export type t_OrgsCreateCustomOrganizationRoleBodySchema = { + description?: string + name: string + permissions: string[] +} + +export type t_OrgsCreateCustomOrganizationRoleParamSchema = { + org: string +} + export type t_OrgsCreateInvitationBodySchema = { email?: string invitee_id?: number - role?: "admin" | "direct_member" | "billing_manager" + role?: "admin" | "direct_member" | "billing_manager" | "reinstate" team_ids?: number[] } @@ -10455,6 +10549,36 @@ export type t_OrgsCreateInvitationParamSchema = { org: string } +export type t_OrgsCreateOrUpdateCustomPropertiesBodySchema = { + properties: t_org_custom_property[] +} + +export type t_OrgsCreateOrUpdateCustomPropertiesParamSchema = { + org: string +} + +export type t_OrgsCreateOrUpdateCustomPropertiesValuesForReposBodySchema = { + properties: t_custom_property_value[] + repository_names: string[] +} + +export type t_OrgsCreateOrUpdateCustomPropertiesValuesForReposParamSchema = { + org: string +} + +export type t_OrgsCreateOrUpdateCustomPropertyBodySchema = { + allowed_values?: string[] | null + default_value?: string | string[] | null + description?: string | null + required?: boolean + value_type: "string" | "single_select" +} + +export type t_OrgsCreateOrUpdateCustomPropertyParamSchema = { + custom_property_name: string + org: string +} + export type t_OrgsCreateWebhookBodySchema = { active?: boolean config: { @@ -10477,6 +10601,11 @@ export type t_OrgsDeleteParamSchema = { org: string } +export type t_OrgsDeleteCustomOrganizationRoleParamSchema = { + org: string + role_id: number +} + export type t_OrgsDeleteWebhookParamSchema = { hook_id: number org: string @@ -10503,6 +10632,15 @@ export type t_OrgsGetParamSchema = { org: string } +export type t_OrgsGetAllCustomPropertiesParamSchema = { + org: string +} + +export type t_OrgsGetCustomPropertyParamSchema = { + custom_property_name: string + org: string +} + export type t_OrgsGetMembershipForAuthenticatedUserParamSchema = { org: string } @@ -10512,6 +10650,11 @@ export type t_OrgsGetMembershipForUserParamSchema = { username: string } +export type t_OrgsGetOrgRoleParamSchema = { + org: string + role_id: number +} + export type t_OrgsGetWebhookParamSchema = { hook_id: number org: string @@ -10551,6 +10694,16 @@ export type t_OrgsListBlockedUsersQuerySchema = { per_page?: number } +export type t_OrgsListCustomPropertiesValuesForReposParamSchema = { + org: string +} + +export type t_OrgsListCustomPropertiesValuesForReposQuerySchema = { + page?: number + per_page?: number + repository_query?: string +} + export type t_OrgsListFailedInvitationsParamSchema = { org: string } @@ -10601,6 +10754,34 @@ export type t_OrgsListMembershipsForAuthenticatedUserQuerySchema = { state?: "active" | "pending" } +export type t_OrgsListOrgRoleTeamsParamSchema = { + org: string + role_id: number +} + +export type t_OrgsListOrgRoleTeamsQuerySchema = { + page?: number + per_page?: number +} + +export type t_OrgsListOrgRoleUsersParamSchema = { + org: string + role_id: number +} + +export type t_OrgsListOrgRoleUsersQuerySchema = { + page?: number + per_page?: number +} + +export type t_OrgsListOrgRolesParamSchema = { + org: string +} + +export type t_OrgsListOrganizationFineGrainedPermissionsParamSchema = { + org: string +} + export type t_OrgsListOutsideCollaboratorsParamSchema = { org: string } @@ -10712,6 +10893,17 @@ export type t_OrgsListWebhooksQuerySchema = { per_page?: number } +export type t_OrgsPatchCustomOrganizationRoleBodySchema = { + description?: string + name?: string + permissions?: string[] +} + +export type t_OrgsPatchCustomOrganizationRoleParamSchema = { + org: string + role_id: number +} + export type t_OrgsPingWebhookParamSchema = { hook_id: number org: string @@ -10723,6 +10915,11 @@ export type t_OrgsRedeliverWebhookDeliveryParamSchema = { org: string } +export type t_OrgsRemoveCustomPropertyParamSchema = { + custom_property_name: string + org: string +} + export type t_OrgsRemoveMemberParamSchema = { org: string username: string @@ -10768,6 +10965,28 @@ export type t_OrgsReviewPatGrantRequestsInBulkParamSchema = { org: string } +export type t_OrgsRevokeAllOrgRolesTeamParamSchema = { + org: string + team_slug: string +} + +export type t_OrgsRevokeAllOrgRolesUserParamSchema = { + org: string + username: string +} + +export type t_OrgsRevokeOrgRoleTeamParamSchema = { + org: string + role_id: number + team_slug: string +} + +export type t_OrgsRevokeOrgRoleUserParamSchema = { + org: string + role_id: number + username: string +} + export type t_OrgsSetMembershipForUserBodySchema = { role?: "admin" | "member" } @@ -12011,6 +12230,12 @@ export type t_ReposAddUserAccessRestrictionsParamSchema = { repo: string } +export type t_ReposCancelPagesDeploymentParamSchema = { + owner: string + pages_deployment_id: number | string + repo: string +} + export type t_ReposCheckAutomatedSecurityFixesParamSchema = { owner: string repo: string @@ -12022,6 +12247,11 @@ export type t_ReposCheckCollaboratorParamSchema = { username: string } +export type t_ReposCheckPrivateVulnerabilityReportingParamSchema = { + owner: string + repo: string +} + export type t_ReposCheckVulnerabilityAlertsParamSchema = { owner: string repo: string @@ -12124,6 +12354,7 @@ export type t_ReposCreateDeploymentParamSchema = { export type t_ReposCreateDeploymentBranchPolicyBodySchema = { name: string + type?: "branch" | "tag" } export type t_ReposCreateDeploymentBranchPolicyParamSchema = { @@ -12220,6 +12451,9 @@ export type t_ReposCreateInOrgBodySchema = { allow_rebase_merge?: boolean allow_squash_merge?: boolean auto_init?: boolean + custom_properties?: { + [key: string]: unknown | undefined + } delete_branch_on_merge?: boolean description?: string gitignore_template?: string @@ -12245,8 +12479,18 @@ export type t_ReposCreateInOrgParamSchema = { org: string } +export type t_ReposCreateOrUpdateCustomPropertiesValuesBodySchema = { + properties: t_custom_property_value[] +} + +export type t_ReposCreateOrUpdateCustomPropertiesValuesParamSchema = { + owner: string + repo: string +} + export type t_ReposCreateOrUpdateEnvironmentBodySchema = { deployment_branch_policy?: t_deployment_branch_policy_settings + prevent_self_review?: t_prevent_self_review reviewers?: | { id?: number @@ -12299,7 +12543,8 @@ export type t_ReposCreateOrgRulesetParamSchema = { } export type t_ReposCreatePagesDeploymentBodySchema = { - artifact_url: string + artifact_id?: number + artifact_url?: string environment?: string oidc_token: string pages_build_version: string @@ -12380,10 +12625,8 @@ export type t_ReposCreateWebhookBodySchema = { active?: boolean config?: { content_type?: t_webhook_config_content_type - digest?: string insecure_ssl?: t_webhook_config_insecure_ssl secret?: t_webhook_config_secret - token?: string url?: t_webhook_config_url } events?: string[] @@ -12768,6 +13011,11 @@ export type t_ReposGetCustomDeploymentProtectionRuleParamSchema = { repo: string } +export type t_ReposGetCustomPropertiesValuesParamSchema = { + owner: string + repo: string +} + export type t_ReposGetDeployKeyParamSchema = { key_id: number owner: string @@ -12810,6 +13058,24 @@ export type t_ReposGetLatestReleaseParamSchema = { repo: string } +export type t_ReposGetOrgRuleSuiteParamSchema = { + org: string + rule_suite_id: number +} + +export type t_ReposGetOrgRuleSuitesParamSchema = { + org: string +} + +export type t_ReposGetOrgRuleSuitesQuerySchema = { + actor_name?: string + page?: number + per_page?: number + repository_name?: number + rule_suite_result?: "pass" | "fail" | "bypass" | "all" + time_period?: "hour" | "day" | "week" | "month" +} + export type t_ReposGetOrgRulesetParamSchema = { org: string ruleset_id: number @@ -12835,6 +13101,12 @@ export type t_ReposGetPagesBuildParamSchema = { repo: string } +export type t_ReposGetPagesDeploymentParamSchema = { + owner: string + pages_deployment_id: number | string + repo: string +} + export type t_ReposGetPagesHealthCheckParamSchema = { owner: string repo: string @@ -12893,6 +13165,26 @@ export type t_ReposGetReleaseByTagParamSchema = { tag: string } +export type t_ReposGetRepoRuleSuiteParamSchema = { + owner: string + repo: string + rule_suite_id: number +} + +export type t_ReposGetRepoRuleSuitesParamSchema = { + owner: string + repo: string +} + +export type t_ReposGetRepoRuleSuitesQuerySchema = { + actor_name?: string + page?: number + per_page?: number + ref?: string + rule_suite_result?: "pass" | "fail" | "bypass" | "all" + time_period?: "hour" | "day" | "week" | "month" +} + export type t_ReposGetRepoRulesetParamSchema = { owner: string repo: string @@ -12997,10 +13289,6 @@ export type t_ReposListAutolinksParamSchema = { repo: string } -export type t_ReposListAutolinksQuerySchema = { - page?: number -} - export type t_ReposListBranchesParamSchema = { owner: string repo: string @@ -13732,14 +14020,7 @@ export type t_ReposUpdateStatusCheckProtectionParamSchema = { export type t_ReposUpdateWebhookBodySchema = { active?: boolean add_events?: string[] - config?: { - address?: string - content_type?: t_webhook_config_content_type - insecure_ssl?: t_webhook_config_insecure_ssl - room?: string - secret?: t_webhook_config_secret - url: t_webhook_config_url - } + config?: t_webhook_config events?: string[] remove_events?: string[] } @@ -13861,6 +14142,7 @@ export type t_SecretScanningListAlertsForEnterpriseQuerySchema = { secret_type?: string sort?: "created" | "updated" state?: "open" | "resolved" + validity?: string } export type t_SecretScanningListAlertsForOrgParamSchema = { @@ -13877,6 +14159,7 @@ export type t_SecretScanningListAlertsForOrgQuerySchema = { secret_type?: string sort?: "created" | "updated" state?: "open" | "resolved" + validity?: string } export type t_SecretScanningListAlertsForRepoParamSchema = { @@ -13894,6 +14177,7 @@ export type t_SecretScanningListAlertsForRepoQuerySchema = { secret_type?: string sort?: "created" | "updated" state?: "open" | "resolved" + validity?: string } export type t_SecretScanningListLocationsForAlertParamSchema = { @@ -13919,11 +14203,18 @@ export type t_SecretScanningUpdateAlertParamSchema = { repo: string } +export type t_SecurityAdvisoriesCreateForkParamSchema = { + ghsa_id: string + owner: string + repo: string +} + export type t_SecurityAdvisoriesCreatePrivateVulnerabilityReportBodySchema = { cvss_vector_string?: string | null cwe_ids?: string[] | null description: string severity?: "critical" | "high" | "medium" | "low" | null + start_private_fork?: boolean summary: string vulnerabilities?: | { @@ -13955,6 +14246,7 @@ export type t_SecurityAdvisoriesCreateRepositoryAdvisoryBodySchema = { cwe_ids?: string[] | null description: string severity?: "critical" | "high" | "medium" | "low" | null + start_private_fork?: boolean summary: string vulnerabilities: { package: { @@ -13996,19 +14288,7 @@ export type t_SecurityAdvisoriesListGlobalAdvisoriesQuerySchema = { cve_id?: string cwes?: string | string[] direction?: "asc" | "desc" - ecosystem?: - | "actions" - | "composer" - | "erlang" - | "go" - | "maven" - | "npm" - | "nuget" - | "other" - | "pip" - | "pub" - | "rubygems" - | "rust" + ecosystem?: t_security_advisory_ecosystems ghsa_id?: string is_withdrawn?: boolean modified?: string diff --git a/integration-tests/typescript-koa/src/generated/api.github.com.yaml/schemas.ts b/integration-tests/typescript-koa/src/generated/api.github.com.yaml/schemas.ts index b9ec5f55..ccadcf11 100644 --- a/integration-tests/typescript-koa/src/generated/api.github.com.yaml/schemas.ts +++ b/integration-tests/typescript-koa/src/generated/api.github.com.yaml/schemas.ts @@ -147,6 +147,7 @@ export const s_api_overview = z.object({ codespaces: z.array(z.string()).optional(), copilot: z.array(z.string()).optional(), packages: z.array(z.string()).optional(), + actions: z.array(z.string()).optional(), }) .optional(), }) @@ -155,7 +156,9 @@ export const s_app_permissions = z.object({ actions: z.enum(["read", "write"]).optional(), administration: z.enum(["read", "write"]).optional(), checks: z.enum(["read", "write"]).optional(), + codespaces: z.enum(["read", "write"]).optional(), contents: z.enum(["read", "write"]).optional(), + dependabot_secrets: z.enum(["read", "write"]).optional(), deployments: z.enum(["read", "write"]).optional(), environments: z.enum(["read", "write"]).optional(), issues: z.enum(["read", "write"]).optional(), @@ -163,6 +166,7 @@ export const s_app_permissions = z.object({ packages: z.enum(["read", "write"]).optional(), pages: z.enum(["read", "write"]).optional(), pull_requests: z.enum(["read", "write"]).optional(), + repository_custom_properties: z.enum(["read", "write"]).optional(), repository_hooks: z.enum(["read", "write"]).optional(), repository_projects: z.enum(["read", "write", "admin"]).optional(), secret_scanning_alerts: z.enum(["read", "write"]).optional(), @@ -175,7 +179,11 @@ export const s_app_permissions = z.object({ members: z.enum(["read", "write"]).optional(), organization_administration: z.enum(["read", "write"]).optional(), organization_custom_roles: z.enum(["read", "write"]).optional(), + organization_custom_org_roles: z.enum(["read", "write"]).optional(), + organization_custom_properties: z.enum(["read", "write", "admin"]).optional(), + organization_copilot_seat_management: z.enum(["write"]).optional(), organization_announcement_banners: z.enum(["read", "write"]).optional(), + organization_events: z.enum(["read"]).optional(), organization_hooks: z.enum(["read", "write"]).optional(), organization_personal_access_tokens: z.enum(["read", "write"]).optional(), organization_personal_access_token_requests: z @@ -188,6 +196,13 @@ export const s_app_permissions = z.object({ organization_self_hosted_runners: z.enum(["read", "write"]).optional(), organization_user_blocking: z.enum(["read", "write"]).optional(), team_discussions: z.enum(["read", "write"]).optional(), + email_addresses: z.enum(["read", "write"]).optional(), + followers: z.enum(["read", "write"]).optional(), + git_ssh_keys: z.enum(["read", "write"]).optional(), + gpg_keys: z.enum(["read", "write"]).optional(), + interaction_limits: z.enum(["read", "write"]).optional(), + profile: z.enum(["write"]).optional(), + starring: z.enum(["read", "write"]).optional(), }) export const s_artifact = z.object({ @@ -438,6 +453,10 @@ export const s_code_scanning_alert_rule_summary = z.object({ name: z.string().optional(), tags: z.array(z.string()).nullable().optional(), severity: z.enum(["none", "note", "warning", "error"]).nullable().optional(), + security_severity_level: z + .enum(["low", "medium", "high", "critical"]) + .nullable() + .optional(), description: z.string().optional(), }) @@ -519,7 +538,7 @@ export const s_code_scanning_default_setup = z.object({ }) export const s_code_scanning_default_setup_update = z.object({ - state: z.enum(["configured", "not-configured"]), + state: z.enum(["configured", "not-configured"]).optional(), query_suite: z.enum(["default", "extended"]).optional(), languages: z .array( @@ -544,6 +563,8 @@ export const s_code_scanning_default_setup_update_response = z.object({ export const s_code_scanning_ref = z.string() +export const s_code_scanning_ref_full = z.string() + export const s_code_scanning_sarifs_status = z.object({ processing_status: z.enum(["pending", "complete", "failed"]).optional(), analyses_url: z.string().nullable().optional(), @@ -592,6 +613,10 @@ export const s_codespaces_org_secret = z.object({ selected_repositories_url: z.string().optional(), }) +export const s_codespaces_permissions_check_for_devcontainer = z.object({ + accepted: z.coerce.boolean(), +}) + export const s_codespaces_public_key = z.object({ key_id: z.string(), key: z.string(), @@ -783,6 +808,11 @@ export const s_custom_deployment_rule_app = z.object({ node_id: z.string(), }) +export const s_custom_property_value = z.object({ + property_name: z.string(), + value: z.union([z.string(), z.array(z.string())]).nullable(), +}) + export const s_dependabot_alert_package = z.object({ ecosystem: z.string(), name: z.string(), @@ -873,12 +903,18 @@ export const s_deployment_branch_policy = z.object({ id: z.coerce.number().optional(), node_id: z.string().optional(), name: z.string().optional(), + type: z.enum(["branch", "tag"]).optional(), }) export const s_deployment_branch_policy_name_pattern = z.object({ name: z.string(), }) +export const s_deployment_branch_policy_name_pattern_with_type = z.object({ + name: z.string(), + type: z.enum(["branch", "tag"]).optional(), +}) + export const s_deployment_branch_policy_settings = z .object({ protected_branches: z.coerce.boolean(), @@ -1250,7 +1286,14 @@ export const s_job = z.object({ head_sha: z.string(), url: z.string(), html_url: z.string().nullable(), - status: z.enum(["queued", "in_progress", "completed"]), + status: z.enum([ + "queued", + "in_progress", + "completed", + "waiting", + "requested", + "pending", + ]), conclusion: z .enum([ "success", @@ -1533,6 +1576,22 @@ export const s_oidc_custom_sub_repo = z.object({ include_claim_keys: z.array(z.string()).optional(), }) +export const s_org_custom_property = z.object({ + property_name: z.string(), + value_type: z.enum(["string", "single_select"]), + required: z.coerce.boolean().optional(), + default_value: z + .union([z.string(), z.array(z.string())]) + .nullable() + .optional(), + description: z.string().nullable().optional(), + allowed_values: z.array(z.string()).nullable().optional(), + values_editable_by: z + .enum(["org_actors", "org_and_repo_actors"]) + .nullable() + .optional(), +}) + export const s_org_hook = z.object({ id: z.coerce.number(), url: z.string(), @@ -1552,6 +1611,46 @@ export const s_org_hook = z.object({ type: z.string(), }) +export const s_organization = z.object({ + login: z.string(), + url: z.string(), + id: z.coerce.number(), + node_id: z.string(), + repos_url: z.string(), + events_url: z.string(), + hooks_url: z.string(), + issues_url: z.string(), + members_url: z.string(), + public_members_url: z.string(), + avatar_url: z.string(), + description: z.string().nullable(), + blog: z.string().optional(), + html_url: z.string(), + name: z.string().optional(), + company: z.string().optional(), + location: z.string().optional(), + email: z.string().email().optional(), + has_organization_projects: z.coerce.boolean(), + has_repository_projects: z.coerce.boolean(), + is_verified: z.coerce.boolean().optional(), + public_repos: z.coerce.number(), + public_gists: z.coerce.number(), + followers: z.coerce.number(), + following: z.coerce.number(), + type: z.string(), + created_at: z.string().datetime({ offset: true }), + updated_at: z.string().datetime({ offset: true }), + plan: z + .object({ + name: z.string().optional(), + space: z.coerce.number().optional(), + private_repos: z.coerce.number().optional(), + filled_seats: z.coerce.number().optional(), + seats: z.coerce.number().optional(), + }) + .optional(), +}) + export const s_organization_actions_secret = z.object({ name: z.string(), created_at: z.string().datetime({ offset: true }), @@ -1577,6 +1676,11 @@ export const s_organization_dependabot_secret = z.object({ selected_repositories_url: z.string().optional(), }) +export const s_organization_fine_grained_permission = z.object({ + name: z.string(), + description: z.string(), +}) + export const s_organization_full = z.object({ login: z.string(), id: z.coerce.number(), @@ -1708,11 +1812,30 @@ export const s_page_build_status = z.object({ }) export const s_page_deployment = z.object({ + id: z.union([z.coerce.number(), z.string()]), status_url: z.string(), page_url: z.string(), preview_url: z.string().optional(), }) +export const s_pages_deployment_status = z.object({ + status: z + .enum([ + "deployment_in_progress", + "syncing_files", + "finished_file_sync", + "updating_pages", + "purging_cdn", + "deployment_cancelled", + "deployment_failed", + "deployment_content_failed", + "deployment_attempt_error", + "deployment_lost", + "succeed", + ]) + .optional(), +}) + export const s_pages_health_check = z.object({ domain: z .object({ @@ -1834,6 +1957,8 @@ export const s_porter_large_file = z.object({ size: z.coerce.number(), }) +export const s_prevent_self_review = z.coerce.boolean() + export const s_private_user = z.object({ login: z.string(), id: z.coerce.number(), @@ -2106,6 +2231,13 @@ export const s_repository_rule_params_status_check_configuration = z.object({ integration_id: z.coerce.number().optional(), }) +export const s_repository_rule_params_workflow_file_reference = z.object({ + path: z.string(), + ref: z.string().optional(), + repository_id: z.coerce.number(), + sha: z.string().optional(), +}) + export const s_repository_rule_pull_request = z.object({ type: z.enum(["pull_request"]), parameters: z @@ -2193,6 +2325,9 @@ export const s_repository_ruleset_conditions_repository_name_target = z.object({ }), }) +export const s_repository_ruleset_conditions_repository_property_spec = + z.object({ name: z.string(), property_values: z.array(z.string()) }) + export const s_repository_subscription = z.object({ subscribed: z.coerce.boolean(), ignored: z.coerce.boolean(), @@ -2226,7 +2361,7 @@ export const s_root = z.object({ followers_url: z.string(), following_url: z.string(), gists_url: z.string(), - hub_url: z.string(), + hub_url: z.string().optional(), issue_search_url: z.string(), issues_url: z.string(), keys_url: z.string(), @@ -2249,6 +2384,55 @@ export const s_root = z.object({ user_search_url: z.string(), }) +export const s_rule_suite = z.object({ + id: z.coerce.number().optional(), + actor_id: z.coerce.number().nullable().optional(), + actor_name: z.string().nullable().optional(), + before_sha: z.string().optional(), + after_sha: z.string().optional(), + ref: z.string().optional(), + repository_id: z.coerce.number().optional(), + repository_name: z.string().optional(), + pushed_at: z.string().datetime({ offset: true }).optional(), + result: z.enum(["pass", "fail", "bypass"]).optional(), + evaluation_result: z.enum(["pass", "fail"]).optional(), + rule_evaluations: z + .array( + z.object({ + rule_source: z + .object({ + type: z.string().optional(), + id: z.coerce.number().nullable().optional(), + name: z.string().nullable().optional(), + }) + .optional(), + enforcement: z + .enum(["active", "evaluate", "deleted ruleset"]) + .optional(), + result: z.enum(["pass", "fail"]).optional(), + rule_type: z.string().optional(), + details: z.string().optional(), + }), + ) + .optional(), +}) + +export const s_rule_suites = z.array( + z.object({ + id: z.coerce.number().optional(), + actor_id: z.coerce.number().optional(), + actor_name: z.string().optional(), + before_sha: z.string().optional(), + after_sha: z.string().optional(), + ref: z.string().optional(), + repository_id: z.coerce.number().optional(), + repository_name: z.string().optional(), + pushed_at: z.string().datetime({ offset: true }).optional(), + result: z.enum(["pass", "fail", "bypass"]).optional(), + evaluation_result: z.enum(["pass", "fail"]).optional(), + }), +) + export const s_runner_application = z.object({ os: z.string(), architecture: z.string(), @@ -2310,6 +2494,18 @@ export const s_secret_scanning_location_commit = z.object({ commit_url: z.string(), }) +export const s_secret_scanning_location_discussion_body = z.object({ + discussion_body_url: z.string(), +}) + +export const s_secret_scanning_location_discussion_comment = z.object({ + discussion_comment_url: z.string(), +}) + +export const s_secret_scanning_location_discussion_title = z.object({ + discussion_title_url: z.string(), +}) + export const s_secret_scanning_location_issue_body = z.object({ issue_body_url: z.string(), }) @@ -2322,6 +2518,38 @@ export const s_secret_scanning_location_issue_title = z.object({ issue_title_url: z.string(), }) +export const s_secret_scanning_location_pull_request_body = z.object({ + pull_request_body_url: z.string(), +}) + +export const s_secret_scanning_location_pull_request_comment = z.object({ + pull_request_comment_url: z.string(), +}) + +export const s_secret_scanning_location_pull_request_review = z.object({ + pull_request_review_url: z.string(), +}) + +export const s_secret_scanning_location_pull_request_review_comment = z.object({ + pull_request_review_comment_url: z.string(), +}) + +export const s_secret_scanning_location_pull_request_title = z.object({ + pull_request_title_url: z.string(), +}) + +export const s_secret_scanning_location_wiki_commit = z.object({ + path: z.string(), + start_line: z.coerce.number(), + end_line: z.coerce.number(), + start_column: z.coerce.number(), + end_column: z.coerce.number(), + blob_sha: z.string(), + page_url: z.string(), + commit_sha: z.string(), + commit_url: z.string(), +}) + export const s_security_advisory_credit_types = z.enum([ "analyst", "finder", @@ -2880,6 +3108,7 @@ export const s_code_scanning_codeql_database = z.object({ created_at: z.string().datetime({ offset: true }), updated_at: z.string().datetime({ offset: true }), url: z.string(), + commit_oid: z.string().nullable().optional(), }) export const s_code_scanning_sarifs_receipt = z.object({ @@ -2977,6 +3206,9 @@ export const s_copilot_organization_details = z.intersection( "unconfigured", "unknown", ]), + ide_chat: z.enum(["enabled", "disabled", "unconfigured"]).optional(), + platform_chat: z.enum(["enabled", "disabled", "unconfigured"]).optional(), + cli: z.enum(["enabled", "disabled", "unconfigured"]).optional(), seat_management_setting: z.enum([ "assign_all", "assign_selected", @@ -3148,33 +3380,6 @@ export const s_global_advisory = z.object({ .nullable(), }) -export const s_hook = z.object({ - type: z.string(), - id: z.coerce.number(), - name: z.string(), - active: z.coerce.boolean(), - events: z.array(z.string()), - config: z.object({ - email: z.string().optional(), - password: z.string().optional(), - room: z.string().optional(), - subdomain: z.string().optional(), - url: s_webhook_config_url.optional(), - insecure_ssl: s_webhook_config_insecure_ssl.optional(), - content_type: s_webhook_config_content_type.optional(), - digest: z.string().optional(), - secret: s_webhook_config_secret.optional(), - token: z.string().optional(), - }), - updated_at: z.string().datetime({ offset: true }), - created_at: z.string().datetime({ offset: true }), - url: z.string(), - test_url: z.string(), - ping_url: z.string(), - deliveries_url: z.string().optional(), - last_response: s_hook_response, -}) - export const s_installation = z.object({ id: z.coerce.number(), account: z.union([s_simple_user, s_enterprise]).nullable(), @@ -3601,7 +3806,6 @@ export const s_nullable_repository = z name: z.string(), full_name: z.string(), license: s_nullable_license_simple, - organization: s_nullable_simple_user.optional(), forks: z.coerce.number(), permissions: z .object({ @@ -3682,133 +3886,6 @@ export const s_nullable_repository = z created_at: z.string().datetime({ offset: true }).nullable(), updated_at: z.string().datetime({ offset: true }).nullable(), allow_rebase_merge: z.coerce.boolean().optional(), - template_repository: z - .object({ - id: z.coerce.number().optional(), - node_id: z.string().optional(), - name: z.string().optional(), - full_name: z.string().optional(), - owner: z - .object({ - login: z.string().optional(), - id: z.coerce.number().optional(), - node_id: z.string().optional(), - avatar_url: z.string().optional(), - gravatar_id: z.string().optional(), - url: z.string().optional(), - html_url: z.string().optional(), - followers_url: z.string().optional(), - following_url: z.string().optional(), - gists_url: z.string().optional(), - starred_url: z.string().optional(), - subscriptions_url: z.string().optional(), - organizations_url: z.string().optional(), - repos_url: z.string().optional(), - events_url: z.string().optional(), - received_events_url: z.string().optional(), - type: z.string().optional(), - site_admin: z.coerce.boolean().optional(), - }) - .optional(), - private: z.coerce.boolean().optional(), - html_url: z.string().optional(), - description: z.string().optional(), - fork: z.coerce.boolean().optional(), - url: z.string().optional(), - archive_url: z.string().optional(), - assignees_url: z.string().optional(), - blobs_url: z.string().optional(), - branches_url: z.string().optional(), - collaborators_url: z.string().optional(), - comments_url: z.string().optional(), - commits_url: z.string().optional(), - compare_url: z.string().optional(), - contents_url: z.string().optional(), - contributors_url: z.string().optional(), - deployments_url: z.string().optional(), - downloads_url: z.string().optional(), - events_url: z.string().optional(), - forks_url: z.string().optional(), - git_commits_url: z.string().optional(), - git_refs_url: z.string().optional(), - git_tags_url: z.string().optional(), - git_url: z.string().optional(), - issue_comment_url: z.string().optional(), - issue_events_url: z.string().optional(), - issues_url: z.string().optional(), - keys_url: z.string().optional(), - labels_url: z.string().optional(), - languages_url: z.string().optional(), - merges_url: z.string().optional(), - milestones_url: z.string().optional(), - notifications_url: z.string().optional(), - pulls_url: z.string().optional(), - releases_url: z.string().optional(), - ssh_url: z.string().optional(), - stargazers_url: z.string().optional(), - statuses_url: z.string().optional(), - subscribers_url: z.string().optional(), - subscription_url: z.string().optional(), - tags_url: z.string().optional(), - teams_url: z.string().optional(), - trees_url: z.string().optional(), - clone_url: z.string().optional(), - mirror_url: z.string().optional(), - hooks_url: z.string().optional(), - svn_url: z.string().optional(), - homepage: z.string().optional(), - language: z.string().optional(), - forks_count: z.coerce.number().optional(), - stargazers_count: z.coerce.number().optional(), - watchers_count: z.coerce.number().optional(), - size: z.coerce.number().optional(), - default_branch: z.string().optional(), - open_issues_count: z.coerce.number().optional(), - is_template: z.coerce.boolean().optional(), - topics: z.array(z.string()).optional(), - has_issues: z.coerce.boolean().optional(), - has_projects: z.coerce.boolean().optional(), - has_wiki: z.coerce.boolean().optional(), - has_pages: z.coerce.boolean().optional(), - has_downloads: z.coerce.boolean().optional(), - archived: z.coerce.boolean().optional(), - disabled: z.coerce.boolean().optional(), - visibility: z.string().optional(), - pushed_at: z.string().optional(), - created_at: z.string().optional(), - updated_at: z.string().optional(), - permissions: z - .object({ - admin: z.coerce.boolean().optional(), - maintain: z.coerce.boolean().optional(), - push: z.coerce.boolean().optional(), - triage: z.coerce.boolean().optional(), - pull: z.coerce.boolean().optional(), - }) - .optional(), - allow_rebase_merge: z.coerce.boolean().optional(), - temp_clone_token: z.string().optional(), - allow_squash_merge: z.coerce.boolean().optional(), - allow_auto_merge: z.coerce.boolean().optional(), - delete_branch_on_merge: z.coerce.boolean().optional(), - allow_update_branch: z.coerce.boolean().optional(), - use_squash_pr_title_as_default: z.coerce.boolean().optional(), - squash_merge_commit_title: z - .enum(["PR_TITLE", "COMMIT_OR_PR_TITLE"]) - .optional(), - squash_merge_commit_message: z - .enum(["PR_BODY", "COMMIT_MESSAGES", "BLANK"]) - .optional(), - merge_commit_title: z.enum(["PR_TITLE", "MERGE_MESSAGE"]).optional(), - merge_commit_message: z - .enum(["PR_BODY", "PR_TITLE", "BLANK"]) - .optional(), - allow_merge_commit: z.coerce.boolean().optional(), - subscribers_count: z.coerce.number().optional(), - network_count: z.coerce.number().optional(), - }) - .nullable() - .optional(), temp_clone_token: z.string().optional(), allow_squash_merge: z.coerce.boolean().optional(), allow_auto_merge: z.coerce.boolean().optional(), @@ -3826,8 +3903,6 @@ export const s_nullable_repository = z allow_merge_commit: z.coerce.boolean().optional(), allow_forking: z.coerce.boolean().optional(), web_commit_signoff_required: z.coerce.boolean().optional(), - subscribers_count: z.coerce.number().optional(), - network_count: z.coerce.number().optional(), open_issues: z.coerce.number(), watchers: z.coerce.number(), master_branch: z.string().optional(), @@ -3860,14 +3935,12 @@ export const s_org_membership = z.object({ .optional(), }) -export const s_org_ruleset_conditions = z.union([ - s_repository_ruleset_conditions.merge( - s_repository_ruleset_conditions_repository_name_target, - ), - s_repository_ruleset_conditions.merge( - s_repository_ruleset_conditions_repository_id_target, - ), -]) +export const s_org_repo_custom_property_values = z.object({ + repository_id: z.coerce.number(), + repository_name: z.string(), + repository_full_name: z.string(), + properties: z.array(s_custom_property_value), +}) export const s_organization_invitation = z.object({ id: z.coerce.number(), @@ -3917,6 +3990,16 @@ export const s_organization_programmatic_access_grant_request = z.object({ token_last_used_at: z.string().nullable(), }) +export const s_organization_role = z.object({ + id: z.coerce.number(), + name: z.string(), + description: z.string().nullable().optional(), + permissions: z.array(z.string()), + organization: s_nullable_simple_user, + created_at: z.string().datetime({ offset: true }), + updated_at: z.string().datetime({ offset: true }), +}) + export const s_page = z.object({ url: z.string(), status: z.enum(["built", "building", "errored"]).nullable(), @@ -3970,6 +4053,7 @@ export const s_private_vulnerability_report_create = z.object({ cwe_ids: z.array(z.string()).nullable().optional(), severity: z.enum(["critical", "high", "medium", "low"]).nullable().optional(), cvss_vector_string: z.string().nullable().optional(), + start_private_fork: z.coerce.boolean().optional(), }) export const s_project = z.object({ @@ -4223,7 +4307,6 @@ export const s_repository = z.object({ name: z.string(), full_name: z.string(), license: s_nullable_license_simple, - organization: s_nullable_simple_user.optional(), forks: z.coerce.number(), permissions: z .object({ @@ -4304,131 +4387,6 @@ export const s_repository = z.object({ created_at: z.string().datetime({ offset: true }).nullable(), updated_at: z.string().datetime({ offset: true }).nullable(), allow_rebase_merge: z.coerce.boolean().optional(), - template_repository: z - .object({ - id: z.coerce.number().optional(), - node_id: z.string().optional(), - name: z.string().optional(), - full_name: z.string().optional(), - owner: z - .object({ - login: z.string().optional(), - id: z.coerce.number().optional(), - node_id: z.string().optional(), - avatar_url: z.string().optional(), - gravatar_id: z.string().optional(), - url: z.string().optional(), - html_url: z.string().optional(), - followers_url: z.string().optional(), - following_url: z.string().optional(), - gists_url: z.string().optional(), - starred_url: z.string().optional(), - subscriptions_url: z.string().optional(), - organizations_url: z.string().optional(), - repos_url: z.string().optional(), - events_url: z.string().optional(), - received_events_url: z.string().optional(), - type: z.string().optional(), - site_admin: z.coerce.boolean().optional(), - }) - .optional(), - private: z.coerce.boolean().optional(), - html_url: z.string().optional(), - description: z.string().optional(), - fork: z.coerce.boolean().optional(), - url: z.string().optional(), - archive_url: z.string().optional(), - assignees_url: z.string().optional(), - blobs_url: z.string().optional(), - branches_url: z.string().optional(), - collaborators_url: z.string().optional(), - comments_url: z.string().optional(), - commits_url: z.string().optional(), - compare_url: z.string().optional(), - contents_url: z.string().optional(), - contributors_url: z.string().optional(), - deployments_url: z.string().optional(), - downloads_url: z.string().optional(), - events_url: z.string().optional(), - forks_url: z.string().optional(), - git_commits_url: z.string().optional(), - git_refs_url: z.string().optional(), - git_tags_url: z.string().optional(), - git_url: z.string().optional(), - issue_comment_url: z.string().optional(), - issue_events_url: z.string().optional(), - issues_url: z.string().optional(), - keys_url: z.string().optional(), - labels_url: z.string().optional(), - languages_url: z.string().optional(), - merges_url: z.string().optional(), - milestones_url: z.string().optional(), - notifications_url: z.string().optional(), - pulls_url: z.string().optional(), - releases_url: z.string().optional(), - ssh_url: z.string().optional(), - stargazers_url: z.string().optional(), - statuses_url: z.string().optional(), - subscribers_url: z.string().optional(), - subscription_url: z.string().optional(), - tags_url: z.string().optional(), - teams_url: z.string().optional(), - trees_url: z.string().optional(), - clone_url: z.string().optional(), - mirror_url: z.string().optional(), - hooks_url: z.string().optional(), - svn_url: z.string().optional(), - homepage: z.string().optional(), - language: z.string().optional(), - forks_count: z.coerce.number().optional(), - stargazers_count: z.coerce.number().optional(), - watchers_count: z.coerce.number().optional(), - size: z.coerce.number().optional(), - default_branch: z.string().optional(), - open_issues_count: z.coerce.number().optional(), - is_template: z.coerce.boolean().optional(), - topics: z.array(z.string()).optional(), - has_issues: z.coerce.boolean().optional(), - has_projects: z.coerce.boolean().optional(), - has_wiki: z.coerce.boolean().optional(), - has_pages: z.coerce.boolean().optional(), - has_downloads: z.coerce.boolean().optional(), - archived: z.coerce.boolean().optional(), - disabled: z.coerce.boolean().optional(), - visibility: z.string().optional(), - pushed_at: z.string().optional(), - created_at: z.string().optional(), - updated_at: z.string().optional(), - permissions: z - .object({ - admin: z.coerce.boolean().optional(), - maintain: z.coerce.boolean().optional(), - push: z.coerce.boolean().optional(), - triage: z.coerce.boolean().optional(), - pull: z.coerce.boolean().optional(), - }) - .optional(), - allow_rebase_merge: z.coerce.boolean().optional(), - temp_clone_token: z.string().optional(), - allow_squash_merge: z.coerce.boolean().optional(), - allow_auto_merge: z.coerce.boolean().optional(), - delete_branch_on_merge: z.coerce.boolean().optional(), - allow_update_branch: z.coerce.boolean().optional(), - use_squash_pr_title_as_default: z.coerce.boolean().optional(), - squash_merge_commit_title: z - .enum(["PR_TITLE", "COMMIT_OR_PR_TITLE"]) - .optional(), - squash_merge_commit_message: z - .enum(["PR_BODY", "COMMIT_MESSAGES", "BLANK"]) - .optional(), - merge_commit_title: z.enum(["PR_TITLE", "MERGE_MESSAGE"]).optional(), - merge_commit_message: z.enum(["PR_BODY", "PR_TITLE", "BLANK"]).optional(), - allow_merge_commit: z.coerce.boolean().optional(), - subscribers_count: z.coerce.number().optional(), - network_count: z.coerce.number().optional(), - }) - .nullable() - .optional(), temp_clone_token: z.string().optional(), allow_squash_merge: z.coerce.boolean().optional(), allow_auto_merge: z.coerce.boolean().optional(), @@ -4446,8 +4404,6 @@ export const s_repository = z.object({ allow_merge_commit: z.coerce.boolean().optional(), allow_forking: z.coerce.boolean().optional(), web_commit_signoff_required: z.coerce.boolean().optional(), - subscribers_count: z.coerce.number().optional(), - network_count: z.coerce.number().optional(), open_issues: z.coerce.number(), watchers: z.coerce.number(), master_branch: z.string().optional(), @@ -4479,6 +4435,7 @@ export const s_repository_advisory_create = z.object({ .optional(), severity: z.enum(["critical", "high", "medium", "low"]).nullable().optional(), cvss_vector_string: z.string().nullable().optional(), + start_private_fork: z.coerce.boolean().optional(), }) export const s_repository_advisory_credit = z.object({ @@ -4548,6 +4505,27 @@ export const s_repository_rule_required_status_checks = z.object({ .optional(), }) +export const s_repository_rule_workflows = z.object({ + type: z.enum(["workflows"]), + parameters: z + .object({ + workflows: z.array(s_repository_rule_params_workflow_file_reference), + }) + .optional(), +}) + +export const s_repository_ruleset_conditions_repository_property_target = + z.object({ + repository_property: z.object({ + include: z + .array(s_repository_ruleset_conditions_repository_property_spec) + .optional(), + exclude: z + .array(s_repository_ruleset_conditions_repository_property_spec) + .optional(), + }), + }) + export const s_review_comment = z.object({ url: z.string(), pull_request_review_id: z.coerce.number().nullable(), @@ -4611,16 +4589,44 @@ export const s_secret_scanning_alert = z.object({ .datetime({ offset: true }) .nullable() .optional(), + validity: z.enum(["active", "inactive", "unknown"]).optional(), }) export const s_secret_scanning_location = z.object({ - type: z.enum(["commit", "issue_title", "issue_body", "issue_comment"]), - details: z.union([ - s_secret_scanning_location_commit, - s_secret_scanning_location_issue_title, - s_secret_scanning_location_issue_body, - s_secret_scanning_location_issue_comment, - ]), + type: z + .enum([ + "commit", + "wiki_commit", + "issue_title", + "issue_body", + "issue_comment", + "discussion_title", + "discussion_body", + "discussion_comment", + "pull_request_title", + "pull_request_body", + "pull_request_comment", + "pull_request_review", + "pull_request_review_comment", + ]) + .optional(), + details: z + .union([ + s_secret_scanning_location_commit, + s_secret_scanning_location_wiki_commit, + s_secret_scanning_location_issue_title, + s_secret_scanning_location_issue_body, + s_secret_scanning_location_issue_comment, + s_secret_scanning_location_discussion_title, + s_secret_scanning_location_discussion_body, + s_secret_scanning_location_discussion_comment, + s_secret_scanning_location_pull_request_title, + s_secret_scanning_location_pull_request_body, + s_secret_scanning_location_pull_request_comment, + s_secret_scanning_location_pull_request_review, + s_secret_scanning_location_pull_request_review_comment, + ]) + .optional(), }) export const s_simple_classroom_assignment = z.object({ @@ -4821,6 +4827,106 @@ export const s_team_project = z.object({ }), }) +export const s_team_repository = z.object({ + id: z.coerce.number(), + node_id: z.string(), + name: z.string(), + full_name: z.string(), + license: s_nullable_license_simple, + forks: z.coerce.number(), + permissions: z + .object({ + admin: z.coerce.boolean(), + pull: z.coerce.boolean(), + triage: z.coerce.boolean().optional(), + push: z.coerce.boolean(), + maintain: z.coerce.boolean().optional(), + }) + .optional(), + role_name: z.string().optional(), + owner: s_nullable_simple_user, + private: z.coerce.boolean(), + html_url: z.string(), + description: z.string().nullable(), + fork: z.coerce.boolean(), + url: z.string(), + archive_url: z.string(), + assignees_url: z.string(), + blobs_url: z.string(), + branches_url: z.string(), + collaborators_url: z.string(), + comments_url: z.string(), + commits_url: z.string(), + compare_url: z.string(), + contents_url: z.string(), + contributors_url: z.string(), + deployments_url: z.string(), + downloads_url: z.string(), + events_url: z.string(), + forks_url: z.string(), + git_commits_url: z.string(), + git_refs_url: z.string(), + git_tags_url: z.string(), + git_url: z.string(), + issue_comment_url: z.string(), + issue_events_url: z.string(), + issues_url: z.string(), + keys_url: z.string(), + labels_url: z.string(), + languages_url: z.string(), + merges_url: z.string(), + milestones_url: z.string(), + notifications_url: z.string(), + pulls_url: z.string(), + releases_url: z.string(), + ssh_url: z.string(), + stargazers_url: z.string(), + statuses_url: z.string(), + subscribers_url: z.string(), + subscription_url: z.string(), + tags_url: z.string(), + teams_url: z.string(), + trees_url: z.string(), + clone_url: z.string(), + mirror_url: z.string().nullable(), + hooks_url: z.string(), + svn_url: z.string(), + homepage: z.string().nullable(), + language: z.string().nullable(), + forks_count: z.coerce.number(), + stargazers_count: z.coerce.number(), + watchers_count: z.coerce.number(), + size: z.coerce.number(), + default_branch: z.string(), + open_issues_count: z.coerce.number(), + is_template: z.coerce.boolean().optional(), + topics: z.array(z.string()).optional(), + has_issues: z.coerce.boolean(), + has_projects: z.coerce.boolean(), + has_wiki: z.coerce.boolean(), + has_pages: z.coerce.boolean(), + has_downloads: z.coerce.boolean(), + archived: z.coerce.boolean(), + disabled: z.coerce.boolean(), + visibility: z.string().optional(), + pushed_at: z.string().datetime({ offset: true }).nullable(), + created_at: z.string().datetime({ offset: true }).nullable(), + updated_at: z.string().datetime({ offset: true }).nullable(), + allow_rebase_merge: z.coerce.boolean().optional(), + temp_clone_token: z.string().optional(), + allow_squash_merge: z.coerce.boolean().optional(), + allow_auto_merge: z.coerce.boolean().optional(), + delete_branch_on_merge: z.coerce.boolean().optional(), + allow_merge_commit: z.coerce.boolean().optional(), + allow_forking: z.coerce.boolean().optional(), + web_commit_signoff_required: z.coerce.boolean().optional(), + subscribers_count: z.coerce.number().optional(), + network_count: z.coerce.number().optional(), + open_issues: z.coerce.number(), + watchers: z.coerce.number(), + master_branch: z.string().optional(), +}) + export const s_timeline_reviewed_event = z.object({ event: z.string(), id: z.coerce.number(), @@ -5017,7 +5123,16 @@ export const s_check_suite = z.object({ node_id: z.string(), head_branch: z.string().nullable(), head_sha: z.string(), - status: z.enum(["queued", "in_progress", "completed"]).nullable(), + status: z + .enum([ + "queued", + "in_progress", + "completed", + "waiting", + "requested", + "pending", + ]) + .nullable(), conclusion: z .enum([ "success", @@ -5157,7 +5272,7 @@ export const s_code_scanning_organization_alert_items = z.object({ dismissed_at: s_alert_dismissed_at, dismissed_reason: s_code_scanning_alert_dismissed_reason, dismissed_comment: s_code_scanning_alert_dismissed_comment.optional(), - rule: s_code_scanning_alert_rule, + rule: s_code_scanning_alert_rule_summary, tool: s_code_scanning_analysis_tool, most_recent_instance: s_code_scanning_alert_instance, repository: s_simple_repository, @@ -5328,7 +5443,7 @@ export const s_converted_note_to_issue_issue_event = z.object({ }) export const s_copilot_seat_details = z.object({ - assignee: z.record(z.any()), + assignee: z.union([s_simple_user, s_team, s_organization]), assigning_team: s_team.nullable().optional(), pending_cancellation_date: z.string().nullable().optional(), last_activity_at: z.string().datetime({ offset: true }).nullable().optional(), @@ -5455,6 +5570,7 @@ export const s_environment = z.object({ z.object({ id: z.coerce.number(), node_id: z.string(), + prevent_self_review: z.coerce.boolean().optional(), type: z.string(), reviewers: z .array( @@ -5542,7 +5658,7 @@ export const s_full_repository = z.object({ has_projects: z.coerce.boolean(), has_wiki: z.coerce.boolean(), has_pages: z.coerce.boolean(), - has_downloads: z.coerce.boolean(), + has_downloads: z.coerce.boolean().optional(), has_discussions: z.coerce.boolean(), archived: z.coerce.boolean(), disabled: z.coerce.boolean(), @@ -5591,6 +5707,7 @@ export const s_full_repository = z.object({ anonymous_access_enabled: z.coerce.boolean().optional(), code_of_conduct: s_code_of_conduct_simple.optional(), security_and_analysis: s_security_and_analysis.optional(), + custom_properties: z.record(z.any()).optional(), }) export const s_gist_simple = z.object({ @@ -5674,6 +5791,22 @@ export const s_gist_simple = z.object({ truncated: z.coerce.boolean().optional(), }) +export const s_hook = z.object({ + type: z.string(), + id: z.coerce.number(), + name: z.string(), + active: z.coerce.boolean(), + events: z.array(z.string()), + config: s_webhook_config, + updated_at: z.string().datetime({ offset: true }), + created_at: z.string().datetime({ offset: true }), + url: z.string(), + test_url: z.string(), + ping_url: z.string(), + deliveries_url: z.string().optional(), + last_response: s_hook_response, +}) + export const s_installation_token = z.object({ token: z.string(), expires_at: z.string(), @@ -5971,6 +6104,18 @@ export const s_nullable_issue = z }) .nullable() +export const s_org_ruleset_conditions = z.union([ + s_repository_ruleset_conditions.merge( + s_repository_ruleset_conditions_repository_name_target, + ), + s_repository_ruleset_conditions.merge( + s_repository_ruleset_conditions_repository_id_target, + ), + s_repository_ruleset_conditions.merge( + s_repository_ruleset_conditions_repository_property_target, + ), +]) + export const s_organization_secret_scanning_alert = z.object({ number: s_alert_number.optional(), created_at: s_alert_created_at.optional(), @@ -5994,6 +6139,7 @@ export const s_organization_secret_scanning_alert = z.object({ .nullable() .optional(), resolution_comment: z.string().nullable().optional(), + validity: z.enum(["active", "inactive", "unknown"]).optional(), }) export const s_package = z.object({ @@ -6673,6 +6819,7 @@ export const s_repository_rule = z.union([ s_repository_rule_committer_email_pattern, s_repository_rule_branch_name_pattern, s_repository_rule_tag_name_pattern, + s_repository_rule_workflows, ]) export const s_repository_rule_detailed = z.union([ @@ -6700,6 +6847,7 @@ export const s_repository_rule_detailed = z.union([ ), s_repository_rule_branch_name_pattern.merge(s_repository_rule_ruleset_info), s_repository_rule_tag_name_pattern.merge(s_repository_rule_ruleset_info), + s_repository_rule_workflows.merge(s_repository_rule_ruleset_info), ]) export const s_review_dismissed_issue_event = z.object({ @@ -6768,107 +6916,6 @@ export const s_state_change_issue_event = z.object({ state_reason: z.string().nullable().optional(), }) -export const s_team_repository = z.object({ - id: z.coerce.number(), - node_id: z.string(), - name: z.string(), - full_name: z.string(), - license: s_nullable_license_simple, - forks: z.coerce.number(), - permissions: z - .object({ - admin: z.coerce.boolean(), - pull: z.coerce.boolean(), - triage: z.coerce.boolean().optional(), - push: z.coerce.boolean(), - maintain: z.coerce.boolean().optional(), - }) - .optional(), - role_name: z.string().optional(), - owner: s_nullable_simple_user, - private: z.coerce.boolean(), - html_url: z.string(), - description: z.string().nullable(), - fork: z.coerce.boolean(), - url: z.string(), - archive_url: z.string(), - assignees_url: z.string(), - blobs_url: z.string(), - branches_url: z.string(), - collaborators_url: z.string(), - comments_url: z.string(), - commits_url: z.string(), - compare_url: z.string(), - contents_url: z.string(), - contributors_url: z.string(), - deployments_url: z.string(), - downloads_url: z.string(), - events_url: z.string(), - forks_url: z.string(), - git_commits_url: z.string(), - git_refs_url: z.string(), - git_tags_url: z.string(), - git_url: z.string(), - issue_comment_url: z.string(), - issue_events_url: z.string(), - issues_url: z.string(), - keys_url: z.string(), - labels_url: z.string(), - languages_url: z.string(), - merges_url: z.string(), - milestones_url: z.string(), - notifications_url: z.string(), - pulls_url: z.string(), - releases_url: z.string(), - ssh_url: z.string(), - stargazers_url: z.string(), - statuses_url: z.string(), - subscribers_url: z.string(), - subscription_url: z.string(), - tags_url: z.string(), - teams_url: z.string(), - trees_url: z.string(), - clone_url: z.string(), - mirror_url: z.string().nullable(), - hooks_url: z.string(), - svn_url: z.string(), - homepage: z.string().nullable(), - language: z.string().nullable(), - forks_count: z.coerce.number(), - stargazers_count: z.coerce.number(), - watchers_count: z.coerce.number(), - size: z.coerce.number(), - default_branch: z.string(), - open_issues_count: z.coerce.number(), - is_template: z.coerce.boolean().optional(), - topics: z.array(z.string()).optional(), - has_issues: z.coerce.boolean(), - has_projects: z.coerce.boolean(), - has_wiki: z.coerce.boolean(), - has_pages: z.coerce.boolean(), - has_downloads: z.coerce.boolean(), - archived: z.coerce.boolean(), - disabled: z.coerce.boolean(), - visibility: z.string().optional(), - pushed_at: z.string().datetime({ offset: true }).nullable(), - created_at: z.string().datetime({ offset: true }).nullable(), - updated_at: z.string().datetime({ offset: true }).nullable(), - allow_rebase_merge: z.coerce.boolean().optional(), - template_repository: s_nullable_repository.optional(), - temp_clone_token: z.string().optional(), - allow_squash_merge: z.coerce.boolean().optional(), - allow_auto_merge: z.coerce.boolean().optional(), - delete_branch_on_merge: z.coerce.boolean().optional(), - allow_merge_commit: z.coerce.boolean().optional(), - allow_forking: z.coerce.boolean().optional(), - web_commit_signoff_required: z.coerce.boolean().optional(), - subscribers_count: z.coerce.number().optional(), - network_count: z.coerce.number().optional(), - open_issues: z.coerce.number(), - watchers: z.coerce.number(), - master_branch: z.string().optional(), -}) - export const s_thread = z.object({ id: z.string(), repository: s_minimal_repository, @@ -7052,7 +7099,14 @@ export const s_check_run = z.object({ url: z.string(), html_url: z.string().nullable(), details_url: z.string().nullable(), - status: z.enum(["queued", "in_progress", "completed"]), + status: z.enum([ + "queued", + "in_progress", + "completed", + "waiting", + "requested", + "pending", + ]), conclusion: z .enum([ "success", @@ -7297,6 +7351,7 @@ export const s_repository_ruleset = z.object({ .optional(), conditions: z .union([s_repository_ruleset_conditions, s_org_ruleset_conditions]) + .nullable() .optional(), rules: z.array(s_repository_rule).optional(), created_at: z.string().datetime({ offset: true }).optional(), diff --git a/integration-tests/typescript-koa/src/generated/stripe.yaml/generated.ts b/integration-tests/typescript-koa/src/generated/stripe.yaml/generated.ts index 3a02f63b..f85352ee 100644 --- a/integration-tests/typescript-koa/src/generated/stripe.yaml/generated.ts +++ b/integration-tests/typescript-koa/src/generated/stripe.yaml/generated.ts @@ -53,6 +53,8 @@ import { t_DeleteSubscriptionsSubscriptionExposedIdDiscountBodySchema, t_DeleteSubscriptionsSubscriptionExposedIdDiscountParamSchema, t_DeleteSubscriptionsSubscriptionExposedIdParamSchema, + t_DeleteTaxIdsIdBodySchema, + t_DeleteTaxIdsIdParamSchema, t_DeleteTerminalConfigurationsConfigurationBodySchema, t_DeleteTerminalConfigurationsConfigurationParamSchema, t_DeleteTerminalLocationsLocationBodySchema, @@ -129,6 +131,14 @@ import { t_GetBalanceTransactionsIdParamSchema, t_GetBalanceTransactionsIdQuerySchema, t_GetBalanceTransactionsQuerySchema, + t_GetBillingMetersBodySchema, + t_GetBillingMetersIdBodySchema, + t_GetBillingMetersIdEventSummariesBodySchema, + t_GetBillingMetersIdEventSummariesParamSchema, + t_GetBillingMetersIdEventSummariesQuerySchema, + t_GetBillingMetersIdParamSchema, + t_GetBillingMetersIdQuerySchema, + t_GetBillingMetersQuerySchema, t_GetBillingPortalConfigurationsBodySchema, t_GetBillingPortalConfigurationsConfigurationBodySchema, t_GetBillingPortalConfigurationsConfigurationParamSchema, @@ -158,6 +168,24 @@ import { t_GetCheckoutSessionsSessionLineItemsQuerySchema, t_GetCheckoutSessionsSessionParamSchema, t_GetCheckoutSessionsSessionQuerySchema, + t_GetClimateOrdersBodySchema, + t_GetClimateOrdersOrderBodySchema, + t_GetClimateOrdersOrderParamSchema, + t_GetClimateOrdersOrderQuerySchema, + t_GetClimateOrdersQuerySchema, + t_GetClimateProductsBodySchema, + t_GetClimateProductsProductBodySchema, + t_GetClimateProductsProductParamSchema, + t_GetClimateProductsProductQuerySchema, + t_GetClimateProductsQuerySchema, + t_GetClimateSuppliersBodySchema, + t_GetClimateSuppliersQuerySchema, + t_GetClimateSuppliersSupplierBodySchema, + t_GetClimateSuppliersSupplierParamSchema, + t_GetClimateSuppliersSupplierQuerySchema, + t_GetConfirmationTokensConfirmationTokenBodySchema, + t_GetConfirmationTokensConfirmationTokenParamSchema, + t_GetConfirmationTokensConfirmationTokenQuerySchema, t_GetCountrySpecsBodySchema, t_GetCountrySpecsCountryBodySchema, t_GetCountrySpecsCountryParamSchema, @@ -280,6 +308,16 @@ import { t_GetFinancialConnectionsSessionsSessionBodySchema, t_GetFinancialConnectionsSessionsSessionParamSchema, t_GetFinancialConnectionsSessionsSessionQuerySchema, + t_GetFinancialConnectionsTransactionsBodySchema, + t_GetFinancialConnectionsTransactionsQuerySchema, + t_GetFinancialConnectionsTransactionsTransactionBodySchema, + t_GetFinancialConnectionsTransactionsTransactionParamSchema, + t_GetFinancialConnectionsTransactionsTransactionQuerySchema, + t_GetForwardingRequestsBodySchema, + t_GetForwardingRequestsIdBodySchema, + t_GetForwardingRequestsIdParamSchema, + t_GetForwardingRequestsIdQuerySchema, + t_GetForwardingRequestsQuerySchema, t_GetIdentityVerificationReportsBodySchema, t_GetIdentityVerificationReportsQuerySchema, t_GetIdentityVerificationReportsReportBodySchema, @@ -329,11 +367,26 @@ import { t_GetIssuingDisputesDisputeParamSchema, t_GetIssuingDisputesDisputeQuerySchema, t_GetIssuingDisputesQuerySchema, + t_GetIssuingPersonalizationDesignsBodySchema, + t_GetIssuingPersonalizationDesignsPersonalizationDesignBodySchema, + t_GetIssuingPersonalizationDesignsPersonalizationDesignParamSchema, + t_GetIssuingPersonalizationDesignsPersonalizationDesignQuerySchema, + t_GetIssuingPersonalizationDesignsQuerySchema, + t_GetIssuingPhysicalBundlesBodySchema, + t_GetIssuingPhysicalBundlesPhysicalBundleBodySchema, + t_GetIssuingPhysicalBundlesPhysicalBundleParamSchema, + t_GetIssuingPhysicalBundlesPhysicalBundleQuerySchema, + t_GetIssuingPhysicalBundlesQuerySchema, t_GetIssuingSettlementsBodySchema, t_GetIssuingSettlementsQuerySchema, t_GetIssuingSettlementsSettlementBodySchema, t_GetIssuingSettlementsSettlementParamSchema, t_GetIssuingSettlementsSettlementQuerySchema, + t_GetIssuingTokensBodySchema, + t_GetIssuingTokensQuerySchema, + t_GetIssuingTokensTokenBodySchema, + t_GetIssuingTokensTokenParamSchema, + t_GetIssuingTokensTokenQuerySchema, t_GetIssuingTransactionsBodySchema, t_GetIssuingTransactionsQuerySchema, t_GetIssuingTransactionsTransactionBodySchema, @@ -518,11 +571,21 @@ import { t_GetTaxCodesIdParamSchema, t_GetTaxCodesIdQuerySchema, t_GetTaxCodesQuerySchema, + t_GetTaxIdsBodySchema, + t_GetTaxIdsIdBodySchema, + t_GetTaxIdsIdParamSchema, + t_GetTaxIdsIdQuerySchema, + t_GetTaxIdsQuerySchema, t_GetTaxRatesBodySchema, t_GetTaxRatesQuerySchema, t_GetTaxRatesTaxRateBodySchema, t_GetTaxRatesTaxRateParamSchema, t_GetTaxRatesTaxRateQuerySchema, + t_GetTaxRegistrationsBodySchema, + t_GetTaxRegistrationsIdBodySchema, + t_GetTaxRegistrationsIdParamSchema, + t_GetTaxRegistrationsIdQuerySchema, + t_GetTaxRegistrationsQuerySchema, t_GetTaxSettingsBodySchema, t_GetTaxSettingsQuerySchema, t_GetTaxTransactionsTransactionBodySchema, @@ -664,6 +727,15 @@ import { t_PostApplicationFeesIdRefundsParamSchema, t_PostAppsSecretsBodySchema, t_PostAppsSecretsDeleteBodySchema, + t_PostBillingMeterEventAdjustmentsBodySchema, + t_PostBillingMeterEventsBodySchema, + t_PostBillingMetersBodySchema, + t_PostBillingMetersIdBodySchema, + t_PostBillingMetersIdDeactivateBodySchema, + t_PostBillingMetersIdDeactivateParamSchema, + t_PostBillingMetersIdParamSchema, + t_PostBillingMetersIdReactivateBodySchema, + t_PostBillingMetersIdReactivateParamSchema, t_PostBillingPortalConfigurationsBodySchema, t_PostBillingPortalConfigurationsConfigurationBodySchema, t_PostBillingPortalConfigurationsConfigurationParamSchema, @@ -686,6 +758,11 @@ import { t_PostCheckoutSessionsBodySchema, t_PostCheckoutSessionsSessionExpireBodySchema, t_PostCheckoutSessionsSessionExpireParamSchema, + t_PostClimateOrdersBodySchema, + t_PostClimateOrdersOrderBodySchema, + t_PostClimateOrdersOrderCancelBodySchema, + t_PostClimateOrdersOrderCancelParamSchema, + t_PostClimateOrdersOrderParamSchema, t_PostCouponsBodySchema, t_PostCouponsCouponBodySchema, t_PostCouponsCouponParamSchema, @@ -694,6 +771,7 @@ import { t_PostCreditNotesIdParamSchema, t_PostCreditNotesIdVoidBodySchema, t_PostCreditNotesIdVoidParamSchema, + t_PostCustomerSessionsBodySchema, t_PostCustomersBodySchema, t_PostCustomersCustomerBalanceTransactionsBodySchema, t_PostCustomersCustomerBalanceTransactionsParamSchema, @@ -740,7 +818,12 @@ import { t_PostFinancialConnectionsAccountsAccountDisconnectParamSchema, t_PostFinancialConnectionsAccountsAccountRefreshBodySchema, t_PostFinancialConnectionsAccountsAccountRefreshParamSchema, + t_PostFinancialConnectionsAccountsAccountSubscribeBodySchema, + t_PostFinancialConnectionsAccountsAccountSubscribeParamSchema, + t_PostFinancialConnectionsAccountsAccountUnsubscribeBodySchema, + t_PostFinancialConnectionsAccountsAccountUnsubscribeParamSchema, t_PostFinancialConnectionsSessionsBodySchema, + t_PostForwardingRequestsBodySchema, t_PostIdentityVerificationSessionsBodySchema, t_PostIdentityVerificationSessionsSessionBodySchema, t_PostIdentityVerificationSessionsSessionCancelBodySchema, @@ -755,6 +838,8 @@ import { t_PostInvoicesInvoiceBodySchema, t_PostInvoicesInvoiceFinalizeBodySchema, t_PostInvoicesInvoiceFinalizeParamSchema, + t_PostInvoicesInvoiceLinesLineItemIdBodySchema, + t_PostInvoicesInvoiceLinesLineItemIdParamSchema, t_PostInvoicesInvoiceMarkUncollectibleBodySchema, t_PostInvoicesInvoiceMarkUncollectibleParamSchema, t_PostInvoicesInvoiceParamSchema, @@ -781,8 +866,13 @@ import { t_PostIssuingDisputesDisputeParamSchema, t_PostIssuingDisputesDisputeSubmitBodySchema, t_PostIssuingDisputesDisputeSubmitParamSchema, + t_PostIssuingPersonalizationDesignsBodySchema, + t_PostIssuingPersonalizationDesignsPersonalizationDesignBodySchema, + t_PostIssuingPersonalizationDesignsPersonalizationDesignParamSchema, t_PostIssuingSettlementsSettlementBodySchema, t_PostIssuingSettlementsSettlementParamSchema, + t_PostIssuingTokensTokenBodySchema, + t_PostIssuingTokensTokenParamSchema, t_PostIssuingTransactionsTransactionBodySchema, t_PostIssuingTransactionsTransactionParamSchema, t_PostLinkAccountSessionsBodySchema, @@ -898,9 +988,13 @@ import { t_PostSubscriptionsSubscriptionResumeBodySchema, t_PostSubscriptionsSubscriptionResumeParamSchema, t_PostTaxCalculationsBodySchema, + t_PostTaxIdsBodySchema, t_PostTaxRatesBodySchema, t_PostTaxRatesTaxRateBodySchema, t_PostTaxRatesTaxRateParamSchema, + t_PostTaxRegistrationsBodySchema, + t_PostTaxRegistrationsIdBodySchema, + t_PostTaxRegistrationsIdParamSchema, t_PostTaxSettingsBodySchema, t_PostTaxTransactionsCreateFromCalculationBodySchema, t_PostTaxTransactionsCreateReversalBodySchema, @@ -924,6 +1018,7 @@ import { t_PostTerminalReadersReaderRefundPaymentParamSchema, t_PostTerminalReadersReaderSetReaderDisplayBodySchema, t_PostTerminalReadersReaderSetReaderDisplayParamSchema, + t_PostTestHelpersConfirmationTokensBodySchema, t_PostTestHelpersCustomersCustomerFundCashBalanceBodySchema, t_PostTestHelpersCustomersCustomerFundCashBalanceParamSchema, t_PostTestHelpersIssuingAuthorizationsAuthorizationCaptureBodySchema, @@ -943,6 +1038,12 @@ import { t_PostTestHelpersIssuingCardsCardShippingReturnParamSchema, t_PostTestHelpersIssuingCardsCardShippingShipBodySchema, t_PostTestHelpersIssuingCardsCardShippingShipParamSchema, + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateBodySchema, + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParamSchema, + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateBodySchema, + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParamSchema, + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectBodySchema, + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParamSchema, t_PostTestHelpersIssuingTransactionsCreateForceCaptureBodySchema, t_PostTestHelpersIssuingTransactionsCreateUnlinkedRefundBodySchema, t_PostTestHelpersIssuingTransactionsTransactionRefundBodySchema, @@ -1015,6 +1116,10 @@ import { t_balance, t_balance_transaction, t_bank_account, + t_billing_meter, + t_billing_meter_event, + t_billing_meter_event_adjustment, + t_billing_meter_event_summary, t_billing_portal_configuration, t_billing_portal_session, t_capability, @@ -1022,6 +1127,10 @@ import { t_cash_balance, t_charge, t_checkout_session, + t_climate_order, + t_climate_product, + t_climate_supplier, + t_confirmation_token, t_country_spec, t_coupon, t_credit_note, @@ -1029,6 +1138,7 @@ import { t_customer, t_customer_balance_transaction, t_customer_cash_balance_transaction, + t_customer_session, t_deleted_account, t_deleted_apple_pay_domain, t_deleted_coupon, @@ -1063,6 +1173,8 @@ import { t_financial_connections_account, t_financial_connections_account_owner, t_financial_connections_session, + t_financial_connections_transaction, + t_forwarding_request, t_funding_instructions, t_identity_verification_report, t_identity_verification_session, @@ -1072,7 +1184,10 @@ import { t_issuing_card, t_issuing_cardholder, t_issuing_dispute, + t_issuing_personalization_design, + t_issuing_physical_bundle, t_issuing_settlement, + t_issuing_token, t_issuing_transaction, t_item, t_line_item, @@ -1113,6 +1228,7 @@ import { t_tax_code, t_tax_id, t_tax_rate, + t_tax_registration, t_tax_settings, t_tax_transaction, t_tax_transaction_line_item, @@ -1150,6 +1266,10 @@ import { s_balance, s_balance_transaction, s_bank_account, + s_billing_meter, + s_billing_meter_event, + s_billing_meter_event_adjustment, + s_billing_meter_event_summary, s_billing_portal_configuration, s_billing_portal_session, s_capability, @@ -1157,6 +1277,10 @@ import { s_cash_balance, s_charge, s_checkout_session, + s_climate_order, + s_climate_product, + s_climate_supplier, + s_confirmation_token, s_country_spec, s_coupon, s_credit_note, @@ -1164,6 +1288,7 @@ import { s_customer, s_customer_balance_transaction, s_customer_cash_balance_transaction, + s_customer_session, s_deleted_account, s_deleted_apple_pay_domain, s_deleted_coupon, @@ -1198,6 +1323,8 @@ import { s_financial_connections_account, s_financial_connections_account_owner, s_financial_connections_session, + s_financial_connections_transaction, + s_forwarding_request, s_funding_instructions, s_identity_verification_report, s_identity_verification_session, @@ -1207,7 +1334,10 @@ import { s_issuing_card, s_issuing_cardholder, s_issuing_dispute, + s_issuing_personalization_design, + s_issuing_physical_bundle, s_issuing_settlement, + s_issuing_token, s_issuing_transaction, s_item, s_line_item, @@ -1248,6 +1378,7 @@ import { s_tax_code, s_tax_id, s_tax_rate, + s_tax_registration, s_tax_settings, s_tax_transaction, s_tax_transaction_line_item, @@ -2405,6 +2536,191 @@ export type GetBalanceTransactionsId = ( | Response > +export type PostBillingMeterEventAdjustmentsResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostBillingMeterEventAdjustments = ( + params: Params, + respond: PostBillingMeterEventAdjustmentsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_billing_meter_event_adjustment> + | Response +> + +export type PostBillingMeterEventsResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostBillingMeterEvents = ( + params: Params, + respond: PostBillingMeterEventsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_billing_meter_event> + | Response +> + +export type GetBillingMetersResponder = { + with200(): KoaRuntimeResponse<{ + data: t_billing_meter[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetBillingMeters = ( + params: Params< + void, + t_GetBillingMetersQuerySchema, + t_GetBillingMetersBodySchema | undefined + >, + respond: GetBillingMetersResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_billing_meter[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type PostBillingMetersResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostBillingMeters = ( + params: Params, + respond: PostBillingMetersResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_billing_meter> + | Response +> + +export type GetBillingMetersIdResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetBillingMetersId = ( + params: Params< + t_GetBillingMetersIdParamSchema, + t_GetBillingMetersIdQuerySchema, + t_GetBillingMetersIdBodySchema | undefined + >, + respond: GetBillingMetersIdResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_billing_meter> + | Response +> + +export type PostBillingMetersIdResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostBillingMetersId = ( + params: Params< + t_PostBillingMetersIdParamSchema, + void, + t_PostBillingMetersIdBodySchema | undefined + >, + respond: PostBillingMetersIdResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_billing_meter> + | Response +> + +export type PostBillingMetersIdDeactivateResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostBillingMetersIdDeactivate = ( + params: Params< + t_PostBillingMetersIdDeactivateParamSchema, + void, + t_PostBillingMetersIdDeactivateBodySchema | undefined + >, + respond: PostBillingMetersIdDeactivateResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_billing_meter> + | Response +> + +export type GetBillingMetersIdEventSummariesResponder = { + with200(): KoaRuntimeResponse<{ + data: t_billing_meter_event_summary[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetBillingMetersIdEventSummaries = ( + params: Params< + t_GetBillingMetersIdEventSummariesParamSchema, + t_GetBillingMetersIdEventSummariesQuerySchema, + t_GetBillingMetersIdEventSummariesBodySchema | undefined + >, + respond: GetBillingMetersIdEventSummariesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_billing_meter_event_summary[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type PostBillingMetersIdReactivateResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostBillingMetersIdReactivate = ( + params: Params< + t_PostBillingMetersIdReactivateParamSchema, + void, + t_PostBillingMetersIdReactivateBodySchema | undefined + >, + respond: PostBillingMetersIdReactivateResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_billing_meter> + | Response +> + export type GetBillingPortalConfigurationsResponder = { with200(): KoaRuntimeResponse<{ data: t_billing_portal_configuration[] @@ -2848,7 +3164,7 @@ export type PostCheckoutSessionsResponder = { } & KoaRuntimeResponder export type PostCheckoutSessions = ( - params: Params, + params: Params, respond: PostCheckoutSessionsResponder, ctx: RouterContext, ) => Promise< @@ -2927,6 +3243,231 @@ export type GetCheckoutSessionsSessionLineItems = ( | Response > +export type GetClimateOrdersResponder = { + with200(): KoaRuntimeResponse<{ + data: t_climate_order[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetClimateOrders = ( + params: Params< + void, + t_GetClimateOrdersQuerySchema, + t_GetClimateOrdersBodySchema | undefined + >, + respond: GetClimateOrdersResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_climate_order[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type PostClimateOrdersResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostClimateOrders = ( + params: Params, + respond: PostClimateOrdersResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_climate_order> + | Response +> + +export type GetClimateOrdersOrderResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetClimateOrdersOrder = ( + params: Params< + t_GetClimateOrdersOrderParamSchema, + t_GetClimateOrdersOrderQuerySchema, + t_GetClimateOrdersOrderBodySchema | undefined + >, + respond: GetClimateOrdersOrderResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_climate_order> + | Response +> + +export type PostClimateOrdersOrderResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostClimateOrdersOrder = ( + params: Params< + t_PostClimateOrdersOrderParamSchema, + void, + t_PostClimateOrdersOrderBodySchema | undefined + >, + respond: PostClimateOrdersOrderResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_climate_order> + | Response +> + +export type PostClimateOrdersOrderCancelResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostClimateOrdersOrderCancel = ( + params: Params< + t_PostClimateOrdersOrderCancelParamSchema, + void, + t_PostClimateOrdersOrderCancelBodySchema | undefined + >, + respond: PostClimateOrdersOrderCancelResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_climate_order> + | Response +> + +export type GetClimateProductsResponder = { + with200(): KoaRuntimeResponse<{ + data: t_climate_product[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetClimateProducts = ( + params: Params< + void, + t_GetClimateProductsQuerySchema, + t_GetClimateProductsBodySchema | undefined + >, + respond: GetClimateProductsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_climate_product[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type GetClimateProductsProductResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetClimateProductsProduct = ( + params: Params< + t_GetClimateProductsProductParamSchema, + t_GetClimateProductsProductQuerySchema, + t_GetClimateProductsProductBodySchema | undefined + >, + respond: GetClimateProductsProductResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_climate_product> + | Response +> + +export type GetClimateSuppliersResponder = { + with200(): KoaRuntimeResponse<{ + data: t_climate_supplier[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetClimateSuppliers = ( + params: Params< + void, + t_GetClimateSuppliersQuerySchema, + t_GetClimateSuppliersBodySchema | undefined + >, + respond: GetClimateSuppliersResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_climate_supplier[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type GetClimateSuppliersSupplierResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetClimateSuppliersSupplier = ( + params: Params< + t_GetClimateSuppliersSupplierParamSchema, + t_GetClimateSuppliersSupplierQuerySchema, + t_GetClimateSuppliersSupplierBodySchema | undefined + >, + respond: GetClimateSuppliersSupplierResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_climate_supplier> + | Response +> + +export type GetConfirmationTokensConfirmationTokenResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetConfirmationTokensConfirmationToken = ( + params: Params< + t_GetConfirmationTokensConfirmationTokenParamSchema, + t_GetConfirmationTokensConfirmationTokenQuerySchema, + t_GetConfirmationTokensConfirmationTokenBodySchema | undefined + >, + respond: GetConfirmationTokensConfirmationTokenResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_confirmation_token> + | Response +> + export type GetCountrySpecsResponder = { with200(): KoaRuntimeResponse<{ data: t_country_spec[] @@ -3269,6 +3810,21 @@ export type PostCreditNotesIdVoid = ( | Response > +export type PostCustomerSessionsResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostCustomerSessions = ( + params: Params, + respond: PostCustomerSessionsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_customer_session> + | Response +> + export type GetCustomersResponder = { with200(): KoaRuntimeResponse<{ data: t_customer[] @@ -4795,6 +5351,44 @@ export type PostFinancialConnectionsAccountsAccountRefresh = ( | Response > +export type PostFinancialConnectionsAccountsAccountSubscribeResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostFinancialConnectionsAccountsAccountSubscribe = ( + params: Params< + t_PostFinancialConnectionsAccountsAccountSubscribeParamSchema, + void, + t_PostFinancialConnectionsAccountsAccountSubscribeBodySchema + >, + respond: PostFinancialConnectionsAccountsAccountSubscribeResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_financial_connections_account> + | Response +> + +export type PostFinancialConnectionsAccountsAccountUnsubscribeResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostFinancialConnectionsAccountsAccountUnsubscribe = ( + params: Params< + t_PostFinancialConnectionsAccountsAccountUnsubscribeParamSchema, + void, + t_PostFinancialConnectionsAccountsAccountUnsubscribeBodySchema + >, + respond: PostFinancialConnectionsAccountsAccountUnsubscribeResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_financial_connections_account> + | Response +> + export type PostFinancialConnectionsSessionsResponder = { with200(): KoaRuntimeResponse withDefault(status: StatusCode): KoaRuntimeResponse @@ -4829,6 +5423,123 @@ export type GetFinancialConnectionsSessionsSession = ( | Response > +export type GetFinancialConnectionsTransactionsResponder = { + with200(): KoaRuntimeResponse<{ + data: t_financial_connections_transaction[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetFinancialConnectionsTransactions = ( + params: Params< + void, + t_GetFinancialConnectionsTransactionsQuerySchema, + t_GetFinancialConnectionsTransactionsBodySchema | undefined + >, + respond: GetFinancialConnectionsTransactionsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_financial_connections_transaction[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type GetFinancialConnectionsTransactionsTransactionResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetFinancialConnectionsTransactionsTransaction = ( + params: Params< + t_GetFinancialConnectionsTransactionsTransactionParamSchema, + t_GetFinancialConnectionsTransactionsTransactionQuerySchema, + t_GetFinancialConnectionsTransactionsTransactionBodySchema | undefined + >, + respond: GetFinancialConnectionsTransactionsTransactionResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_financial_connections_transaction> + | Response +> + +export type GetForwardingRequestsResponder = { + with200(): KoaRuntimeResponse<{ + data: t_forwarding_request[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetForwardingRequests = ( + params: Params< + void, + t_GetForwardingRequestsQuerySchema, + t_GetForwardingRequestsBodySchema | undefined + >, + respond: GetForwardingRequestsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_forwarding_request[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type PostForwardingRequestsResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostForwardingRequests = ( + params: Params, + respond: PostForwardingRequestsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_forwarding_request> + | Response +> + +export type GetForwardingRequestsIdResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetForwardingRequestsId = ( + params: Params< + t_GetForwardingRequestsIdParamSchema, + t_GetForwardingRequestsIdQuerySchema, + t_GetForwardingRequestsIdBodySchema | undefined + >, + respond: GetForwardingRequestsIdResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_forwarding_request> + | Response +> + export type GetIdentityVerificationReportsResponder = { with200(): KoaRuntimeResponse<{ data: t_identity_verification_report[] @@ -4918,7 +5629,11 @@ export type PostIdentityVerificationSessionsResponder = { } & KoaRuntimeResponder export type PostIdentityVerificationSessions = ( - params: Params, + params: Params< + void, + void, + t_PostIdentityVerificationSessionsBodySchema | undefined + >, respond: PostIdentityVerificationSessionsResponder, ctx: RouterContext, ) => Promise< @@ -5349,6 +6064,25 @@ export type GetInvoicesInvoiceLines = ( | Response > +export type PostInvoicesInvoiceLinesLineItemIdResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostInvoicesInvoiceLinesLineItemId = ( + params: Params< + t_PostInvoicesInvoiceLinesLineItemIdParamSchema, + void, + t_PostInvoicesInvoiceLinesLineItemIdBodySchema | undefined + >, + respond: PostInvoicesInvoiceLinesLineItemIdResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_line_item> + | Response +> + export type PostInvoicesInvoiceMarkUncollectibleResponder = { with200(): KoaRuntimeResponse withDefault(status: StatusCode): KoaRuntimeResponse @@ -5807,6 +6541,144 @@ export type PostIssuingDisputesDisputeSubmit = ( | Response > +export type GetIssuingPersonalizationDesignsResponder = { + with200(): KoaRuntimeResponse<{ + data: t_issuing_personalization_design[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetIssuingPersonalizationDesigns = ( + params: Params< + void, + t_GetIssuingPersonalizationDesignsQuerySchema, + t_GetIssuingPersonalizationDesignsBodySchema | undefined + >, + respond: GetIssuingPersonalizationDesignsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_issuing_personalization_design[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type PostIssuingPersonalizationDesignsResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostIssuingPersonalizationDesigns = ( + params: Params, + respond: PostIssuingPersonalizationDesignsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_issuing_personalization_design> + | Response +> + +export type GetIssuingPersonalizationDesignsPersonalizationDesignResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetIssuingPersonalizationDesignsPersonalizationDesign = ( + params: Params< + t_GetIssuingPersonalizationDesignsPersonalizationDesignParamSchema, + t_GetIssuingPersonalizationDesignsPersonalizationDesignQuerySchema, + | t_GetIssuingPersonalizationDesignsPersonalizationDesignBodySchema + | undefined + >, + respond: GetIssuingPersonalizationDesignsPersonalizationDesignResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_issuing_personalization_design> + | Response +> + +export type PostIssuingPersonalizationDesignsPersonalizationDesignResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostIssuingPersonalizationDesignsPersonalizationDesign = ( + params: Params< + t_PostIssuingPersonalizationDesignsPersonalizationDesignParamSchema, + void, + | t_PostIssuingPersonalizationDesignsPersonalizationDesignBodySchema + | undefined + >, + respond: PostIssuingPersonalizationDesignsPersonalizationDesignResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_issuing_personalization_design> + | Response +> + +export type GetIssuingPhysicalBundlesResponder = { + with200(): KoaRuntimeResponse<{ + data: t_issuing_physical_bundle[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetIssuingPhysicalBundles = ( + params: Params< + void, + t_GetIssuingPhysicalBundlesQuerySchema, + t_GetIssuingPhysicalBundlesBodySchema | undefined + >, + respond: GetIssuingPhysicalBundlesResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_issuing_physical_bundle[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type GetIssuingPhysicalBundlesPhysicalBundleResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetIssuingPhysicalBundlesPhysicalBundle = ( + params: Params< + t_GetIssuingPhysicalBundlesPhysicalBundleParamSchema, + t_GetIssuingPhysicalBundlesPhysicalBundleQuerySchema, + t_GetIssuingPhysicalBundlesPhysicalBundleBodySchema | undefined + >, + respond: GetIssuingPhysicalBundlesPhysicalBundleResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_issuing_physical_bundle> + | Response +> + export type GetIssuingSettlementsResponder = { with200(): KoaRuntimeResponse<{ data: t_issuing_settlement[] @@ -5877,6 +6749,76 @@ export type PostIssuingSettlementsSettlement = ( | Response > +export type GetIssuingTokensResponder = { + with200(): KoaRuntimeResponse<{ + data: t_issuing_token[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetIssuingTokens = ( + params: Params< + void, + t_GetIssuingTokensQuerySchema, + t_GetIssuingTokensBodySchema | undefined + >, + respond: GetIssuingTokensResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_issuing_token[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type GetIssuingTokensTokenResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetIssuingTokensToken = ( + params: Params< + t_GetIssuingTokensTokenParamSchema, + t_GetIssuingTokensTokenQuerySchema, + t_GetIssuingTokensTokenBodySchema | undefined + >, + respond: GetIssuingTokensTokenResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_issuing_token> + | Response +> + +export type PostIssuingTokensTokenResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostIssuingTokensToken = ( + params: Params< + t_PostIssuingTokensTokenParamSchema, + void, + t_PostIssuingTokensTokenBodySchema + >, + respond: PostIssuingTokensTokenResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_issuing_token> + | Response +> + export type GetIssuingTransactionsResponder = { with200(): KoaRuntimeResponse<{ data: t_issuing_transaction[] @@ -9072,6 +10014,91 @@ export type GetTaxCalculationsCalculationLineItems = ( | Response > +export type GetTaxRegistrationsResponder = { + with200(): KoaRuntimeResponse<{ + data: t_tax_registration[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetTaxRegistrations = ( + params: Params< + void, + t_GetTaxRegistrationsQuerySchema, + t_GetTaxRegistrationsBodySchema | undefined + >, + respond: GetTaxRegistrationsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_tax_registration[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type PostTaxRegistrationsResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostTaxRegistrations = ( + params: Params, + respond: PostTaxRegistrationsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_tax_registration> + | Response +> + +export type GetTaxRegistrationsIdResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetTaxRegistrationsId = ( + params: Params< + t_GetTaxRegistrationsIdParamSchema, + t_GetTaxRegistrationsIdQuerySchema, + t_GetTaxRegistrationsIdBodySchema | undefined + >, + respond: GetTaxRegistrationsIdResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_tax_registration> + | Response +> + +export type PostTaxRegistrationsIdResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostTaxRegistrationsId = ( + params: Params< + t_PostTaxRegistrationsIdParamSchema, + void, + t_PostTaxRegistrationsIdBodySchema | undefined + >, + respond: PostTaxRegistrationsIdResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_tax_registration> + | Response +> + export type GetTaxSettingsResponder = { with200(): KoaRuntimeResponse withDefault(status: StatusCode): KoaRuntimeResponse @@ -9242,6 +10269,91 @@ export type GetTaxCodesId = ( | Response > +export type GetTaxIdsResponder = { + with200(): KoaRuntimeResponse<{ + data: t_tax_id[] + has_more: boolean + object: "list" + url: string + }> + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetTaxIds = ( + params: Params< + void, + t_GetTaxIdsQuerySchema, + t_GetTaxIdsBodySchema | undefined + >, + respond: GetTaxIdsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response< + 200, + { + data: t_tax_id[] + has_more: boolean + object: "list" + url: string + } + > + | Response +> + +export type PostTaxIdsResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostTaxIds = ( + params: Params, + respond: PostTaxIdsResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_tax_id> + | Response +> + +export type DeleteTaxIdsIdResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type DeleteTaxIdsId = ( + params: Params< + t_DeleteTaxIdsIdParamSchema, + void, + t_DeleteTaxIdsIdBodySchema | undefined + >, + respond: DeleteTaxIdsIdResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_deleted_tax_id> + | Response +> + +export type GetTaxIdsIdResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type GetTaxIdsId = ( + params: Params< + t_GetTaxIdsIdParamSchema, + t_GetTaxIdsIdQuerySchema, + t_GetTaxIdsIdBodySchema | undefined + >, + respond: GetTaxIdsIdResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_tax_id> + | Response +> + export type GetTaxRatesResponder = { with200(): KoaRuntimeResponse<{ data: t_tax_rate[] @@ -9765,6 +10877,25 @@ export type PostTerminalReadersReaderSetReaderDisplay = ( | Response > +export type PostTestHelpersConfirmationTokensResponder = { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse +} & KoaRuntimeResponder + +export type PostTestHelpersConfirmationTokens = ( + params: Params< + void, + void, + t_PostTestHelpersConfirmationTokensBodySchema | undefined + >, + respond: PostTestHelpersConfirmationTokensResponder, + ctx: RouterContext, +) => Promise< + | KoaRuntimeResponse + | Response<200, t_confirmation_token> + | Response +> + export type PostTestHelpersCustomersCustomerFundCashBalanceResponder = { with200(): KoaRuntimeResponse withDefault(status: StatusCode): KoaRuntimeResponse @@ -9957,6 +11088,71 @@ export type PostTestHelpersIssuingCardsCardShippingShip = ( | Response > +export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateResponder = + { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse + } & KoaRuntimeResponder + +export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate = + ( + params: Params< + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParamSchema, + void, + | t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateBodySchema + | undefined + >, + respond: PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateResponder, + ctx: RouterContext, + ) => Promise< + | KoaRuntimeResponse + | Response<200, t_issuing_personalization_design> + | Response + > + +export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateResponder = + { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse + } & KoaRuntimeResponder + +export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate = + ( + params: Params< + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParamSchema, + void, + | t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateBodySchema + | undefined + >, + respond: PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateResponder, + ctx: RouterContext, + ) => Promise< + | KoaRuntimeResponse + | Response<200, t_issuing_personalization_design> + | Response + > + +export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectResponder = + { + with200(): KoaRuntimeResponse + withDefault(status: StatusCode): KoaRuntimeResponse + } & KoaRuntimeResponder + +export type PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject = + ( + params: Params< + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParamSchema, + void, + t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectBodySchema + >, + respond: PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectResponder, + ctx: RouterContext, + ) => Promise< + | KoaRuntimeResponse + | Response<200, t_issuing_personalization_design> + | Response + > + export type PostTestHelpersIssuingTransactionsCreateForceCaptureResponder = { with200(): KoaRuntimeResponse withDefault(status: StatusCode): KoaRuntimeResponse @@ -11553,6 +12749,15 @@ export type Implementation = { getBalanceHistoryId: GetBalanceHistoryId getBalanceTransactions: GetBalanceTransactions getBalanceTransactionsId: GetBalanceTransactionsId + postBillingMeterEventAdjustments: PostBillingMeterEventAdjustments + postBillingMeterEvents: PostBillingMeterEvents + getBillingMeters: GetBillingMeters + postBillingMeters: PostBillingMeters + getBillingMetersId: GetBillingMetersId + postBillingMetersId: PostBillingMetersId + postBillingMetersIdDeactivate: PostBillingMetersIdDeactivate + getBillingMetersIdEventSummaries: GetBillingMetersIdEventSummaries + postBillingMetersIdReactivate: PostBillingMetersIdReactivate getBillingPortalConfigurations: GetBillingPortalConfigurations postBillingPortalConfigurations: PostBillingPortalConfigurations getBillingPortalConfigurationsConfiguration: GetBillingPortalConfigurationsConfiguration @@ -11577,6 +12782,16 @@ export type Implementation = { getCheckoutSessionsSession: GetCheckoutSessionsSession postCheckoutSessionsSessionExpire: PostCheckoutSessionsSessionExpire getCheckoutSessionsSessionLineItems: GetCheckoutSessionsSessionLineItems + getClimateOrders: GetClimateOrders + postClimateOrders: PostClimateOrders + getClimateOrdersOrder: GetClimateOrdersOrder + postClimateOrdersOrder: PostClimateOrdersOrder + postClimateOrdersOrderCancel: PostClimateOrdersOrderCancel + getClimateProducts: GetClimateProducts + getClimateProductsProduct: GetClimateProductsProduct + getClimateSuppliers: GetClimateSuppliers + getClimateSuppliersSupplier: GetClimateSuppliersSupplier + getConfirmationTokensConfirmationToken: GetConfirmationTokensConfirmationToken getCountrySpecs: GetCountrySpecs getCountrySpecsCountry: GetCountrySpecsCountry getCoupons: GetCoupons @@ -11592,6 +12807,7 @@ export type Implementation = { getCreditNotesId: GetCreditNotesId postCreditNotesId: PostCreditNotesId postCreditNotesIdVoid: PostCreditNotesIdVoid + postCustomerSessions: PostCustomerSessions getCustomers: GetCustomers postCustomers: PostCustomers getCustomersSearch: GetCustomersSearch @@ -11661,8 +12877,15 @@ export type Implementation = { postFinancialConnectionsAccountsAccountDisconnect: PostFinancialConnectionsAccountsAccountDisconnect getFinancialConnectionsAccountsAccountOwners: GetFinancialConnectionsAccountsAccountOwners postFinancialConnectionsAccountsAccountRefresh: PostFinancialConnectionsAccountsAccountRefresh + postFinancialConnectionsAccountsAccountSubscribe: PostFinancialConnectionsAccountsAccountSubscribe + postFinancialConnectionsAccountsAccountUnsubscribe: PostFinancialConnectionsAccountsAccountUnsubscribe postFinancialConnectionsSessions: PostFinancialConnectionsSessions getFinancialConnectionsSessionsSession: GetFinancialConnectionsSessionsSession + getFinancialConnectionsTransactions: GetFinancialConnectionsTransactions + getFinancialConnectionsTransactionsTransaction: GetFinancialConnectionsTransactionsTransaction + getForwardingRequests: GetForwardingRequests + postForwardingRequests: PostForwardingRequests + getForwardingRequestsId: GetForwardingRequestsId getIdentityVerificationReports: GetIdentityVerificationReports getIdentityVerificationReportsReport: GetIdentityVerificationReportsReport getIdentityVerificationSessions: GetIdentityVerificationSessions @@ -11686,6 +12909,7 @@ export type Implementation = { postInvoicesInvoice: PostInvoicesInvoice postInvoicesInvoiceFinalize: PostInvoicesInvoiceFinalize getInvoicesInvoiceLines: GetInvoicesInvoiceLines + postInvoicesInvoiceLinesLineItemId: PostInvoicesInvoiceLinesLineItemId postInvoicesInvoiceMarkUncollectible: PostInvoicesInvoiceMarkUncollectible postInvoicesInvoicePay: PostInvoicesInvoicePay postInvoicesInvoiceSend: PostInvoicesInvoiceSend @@ -11708,9 +12932,18 @@ export type Implementation = { getIssuingDisputesDispute: GetIssuingDisputesDispute postIssuingDisputesDispute: PostIssuingDisputesDispute postIssuingDisputesDisputeSubmit: PostIssuingDisputesDisputeSubmit + getIssuingPersonalizationDesigns: GetIssuingPersonalizationDesigns + postIssuingPersonalizationDesigns: PostIssuingPersonalizationDesigns + getIssuingPersonalizationDesignsPersonalizationDesign: GetIssuingPersonalizationDesignsPersonalizationDesign + postIssuingPersonalizationDesignsPersonalizationDesign: PostIssuingPersonalizationDesignsPersonalizationDesign + getIssuingPhysicalBundles: GetIssuingPhysicalBundles + getIssuingPhysicalBundlesPhysicalBundle: GetIssuingPhysicalBundlesPhysicalBundle getIssuingSettlements: GetIssuingSettlements getIssuingSettlementsSettlement: GetIssuingSettlementsSettlement postIssuingSettlementsSettlement: PostIssuingSettlementsSettlement + getIssuingTokens: GetIssuingTokens + getIssuingTokensToken: GetIssuingTokensToken + postIssuingTokensToken: PostIssuingTokensToken getIssuingTransactions: GetIssuingTransactions getIssuingTransactionsTransaction: GetIssuingTransactionsTransaction postIssuingTransactionsTransaction: PostIssuingTransactionsTransaction @@ -11857,6 +13090,10 @@ export type Implementation = { postSubscriptionsSubscriptionResume: PostSubscriptionsSubscriptionResume postTaxCalculations: PostTaxCalculations getTaxCalculationsCalculationLineItems: GetTaxCalculationsCalculationLineItems + getTaxRegistrations: GetTaxRegistrations + postTaxRegistrations: PostTaxRegistrations + getTaxRegistrationsId: GetTaxRegistrationsId + postTaxRegistrationsId: PostTaxRegistrationsId getTaxSettings: GetTaxSettings postTaxSettings: PostTaxSettings postTaxTransactionsCreateFromCalculation: PostTaxTransactionsCreateFromCalculation @@ -11865,6 +13102,10 @@ export type Implementation = { getTaxTransactionsTransactionLineItems: GetTaxTransactionsTransactionLineItems getTaxCodes: GetTaxCodes getTaxCodesId: GetTaxCodesId + getTaxIds: GetTaxIds + postTaxIds: PostTaxIds + deleteTaxIdsId: DeleteTaxIdsId + getTaxIdsId: GetTaxIdsId getTaxRates: GetTaxRates postTaxRates: PostTaxRates getTaxRatesTaxRate: GetTaxRatesTaxRate @@ -11890,6 +13131,7 @@ export type Implementation = { postTerminalReadersReaderProcessSetupIntent: PostTerminalReadersReaderProcessSetupIntent postTerminalReadersReaderRefundPayment: PostTerminalReadersReaderRefundPayment postTerminalReadersReaderSetReaderDisplay: PostTerminalReadersReaderSetReaderDisplay + postTestHelpersConfirmationTokens: PostTestHelpersConfirmationTokens postTestHelpersCustomersCustomerFundCashBalance: PostTestHelpersCustomersCustomerFundCashBalance postTestHelpersIssuingAuthorizations: PostTestHelpersIssuingAuthorizations postTestHelpersIssuingAuthorizationsAuthorizationCapture: PostTestHelpersIssuingAuthorizationsAuthorizationCapture @@ -11900,6 +13142,9 @@ export type Implementation = { postTestHelpersIssuingCardsCardShippingFail: PostTestHelpersIssuingCardsCardShippingFail postTestHelpersIssuingCardsCardShippingReturn: PostTestHelpersIssuingCardsCardShippingReturn postTestHelpersIssuingCardsCardShippingShip: PostTestHelpersIssuingCardsCardShippingShip + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate: PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate: PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject: PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject postTestHelpersIssuingTransactionsCreateForceCapture: PostTestHelpersIssuingTransactionsCreateForceCapture postTestHelpersIssuingTransactionsCreateUnlinkedRefund: PostTestHelpersIssuingTransactionsCreateUnlinkedRefund postTestHelpersIssuingTransactionsTransactionRefund: PostTestHelpersIssuingTransactionsTransactionRefund @@ -12033,6 +13278,12 @@ export function createRouter(implementation: Implementation): KoaRouter { const postAccountLinksBodySchema = z.object({ account: z.string(), collect: z.enum(["currently_due", "eventually_due"]).optional(), + collection_options: z + .object({ + fields: z.enum(["currently_due", "eventually_due"]), + future_requirements: z.enum(["include", "omit"]).optional(), + }) + .optional(), expand: z.array(z.string()).optional(), refresh_url: z.string().optional(), return_url: z.string().optional(), @@ -12084,7 +13335,60 @@ export function createRouter(implementation: Implementation): KoaRouter { const postAccountSessionsBodySchema = z.object({ account: z.string(), components: z.object({ - account_onboarding: z.object({ enabled: z.coerce.boolean() }).optional(), + account_onboarding: z + .object({ + enabled: z.coerce.boolean(), + features: z.object({}).optional(), + }) + .optional(), + documents: z + .object({ + enabled: z.coerce.boolean(), + features: z.object({}).optional(), + }) + .optional(), + payment_details: z + .object({ + enabled: z.coerce.boolean(), + features: z + .object({ + capture_payments: z.coerce.boolean().optional(), + destination_on_behalf_of_charge_management: z.coerce + .boolean() + .optional(), + dispute_management: z.coerce.boolean().optional(), + refund_management: z.coerce.boolean().optional(), + }) + .optional(), + }) + .optional(), + payments: z + .object({ + enabled: z.coerce.boolean(), + features: z + .object({ + capture_payments: z.coerce.boolean().optional(), + destination_on_behalf_of_charge_management: z.coerce + .boolean() + .optional(), + dispute_management: z.coerce.boolean().optional(), + refund_management: z.coerce.boolean().optional(), + }) + .optional(), + }) + .optional(), + payouts: z + .object({ + enabled: z.coerce.boolean(), + features: z + .object({ + edit_payout_schedule: z.coerce.boolean().optional(), + instant_payouts: z.coerce.boolean().optional(), + standard_payouts: z.coerce.boolean().optional(), + }) + .optional(), + }) + .optional(), }), expand: z.array(z.string()).optional(), }) @@ -12245,6 +13549,14 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), business_profile: z .object({ + annual_revenue: z + .object({ + amount: z.coerce.number(), + currency: z.string(), + fiscal_year_end: z.string(), + }) + .optional(), + estimated_worker_count: z.coerce.number().optional(), mcc: z.string().optional(), monthly_estimated_revenue: z .object({ amount: z.coerce.number(), currency: z.string() }) @@ -12281,6 +13593,9 @@ export function createRouter(implementation: Implementation): KoaRouter { afterpay_clearpay_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), + amazon_pay_payments: z + .object({ requested: z.coerce.boolean().optional() }) + .optional(), au_becs_debit_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), @@ -12344,6 +13659,9 @@ export function createRouter(implementation: Implementation): KoaRouter { link_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), + mobilepay_payments: z + .object({ requested: z.coerce.boolean().optional() }) + .optional(), oxxo_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), @@ -12356,12 +13674,18 @@ export function createRouter(implementation: Implementation): KoaRouter { promptpay_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), + revolut_pay_payments: z + .object({ requested: z.coerce.boolean().optional() }) + .optional(), sepa_debit_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), sofort_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), + swish_payments: z + .object({ requested: z.coerce.boolean().optional() }) + .optional(), tax_reporting_us_1099_k: z .object({ requested: z.coerce.boolean().optional() }) .optional(), @@ -12451,6 +13775,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "public_company", "public_corporation", "public_partnership", + "registered_charity", "single_member_llc", "sole_establishment", "sole_proprietorship", @@ -12576,6 +13901,17 @@ export function createRouter(implementation: Implementation): KoaRouter { state: z.string().optional(), }) .optional(), + relationship: z + .object({ + director: z.coerce.boolean().optional(), + executive: z.coerce.boolean().optional(), + owner: z.coerce.boolean().optional(), + percent_ownership: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + title: z.string().optional(), + }) + .optional(), ssn_last_4: z.string().optional(), verification: z .object({ @@ -12598,6 +13934,9 @@ export function createRouter(implementation: Implementation): KoaRouter { metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), settings: z .object({ + bacs_debit_payments: z + .object({ display_name: z.string().optional() }) + .optional(), branding: z .object({ icon: z.string().optional(), @@ -12859,6 +14198,14 @@ export function createRouter(implementation: Implementation): KoaRouter { account_token: z.string().optional(), business_profile: z .object({ + annual_revenue: z + .object({ + amount: z.coerce.number(), + currency: z.string(), + fiscal_year_end: z.string(), + }) + .optional(), + estimated_worker_count: z.coerce.number().optional(), mcc: z.string().optional(), monthly_estimated_revenue: z .object({ amount: z.coerce.number(), currency: z.string() }) @@ -12895,6 +14242,9 @@ export function createRouter(implementation: Implementation): KoaRouter { afterpay_clearpay_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), + amazon_pay_payments: z + .object({ requested: z.coerce.boolean().optional() }) + .optional(), au_becs_debit_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), @@ -12958,6 +14308,9 @@ export function createRouter(implementation: Implementation): KoaRouter { link_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), + mobilepay_payments: z + .object({ requested: z.coerce.boolean().optional() }) + .optional(), oxxo_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), @@ -12970,12 +14323,18 @@ export function createRouter(implementation: Implementation): KoaRouter { promptpay_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), + revolut_pay_payments: z + .object({ requested: z.coerce.boolean().optional() }) + .optional(), sepa_debit_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), sofort_payments: z .object({ requested: z.coerce.boolean().optional() }) .optional(), + swish_payments: z + .object({ requested: z.coerce.boolean().optional() }) + .optional(), tax_reporting_us_1099_k: z .object({ requested: z.coerce.boolean().optional() }) .optional(), @@ -13065,6 +14424,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "public_company", "public_corporation", "public_partnership", + "registered_charity", "single_member_llc", "sole_establishment", "sole_proprietorship", @@ -13189,6 +14549,17 @@ export function createRouter(implementation: Implementation): KoaRouter { state: z.string().optional(), }) .optional(), + relationship: z + .object({ + director: z.coerce.boolean().optional(), + executive: z.coerce.boolean().optional(), + owner: z.coerce.boolean().optional(), + percent_ownership: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + title: z.string().optional(), + }) + .optional(), ssn_last_4: z.string().optional(), verification: z .object({ @@ -13211,6 +14582,9 @@ export function createRouter(implementation: Implementation): KoaRouter { metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), settings: z .object({ + bacs_debit_payments: z + .object({ display_name: z.string().optional() }) + .optional(), branding: z .object({ icon: z.string().optional(), @@ -13247,6 +14621,13 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), + invoices: z + .object({ + default_account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + }) + .optional(), payments: z .object({ statement_descriptor: z.string().optional(), @@ -13864,6 +15245,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.coerce.number().optional(), + object: z.enum(["bank_account", "card"]).optional(), starting_after: z.string().optional(), }) @@ -14307,6 +15689,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .object({ director: z.coerce.boolean().optional(), executive: z.coerce.boolean().optional(), + legal_guardian: z.coerce.boolean().optional(), owner: z.coerce.boolean().optional(), representative: z.coerce.boolean().optional(), }) @@ -14389,6 +15772,17 @@ export function createRouter(implementation: Implementation): KoaRouter { const postAccountsAccountPeopleBodySchema = z .object({ + additional_tos_acceptances: z + .object({ + account: z + .object({ + date: z.coerce.number().optional(), + ip: z.string().optional(), + user_agent: z.union([z.string(), z.enum([""])]).optional(), + }) + .optional(), + }) + .optional(), address: z .object({ city: z.string().optional(), @@ -14484,6 +15878,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .object({ director: z.coerce.boolean().optional(), executive: z.coerce.boolean().optional(), + legal_guardian: z.coerce.boolean().optional(), owner: z.coerce.boolean().optional(), percent_ownership: z .union([z.coerce.number(), z.enum([""])]) @@ -14690,271 +16085,17 @@ export function createRouter(implementation: Implementation): KoaRouter { const postAccountsAccountPeoplePersonBodySchema = z .object({ - address: z - .object({ - city: z.string().optional(), - country: z.string().optional(), - line1: z.string().optional(), - line2: z.string().optional(), - postal_code: z.string().optional(), - state: z.string().optional(), - }) - .optional(), - address_kana: z - .object({ - city: z.string().optional(), - country: z.string().optional(), - line1: z.string().optional(), - line2: z.string().optional(), - postal_code: z.string().optional(), - state: z.string().optional(), - town: z.string().optional(), - }) - .optional(), - address_kanji: z - .object({ - city: z.string().optional(), - country: z.string().optional(), - line1: z.string().optional(), - line2: z.string().optional(), - postal_code: z.string().optional(), - state: z.string().optional(), - town: z.string().optional(), - }) - .optional(), - dob: z - .union([ - z.object({ - day: z.coerce.number(), - month: z.coerce.number(), - year: z.coerce.number(), - }), - z.enum([""]), - ]) - .optional(), - documents: z - .object({ - company_authorization: z - .object({ - files: z.array(z.union([z.string(), z.enum([""])])).optional(), - }) - .optional(), - passport: z - .object({ - files: z.array(z.union([z.string(), z.enum([""])])).optional(), - }) - .optional(), - visa: z - .object({ - files: z.array(z.union([z.string(), z.enum([""])])).optional(), - }) - .optional(), - }) - .optional(), - email: z.string().optional(), - expand: z.array(z.string()).optional(), - first_name: z.string().optional(), - first_name_kana: z.string().optional(), - first_name_kanji: z.string().optional(), - full_name_aliases: z - .union([z.array(z.string()), z.enum([""])]) - .optional(), - gender: z.string().optional(), - id_number: z.string().optional(), - id_number_secondary: z.string().optional(), - last_name: z.string().optional(), - last_name_kana: z.string().optional(), - last_name_kanji: z.string().optional(), - maiden_name: z.string().optional(), - metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), - nationality: z.string().optional(), - person_token: z.string().optional(), - phone: z.string().optional(), - political_exposure: z.string().optional(), - registered_address: z + additional_tos_acceptances: z .object({ - city: z.string().optional(), - country: z.string().optional(), - line1: z.string().optional(), - line2: z.string().optional(), - postal_code: z.string().optional(), - state: z.string().optional(), - }) - .optional(), - relationship: z - .object({ - director: z.coerce.boolean().optional(), - executive: z.coerce.boolean().optional(), - owner: z.coerce.boolean().optional(), - percent_ownership: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - representative: z.coerce.boolean().optional(), - title: z.string().optional(), - }) - .optional(), - ssn_last_4: z.string().optional(), - verification: z - .object({ - additional_document: z + account: z .object({ - back: z.string().optional(), - front: z.string().optional(), - }) - .optional(), - document: z - .object({ - back: z.string().optional(), - front: z.string().optional(), + date: z.coerce.number().optional(), + ip: z.string().optional(), + user_agent: z.union([z.string(), z.enum([""])]).optional(), }) .optional(), }) .optional(), - }) - .optional() - - const postAccountsAccountPeoplePersonResponseValidator = - responseValidationFactory([["200", s_person]], s_error) - - router.post( - "postAccountsAccountPeoplePerson", - "/v1/accounts/:account/people/:person", - async (ctx, next) => { - const input = { - params: parseRequestInput( - postAccountsAccountPeoplePersonParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: undefined, - body: parseRequestInput( - postAccountsAccountPeoplePersonBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - withDefault(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .postAccountsAccountPeoplePerson(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = postAccountsAccountPeoplePersonResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const getAccountsAccountPersonsParamSchema = z.object({ account: z.string() }) - - const getAccountsAccountPersonsQuerySchema = z.object({ - ending_before: z.string().optional(), - expand: z.array(z.string()).optional(), - limit: z.coerce.number().optional(), - relationship: z - .object({ - director: z.coerce.boolean().optional(), - executive: z.coerce.boolean().optional(), - owner: z.coerce.boolean().optional(), - representative: z.coerce.boolean().optional(), - }) - .optional(), - starting_after: z.string().optional(), - }) - - const getAccountsAccountPersonsBodySchema = z.object({}).optional() - - const getAccountsAccountPersonsResponseValidator = responseValidationFactory( - [ - [ - "200", - z.object({ - data: z.array(z.lazy(() => s_person)), - has_more: z.coerce.boolean(), - object: z.enum(["list"]), - url: z.string(), - }), - ], - ], - s_error, - ) - - router.get( - "getAccountsAccountPersons", - "/v1/accounts/:account/persons", - async (ctx, next) => { - const input = { - params: parseRequestInput( - getAccountsAccountPersonsParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), - query: parseRequestInput( - getAccountsAccountPersonsQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), - body: parseRequestInput( - getAccountsAccountPersonsBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), - } - - const responder = { - with200() { - return new KoaRuntimeResponse<{ - data: t_person[] - has_more: boolean - object: "list" - url: string - }>(200) - }, - withDefault(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .getAccountsAccountPersons(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = getAccountsAccountPersonsResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const postAccountsAccountPersonsParamSchema = z.object({ - account: z.string(), - }) - - const postAccountsAccountPersonsBodySchema = z - .object({ address: z .object({ city: z.string().optional(), @@ -15050,6 +16191,285 @@ export function createRouter(implementation: Implementation): KoaRouter { .object({ director: z.coerce.boolean().optional(), executive: z.coerce.boolean().optional(), + legal_guardian: z.coerce.boolean().optional(), + owner: z.coerce.boolean().optional(), + percent_ownership: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + representative: z.coerce.boolean().optional(), + title: z.string().optional(), + }) + .optional(), + ssn_last_4: z.string().optional(), + verification: z + .object({ + additional_document: z + .object({ + back: z.string().optional(), + front: z.string().optional(), + }) + .optional(), + document: z + .object({ + back: z.string().optional(), + front: z.string().optional(), + }) + .optional(), + }) + .optional(), + }) + .optional() + + const postAccountsAccountPeoplePersonResponseValidator = + responseValidationFactory([["200", s_person]], s_error) + + router.post( + "postAccountsAccountPeoplePerson", + "/v1/accounts/:account/people/:person", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postAccountsAccountPeoplePersonParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postAccountsAccountPeoplePersonBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postAccountsAccountPeoplePerson(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postAccountsAccountPeoplePersonResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getAccountsAccountPersonsParamSchema = z.object({ account: z.string() }) + + const getAccountsAccountPersonsQuerySchema = z.object({ + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + relationship: z + .object({ + director: z.coerce.boolean().optional(), + executive: z.coerce.boolean().optional(), + legal_guardian: z.coerce.boolean().optional(), + owner: z.coerce.boolean().optional(), + representative: z.coerce.boolean().optional(), + }) + .optional(), + starting_after: z.string().optional(), + }) + + const getAccountsAccountPersonsBodySchema = z.object({}).optional() + + const getAccountsAccountPersonsResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(z.lazy(() => s_person)), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get( + "getAccountsAccountPersons", + "/v1/accounts/:account/persons", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getAccountsAccountPersonsParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getAccountsAccountPersonsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getAccountsAccountPersonsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_person[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getAccountsAccountPersons(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getAccountsAccountPersonsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postAccountsAccountPersonsParamSchema = z.object({ + account: z.string(), + }) + + const postAccountsAccountPersonsBodySchema = z + .object({ + additional_tos_acceptances: z + .object({ + account: z + .object({ + date: z.coerce.number().optional(), + ip: z.string().optional(), + user_agent: z.union([z.string(), z.enum([""])]).optional(), + }) + .optional(), + }) + .optional(), + address: z + .object({ + city: z.string().optional(), + country: z.string().optional(), + line1: z.string().optional(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional(), + }) + .optional(), + address_kana: z + .object({ + city: z.string().optional(), + country: z.string().optional(), + line1: z.string().optional(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional(), + town: z.string().optional(), + }) + .optional(), + address_kanji: z + .object({ + city: z.string().optional(), + country: z.string().optional(), + line1: z.string().optional(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional(), + town: z.string().optional(), + }) + .optional(), + dob: z + .union([ + z.object({ + day: z.coerce.number(), + month: z.coerce.number(), + year: z.coerce.number(), + }), + z.enum([""]), + ]) + .optional(), + documents: z + .object({ + company_authorization: z + .object({ + files: z.array(z.union([z.string(), z.enum([""])])).optional(), + }) + .optional(), + passport: z + .object({ + files: z.array(z.union([z.string(), z.enum([""])])).optional(), + }) + .optional(), + visa: z + .object({ + files: z.array(z.union([z.string(), z.enum([""])])).optional(), + }) + .optional(), + }) + .optional(), + email: z.string().optional(), + expand: z.array(z.string()).optional(), + first_name: z.string().optional(), + first_name_kana: z.string().optional(), + first_name_kanji: z.string().optional(), + full_name_aliases: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + gender: z.string().optional(), + id_number: z.string().optional(), + id_number_secondary: z.string().optional(), + last_name: z.string().optional(), + last_name_kana: z.string().optional(), + last_name_kanji: z.string().optional(), + maiden_name: z.string().optional(), + metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + nationality: z.string().optional(), + person_token: z.string().optional(), + phone: z.string().optional(), + political_exposure: z.string().optional(), + registered_address: z + .object({ + city: z.string().optional(), + country: z.string().optional(), + line1: z.string().optional(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional(), + }) + .optional(), + relationship: z + .object({ + director: z.coerce.boolean().optional(), + executive: z.coerce.boolean().optional(), + legal_guardian: z.coerce.boolean().optional(), owner: z.coerce.boolean().optional(), percent_ownership: z .union([z.coerce.number(), z.enum([""])]) @@ -15256,6 +16676,17 @@ export function createRouter(implementation: Implementation): KoaRouter { const postAccountsAccountPersonsPersonBodySchema = z .object({ + additional_tos_acceptances: z + .object({ + account: z + .object({ + date: z.coerce.number().optional(), + ip: z.string().optional(), + user_agent: z.union([z.string(), z.enum([""])]).optional(), + }) + .optional(), + }) + .optional(), address: z .object({ city: z.string().optional(), @@ -15351,6 +16782,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .object({ director: z.coerce.boolean().optional(), executive: z.coerce.boolean().optional(), + legal_guardian: z.coerce.boolean().optional(), owner: z.coerce.boolean().optional(), percent_ownership: z .union([z.coerce.number(), z.enum([""])]) @@ -16787,6 +18219,555 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const postBillingMeterEventAdjustmentsBodySchema = z.object({ + cancel: z.object({ identifier: z.string() }), + event_name: z.string(), + expand: z.array(z.string()).optional(), + type: z.enum(["cancel"]).optional(), + }) + + const postBillingMeterEventAdjustmentsResponseValidator = + responseValidationFactory( + [["200", s_billing_meter_event_adjustment]], + s_error, + ) + + router.post( + "postBillingMeterEventAdjustments", + "/v1/billing/meter_event_adjustments", + async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postBillingMeterEventAdjustmentsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postBillingMeterEventAdjustments(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postBillingMeterEventAdjustmentsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postBillingMeterEventsBodySchema = z.object({ + event_name: z.string(), + expand: z.array(z.string()).optional(), + identifier: z.string().optional(), + payload: z.record(z.string()), + timestamp: z.coerce.number(), + }) + + const postBillingMeterEventsResponseValidator = responseValidationFactory( + [["200", s_billing_meter_event]], + s_error, + ) + + router.post( + "postBillingMeterEvents", + "/v1/billing/meter_events", + async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postBillingMeterEventsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postBillingMeterEvents(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postBillingMeterEventsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getBillingMetersQuerySchema = z.object({ + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + starting_after: z.string().optional(), + status: z.enum(["active", "inactive"]).optional(), + }) + + const getBillingMetersBodySchema = z.object({}).optional() + + const getBillingMetersResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(s_billing_meter), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get("getBillingMeters", "/v1/billing/meters", async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getBillingMetersQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getBillingMetersBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_billing_meter[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getBillingMeters(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getBillingMetersResponseValidator(status, body) + ctx.status = status + return next() + }) + + const postBillingMetersBodySchema = z.object({ + customer_mapping: z + .object({ event_payload_key: z.string(), type: z.enum(["by_id"]) }) + .optional(), + default_aggregation: z.object({ formula: z.enum(["count", "sum"]) }), + display_name: z.string(), + event_name: z.string(), + event_time_window: z.enum(["day", "hour"]).optional(), + expand: z.array(z.string()).optional(), + value_settings: z.object({ event_payload_key: z.string() }).optional(), + }) + + const postBillingMetersResponseValidator = responseValidationFactory( + [["200", s_billing_meter]], + s_error, + ) + + router.post("postBillingMeters", "/v1/billing/meters", async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postBillingMetersBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postBillingMeters(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postBillingMetersResponseValidator(status, body) + ctx.status = status + return next() + }) + + const getBillingMetersIdParamSchema = z.object({ id: z.string() }) + + const getBillingMetersIdQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getBillingMetersIdBodySchema = z.object({}).optional() + + const getBillingMetersIdResponseValidator = responseValidationFactory( + [["200", s_billing_meter]], + s_error, + ) + + router.get( + "getBillingMetersId", + "/v1/billing/meters/:id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getBillingMetersIdParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getBillingMetersIdQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getBillingMetersIdBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getBillingMetersId(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getBillingMetersIdResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postBillingMetersIdParamSchema = z.object({ id: z.string() }) + + const postBillingMetersIdBodySchema = z + .object({ + display_name: z.string().optional(), + expand: z.array(z.string()).optional(), + }) + .optional() + + const postBillingMetersIdResponseValidator = responseValidationFactory( + [["200", s_billing_meter]], + s_error, + ) + + router.post( + "postBillingMetersId", + "/v1/billing/meters/:id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postBillingMetersIdParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postBillingMetersIdBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postBillingMetersId(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postBillingMetersIdResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postBillingMetersIdDeactivateParamSchema = z.object({ id: z.string() }) + + const postBillingMetersIdDeactivateBodySchema = z + .object({ expand: z.array(z.string()).optional() }) + .optional() + + const postBillingMetersIdDeactivateResponseValidator = + responseValidationFactory([["200", s_billing_meter]], s_error) + + router.post( + "postBillingMetersIdDeactivate", + "/v1/billing/meters/:id/deactivate", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postBillingMetersIdDeactivateParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postBillingMetersIdDeactivateBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postBillingMetersIdDeactivate(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postBillingMetersIdDeactivateResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getBillingMetersIdEventSummariesParamSchema = z.object({ + id: z.string(), + }) + + const getBillingMetersIdEventSummariesQuerySchema = z.object({ + customer: z.string(), + end_time: z.coerce.number(), + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + start_time: z.coerce.number(), + starting_after: z.string().optional(), + value_grouping_window: z.enum(["hour"]).optional(), + }) + + const getBillingMetersIdEventSummariesBodySchema = z.object({}).optional() + + const getBillingMetersIdEventSummariesResponseValidator = + responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(s_billing_meter_event_summary), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get( + "getBillingMetersIdEventSummaries", + "/v1/billing/meters/:id/event_summaries", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getBillingMetersIdEventSummariesParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getBillingMetersIdEventSummariesQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getBillingMetersIdEventSummariesBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_billing_meter_event_summary[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getBillingMetersIdEventSummaries(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getBillingMetersIdEventSummariesResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postBillingMetersIdReactivateParamSchema = z.object({ id: z.string() }) + + const postBillingMetersIdReactivateBodySchema = z + .object({ expand: z.array(z.string()).optional() }) + .optional() + + const postBillingMetersIdReactivateResponseValidator = + responseValidationFactory([["200", s_billing_meter]], s_error) + + router.post( + "postBillingMetersIdReactivate", + "/v1/billing/meters/:id/reactivate", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postBillingMetersIdReactivateParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postBillingMetersIdReactivateBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postBillingMetersIdReactivate(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postBillingMetersIdReactivateResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + const getBillingPortalConfigurationsQuerySchema = z.object({ active: z.coerce.boolean().optional(), ending_before: z.string().optional(), @@ -16926,9 +18907,6 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), - subscription_pause: z - .object({ enabled: z.coerce.boolean().optional() }) - .optional(), subscription_update: z .object({ default_allowed_updates: z.union([ @@ -17142,9 +19120,6 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), - subscription_pause: z - .object({ enabled: z.coerce.boolean().optional() }) - .optional(), subscription_update: z .object({ default_allowed_updates: z @@ -18417,6 +20392,17 @@ export function createRouter(implementation: Implementation): KoaRouter { ) const getCheckoutSessionsQuerySchema = z.object({ + created: z + .union([ + z.object({ + gt: z.coerce.number().optional(), + gte: z.coerce.number().optional(), + lt: z.coerce.number().optional(), + lte: z.coerce.number().optional(), + }), + z.coerce.number(), + ]) + .optional(), customer: z.string().optional(), customer_details: z.object({ email: z.string() }).optional(), ending_before: z.string().optional(), @@ -18425,6 +20411,7 @@ export function createRouter(implementation: Implementation): KoaRouter { payment_intent: z.string().optional(), payment_link: z.string().optional(), starting_after: z.string().optional(), + status: z.enum(["complete", "expired", "open"]).optional(), subscription: z.string().optional(), }) @@ -18495,885 +20482,1334 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) - const postCheckoutSessionsBodySchema = z.object({ - after_expiration: z - .object({ - recovery: z - .object({ - allow_promotion_codes: z.coerce.boolean().optional(), - enabled: z.coerce.boolean(), - }) - .optional(), - }) - .optional(), - allow_promotion_codes: z.coerce.boolean().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), - billing_address_collection: z.enum(["auto", "required"]).optional(), - cancel_url: z.string().optional(), - client_reference_id: z.string().optional(), - consent_collection: z - .object({ - promotions: z.enum(["auto", "none"]).optional(), - terms_of_service: z.enum(["none", "required"]).optional(), - }) - .optional(), - currency: z.string().optional(), - custom_fields: z - .array( - z.object({ - dropdown: z + const postCheckoutSessionsBodySchema = z + .object({ + after_expiration: z + .object({ + recovery: z .object({ - options: z.array( - z.object({ label: z.string(), value: z.string() }), - ), + allow_promotion_codes: z.coerce.boolean().optional(), + enabled: z.coerce.boolean(), }) .optional(), - key: z.string(), - label: z.object({ custom: z.string(), type: z.enum(["custom"]) }), - numeric: z + }) + .optional(), + allow_promotion_codes: z.coerce.boolean().optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z .object({ - maximum_length: z.coerce.number().optional(), - minimum_length: z.coerce.number().optional(), + account: z.string().optional(), + type: z.enum(["account", "self"]), }) .optional(), - optional: z.coerce.boolean().optional(), - text: z - .object({ - maximum_length: z.coerce.number().optional(), - minimum_length: z.coerce.number().optional(), - }) + }) + .optional(), + billing_address_collection: z.enum(["auto", "required"]).optional(), + cancel_url: z.string().optional(), + client_reference_id: z.string().optional(), + consent_collection: z + .object({ + payment_method_reuse_agreement: z + .object({ position: z.enum(["auto", "hidden"]) }) .optional(), - type: z.enum(["dropdown", "numeric", "text"]), - }), - ) - .optional(), - custom_text: z - .object({ - shipping_address: z - .union([z.object({ message: z.string() }), z.enum([""])]) - .optional(), - submit: z - .union([z.object({ message: z.string() }), z.enum([""])]) - .optional(), - terms_of_service_acceptance: z - .union([z.object({ message: z.string() }), z.enum([""])]) - .optional(), - }) - .optional(), - customer: z.string().optional(), - customer_creation: z.enum(["always", "if_required"]).optional(), - customer_email: z.string().optional(), - customer_update: z - .object({ - address: z.enum(["auto", "never"]).optional(), - name: z.enum(["auto", "never"]).optional(), - shipping: z.enum(["auto", "never"]).optional(), - }) - .optional(), - discounts: z - .array( - z.object({ - coupon: z.string().optional(), - promotion_code: z.string().optional(), - }), - ) - .optional(), - expand: z.array(z.string()).optional(), - expires_at: z.coerce.number().optional(), - invoice_creation: z - .object({ - enabled: z.coerce.boolean(), - invoice_data: z - .object({ - account_tax_ids: z - .union([z.array(z.string()), z.enum([""])]) + promotions: z.enum(["auto", "none"]).optional(), + terms_of_service: z.enum(["none", "required"]).optional(), + }) + .optional(), + currency: z.string().optional(), + custom_fields: z + .array( + z.object({ + dropdown: z + .object({ + options: z.array( + z.object({ label: z.string(), value: z.string() }), + ), + }) .optional(), - custom_fields: z - .union([ - z.array(z.object({ name: z.string(), value: z.string() })), - z.enum([""]), - ]) + key: z.string(), + label: z.object({ custom: z.string(), type: z.enum(["custom"]) }), + numeric: z + .object({ + maximum_length: z.coerce.number().optional(), + minimum_length: z.coerce.number().optional(), + }) .optional(), - description: z.string().optional(), - footer: z.string().optional(), - metadata: z.record(z.string()).optional(), - rendering_options: z - .union([ - z.object({ - amount_tax_display: z - .enum(["", "exclude_tax", "include_inclusive_tax"]) - .optional(), - }), - z.enum([""]), - ]) + optional: z.coerce.boolean().optional(), + text: z + .object({ + maximum_length: z.coerce.number().optional(), + minimum_length: z.coerce.number().optional(), + }) .optional(), - }) - .optional(), - }) - .optional(), - line_items: z - .array( - z.object({ - adjustable_quantity: z - .object({ - enabled: z.coerce.boolean(), - maximum: z.coerce.number().optional(), - minimum: z.coerce.number().optional(), - }) + type: z.enum(["dropdown", "numeric", "text"]), + }), + ) + .optional(), + custom_text: z + .object({ + after_submit: z + .union([z.object({ message: z.string() }), z.enum([""])]) .optional(), - dynamic_tax_rates: z.array(z.string()).optional(), - price: z.string().optional(), - price_data: z + shipping_address: z + .union([z.object({ message: z.string() }), z.enum([""])]) + .optional(), + submit: z + .union([z.object({ message: z.string() }), z.enum([""])]) + .optional(), + terms_of_service_acceptance: z + .union([z.object({ message: z.string() }), z.enum([""])]) + .optional(), + }) + .optional(), + customer: z.string().optional(), + customer_creation: z.enum(["always", "if_required"]).optional(), + customer_email: z.string().optional(), + customer_update: z + .object({ + address: z.enum(["auto", "never"]).optional(), + name: z.enum(["auto", "never"]).optional(), + shipping: z.enum(["auto", "never"]).optional(), + }) + .optional(), + discounts: z + .array( + z.object({ + coupon: z.string().optional(), + promotion_code: z.string().optional(), + }), + ) + .optional(), + expand: z.array(z.string()).optional(), + expires_at: z.coerce.number().optional(), + invoice_creation: z + .object({ + enabled: z.coerce.boolean(), + invoice_data: z .object({ - currency: z.string(), - product: z.string().optional(), - product_data: z - .object({ - description: z.string().optional(), - images: z.array(z.string()).optional(), - metadata: z.record(z.string()).optional(), - name: z.string(), - tax_code: z.string().optional(), - }) + account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + custom_fields: z + .union([ + z.array(z.object({ name: z.string(), value: z.string() })), + z.enum([""]), + ]) .optional(), - recurring: z + description: z.string().optional(), + footer: z.string().optional(), + issuer: z .object({ - interval: z.enum(["day", "month", "week", "year"]), - interval_count: z.coerce.number().optional(), + account: z.string().optional(), + type: z.enum(["account", "self"]), }) .optional(), - tax_behavior: z - .enum(["exclusive", "inclusive", "unspecified"]) + metadata: z.record(z.string()).optional(), + rendering_options: z + .union([ + z.object({ + amount_tax_display: z + .enum(["", "exclude_tax", "include_inclusive_tax"]) + .optional(), + }), + z.enum([""]), + ]) .optional(), - unit_amount: z.coerce.number().optional(), - unit_amount_decimal: z.string().optional(), }) .optional(), - quantity: z.coerce.number().optional(), - tax_rates: z.array(z.string()).optional(), - }), - ) - .optional(), - locale: z - .enum([ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-GB", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", - ]) - .optional(), - metadata: z.record(z.string()).optional(), - mode: z.enum(["payment", "setup", "subscription"]).optional(), - payment_intent_data: z - .object({ - application_fee_amount: z.coerce.number().optional(), - capture_method: z - .enum(["automatic", "automatic_async", "manual"]) - .optional(), - description: z.string().optional(), - metadata: z.record(z.string()).optional(), - on_behalf_of: z.string().optional(), - receipt_email: z.string().optional(), - setup_future_usage: z.enum(["off_session", "on_session"]).optional(), - shipping: z - .object({ - address: z.object({ - city: z.string().optional(), - country: z.string().optional(), - line1: z.string(), - line2: z.string().optional(), - postal_code: z.string().optional(), - state: z.string().optional(), - }), - carrier: z.string().optional(), - name: z.string(), - phone: z.string().optional(), - tracking_number: z.string().optional(), - }) - .optional(), - statement_descriptor: z.string().optional(), - statement_descriptor_suffix: z.string().optional(), - transfer_data: z - .object({ - amount: z.coerce.number().optional(), - destination: z.string(), - }) - .optional(), - transfer_group: z.string().optional(), - }) - .optional(), - payment_method_collection: z.enum(["always", "if_required"]).optional(), - payment_method_configuration: z.string().optional(), - payment_method_options: z - .object({ - acss_debit: z - .object({ - currency: z.enum(["cad", "usd"]).optional(), - mandate_options: z + }) + .optional(), + line_items: z + .array( + z.object({ + adjustable_quantity: z .object({ - custom_mandate_url: z - .union([z.string(), z.enum([""])]) - .optional(), - default_for: z - .array(z.enum(["invoice", "subscription"])) - .optional(), - interval_description: z.string().optional(), - payment_schedule: z - .enum(["combined", "interval", "sporadic"]) - .optional(), - transaction_type: z.enum(["business", "personal"]).optional(), + enabled: z.coerce.boolean(), + maximum: z.coerce.number().optional(), + minimum: z.coerce.number().optional(), }) .optional(), - setup_future_usage: z - .enum(["none", "off_session", "on_session"]) - .optional(), - verification_method: z - .enum(["automatic", "instant", "microdeposits"]) - .optional(), - }) - .optional(), - affirm: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - afterpay_clearpay: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - alipay: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - au_becs_debit: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - bacs_debit: z - .object({ - setup_future_usage: z - .enum(["none", "off_session", "on_session"]) - .optional(), - }) - .optional(), - bancontact: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - boleto: z - .object({ - expires_after_days: z.coerce.number().optional(), - setup_future_usage: z - .enum(["none", "off_session", "on_session"]) - .optional(), - }) - .optional(), - card: z - .object({ - installments: z - .object({ enabled: z.coerce.boolean().optional() }) - .optional(), - setup_future_usage: z - .enum(["off_session", "on_session"]) - .optional(), - statement_descriptor_suffix_kana: z.string().optional(), - statement_descriptor_suffix_kanji: z.string().optional(), - }) - .optional(), - cashapp: z - .object({ - setup_future_usage: z - .enum(["none", "off_session", "on_session"]) - .optional(), - }) - .optional(), - customer_balance: z - .object({ - bank_transfer: z + dynamic_tax_rates: z.array(z.string()).optional(), + price: z.string().optional(), + price_data: z .object({ - eu_bank_transfer: z.object({ country: z.string() }).optional(), - requested_address_types: z - .array( - z.enum([ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ]), - ) + currency: z.string(), + product: z.string().optional(), + product_data: z + .object({ + description: z.string().optional(), + images: z.array(z.string()).optional(), + metadata: z.record(z.string()).optional(), + name: z.string(), + tax_code: z.string().optional(), + }) .optional(), - type: z.enum([ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ]), - }) - .optional(), - funding_type: z.enum(["bank_transfer"]).optional(), - setup_future_usage: z.enum(["none"]).optional(), - }) - .optional(), - eps: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - fpx: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - giropay: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - grabpay: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - ideal: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - klarna: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - konbini: z - .object({ - expires_after_days: z.coerce.number().optional(), - setup_future_usage: z.enum(["none"]).optional(), - }) - .optional(), - link: z - .object({ - setup_future_usage: z.enum(["none", "off_session"]).optional(), - }) - .optional(), - oxxo: z - .object({ - expires_after_days: z.coerce.number().optional(), - setup_future_usage: z.enum(["none"]).optional(), - }) - .optional(), - p24: z - .object({ - setup_future_usage: z.enum(["none"]).optional(), - tos_shown_and_accepted: z.coerce.boolean().optional(), - }) - .optional(), - paynow: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - paypal: z - .object({ - capture_method: z.enum(["", "manual"]).optional(), - preferred_locale: z - .enum([ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ]) - .optional(), - reference: z.string().optional(), - risk_correlation_id: z.string().optional(), - setup_future_usage: z.enum(["", "none", "off_session"]).optional(), - }) - .optional(), - pix: z - .object({ expires_after_seconds: z.coerce.number().optional() }) - .optional(), - sepa_debit: z - .object({ - setup_future_usage: z - .enum(["none", "off_session", "on_session"]) - .optional(), - }) - .optional(), - sofort: z - .object({ setup_future_usage: z.enum(["none"]).optional() }) - .optional(), - us_bank_account: z - .object({ - financial_connections: z - .object({ - permissions: z - .array( - z.enum([ - "balances", - "ownership", - "payment_method", - "transactions", - ]), - ) + recurring: z + .object({ + interval: z.enum(["day", "month", "week", "year"]), + interval_count: z.coerce.number().optional(), + }) + .optional(), + tax_behavior: z + .enum(["exclusive", "inclusive", "unspecified"]) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + unit_amount: z.coerce.number().optional(), + unit_amount_decimal: z.string().optional(), }) .optional(), - setup_future_usage: z - .enum(["none", "off_session", "on_session"]) - .optional(), - verification_method: z.enum(["automatic", "instant"]).optional(), - }) - .optional(), - wechat_pay: z - .object({ - app_id: z.string().optional(), - client: z.enum(["android", "ios", "web"]), - setup_future_usage: z.enum(["none"]).optional(), - }) - .optional(), - }) - .optional(), - payment_method_types: z - .array( - z.enum([ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "blik", - "boleto", - "card", - "cashapp", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "oxxo", - "p24", - "paynow", - "paypal", - "pix", - "promptpay", - "sepa_debit", - "sofort", - "us_bank_account", - "wechat_pay", - "zip", - ]), - ) - .optional(), - phone_number_collection: z - .object({ enabled: z.coerce.boolean() }) - .optional(), - setup_intent_data: z - .object({ - description: z.string().optional(), - metadata: z.record(z.string()).optional(), - on_behalf_of: z.string().optional(), - }) - .optional(), - shipping_address_collection: z - .object({ - allowed_countries: z.array( - z.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", - ]), - ), - }) - .optional(), - shipping_options: z - .array( - z.object({ - shipping_rate: z.string().optional(), - shipping_rate_data: z + quantity: z.coerce.number().optional(), + tax_rates: z.array(z.string()).optional(), + }), + ) + .optional(), + locale: z + .enum([ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + ]) + .optional(), + metadata: z.record(z.string()).optional(), + mode: z.enum(["payment", "setup", "subscription"]).optional(), + payment_intent_data: z + .object({ + application_fee_amount: z.coerce.number().optional(), + capture_method: z + .enum(["automatic", "automatic_async", "manual"]) + .optional(), + description: z.string().optional(), + metadata: z.record(z.string()).optional(), + on_behalf_of: z.string().optional(), + receipt_email: z.string().optional(), + setup_future_usage: z.enum(["off_session", "on_session"]).optional(), + shipping: z .object({ - delivery_estimate: z + address: z.object({ + city: z.string().optional(), + country: z.string().optional(), + line1: z.string(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional(), + }), + carrier: z.string().optional(), + name: z.string(), + phone: z.string().optional(), + tracking_number: z.string().optional(), + }) + .optional(), + statement_descriptor: z.string().optional(), + statement_descriptor_suffix: z.string().optional(), + transfer_data: z + .object({ + amount: z.coerce.number().optional(), + destination: z.string(), + }) + .optional(), + transfer_group: z.string().optional(), + }) + .optional(), + payment_method_collection: z.enum(["always", "if_required"]).optional(), + payment_method_configuration: z.string().optional(), + payment_method_options: z + .object({ + acss_debit: z + .object({ + currency: z.enum(["cad", "usd"]).optional(), + mandate_options: z .object({ - maximum: z - .object({ - unit: z.enum([ - "business_day", - "day", - "hour", - "month", - "week", - ]), - value: z.coerce.number(), - }) + custom_mandate_url: z + .union([z.string(), z.enum([""])]) .optional(), - minimum: z - .object({ - unit: z.enum([ - "business_day", - "day", - "hour", - "month", - "week", + default_for: z + .array(z.enum(["invoice", "subscription"])) + .optional(), + interval_description: z.string().optional(), + payment_schedule: z + .enum(["combined", "interval", "sporadic"]) + .optional(), + transaction_type: z.enum(["business", "personal"]).optional(), + }) + .optional(), + setup_future_usage: z + .enum(["none", "off_session", "on_session"]) + .optional(), + verification_method: z + .enum(["automatic", "instant", "microdeposits"]) + .optional(), + }) + .optional(), + affirm: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + afterpay_clearpay: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + alipay: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + au_becs_debit: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + bacs_debit: z + .object({ + setup_future_usage: z + .enum(["none", "off_session", "on_session"]) + .optional(), + }) + .optional(), + bancontact: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + boleto: z + .object({ + expires_after_days: z.coerce.number().optional(), + setup_future_usage: z + .enum(["none", "off_session", "on_session"]) + .optional(), + }) + .optional(), + card: z + .object({ + installments: z + .object({ enabled: z.coerce.boolean().optional() }) + .optional(), + request_three_d_secure: z + .enum(["any", "automatic", "challenge"]) + .optional(), + setup_future_usage: z + .enum(["off_session", "on_session"]) + .optional(), + statement_descriptor_suffix_kana: z.string().optional(), + statement_descriptor_suffix_kanji: z.string().optional(), + }) + .optional(), + cashapp: z + .object({ + setup_future_usage: z + .enum(["none", "off_session", "on_session"]) + .optional(), + }) + .optional(), + customer_balance: z + .object({ + bank_transfer: z + .object({ + eu_bank_transfer: z + .object({ country: z.string() }) + .optional(), + requested_address_types: z + .array( + z.enum([ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", ]), - value: z.coerce.number(), - }) + ) .optional(), + type: z.enum([ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ]), }) .optional(), - display_name: z.string(), - fixed_amount: z + funding_type: z.enum(["bank_transfer"]).optional(), + setup_future_usage: z.enum(["none"]).optional(), + }) + .optional(), + eps: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + fpx: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + giropay: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + grabpay: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + ideal: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + klarna: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + konbini: z + .object({ + expires_after_days: z.coerce.number().optional(), + setup_future_usage: z.enum(["none"]).optional(), + }) + .optional(), + link: z + .object({ + setup_future_usage: z.enum(["none", "off_session"]).optional(), + }) + .optional(), + oxxo: z + .object({ + expires_after_days: z.coerce.number().optional(), + setup_future_usage: z.enum(["none"]).optional(), + }) + .optional(), + p24: z + .object({ + setup_future_usage: z.enum(["none"]).optional(), + tos_shown_and_accepted: z.coerce.boolean().optional(), + }) + .optional(), + paynow: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + paypal: z + .object({ + capture_method: z.enum(["", "manual"]).optional(), + preferred_locale: z + .enum([ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE", + ]) + .optional(), + reference: z.string().optional(), + risk_correlation_id: z.string().optional(), + setup_future_usage: z + .enum(["", "none", "off_session"]) + .optional(), + }) + .optional(), + pix: z + .object({ expires_after_seconds: z.coerce.number().optional() }) + .optional(), + revolut_pay: z + .object({ + setup_future_usage: z.enum(["none", "off_session"]).optional(), + }) + .optional(), + sepa_debit: z + .object({ + setup_future_usage: z + .enum(["none", "off_session", "on_session"]) + .optional(), + }) + .optional(), + sofort: z + .object({ setup_future_usage: z.enum(["none"]).optional() }) + .optional(), + swish: z.object({ reference: z.string().optional() }).optional(), + us_bank_account: z + .object({ + financial_connections: z .object({ - amount: z.coerce.number(), - currency: z.string(), - currency_options: z - .record( - z.object({ - amount: z.coerce.number(), - tax_behavior: z - .enum(["exclusive", "inclusive", "unspecified"]) - .optional(), - }), + permissions: z + .array( + z.enum([ + "balances", + "ownership", + "payment_method", + "transactions", + ]), ) .optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), }) .optional(), - metadata: z.record(z.string()).optional(), - tax_behavior: z - .enum(["exclusive", "inclusive", "unspecified"]) + setup_future_usage: z + .enum(["none", "off_session", "on_session"]) .optional(), - tax_code: z.string().optional(), - type: z.enum(["fixed_amount"]).optional(), + verification_method: z.enum(["automatic", "instant"]).optional(), }) .optional(), - }), + wechat_pay: z + .object({ + app_id: z.string().optional(), + client: z.enum(["android", "ios", "web"]), + setup_future_usage: z.enum(["none"]).optional(), + }) + .optional(), + }) + .optional(), + payment_method_types: z + .array( + z.enum([ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "oxxo", + "p24", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay", + "zip", + ]), + ) + .optional(), + phone_number_collection: z + .object({ enabled: z.coerce.boolean() }) + .optional(), + redirect_on_completion: z + .enum(["always", "if_required", "never"]) + .optional(), + return_url: z.string().optional(), + setup_intent_data: z + .object({ + description: z.string().optional(), + metadata: z.record(z.string()).optional(), + on_behalf_of: z.string().optional(), + }) + .optional(), + shipping_address_collection: z + .object({ + allowed_countries: z.array( + z.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", + ]), + ), + }) + .optional(), + shipping_options: z + .array( + z.object({ + shipping_rate: z.string().optional(), + shipping_rate_data: z + .object({ + delivery_estimate: z + .object({ + maximum: z + .object({ + unit: z.enum([ + "business_day", + "day", + "hour", + "month", + "week", + ]), + value: z.coerce.number(), + }) + .optional(), + minimum: z + .object({ + unit: z.enum([ + "business_day", + "day", + "hour", + "month", + "week", + ]), + value: z.coerce.number(), + }) + .optional(), + }) + .optional(), + display_name: z.string(), + fixed_amount: z + .object({ + amount: z.coerce.number(), + currency: z.string(), + currency_options: z + .record( + z.object({ + amount: z.coerce.number(), + tax_behavior: z + .enum(["exclusive", "inclusive", "unspecified"]) + .optional(), + }), + ) + .optional(), + }) + .optional(), + metadata: z.record(z.string()).optional(), + tax_behavior: z + .enum(["exclusive", "inclusive", "unspecified"]) + .optional(), + tax_code: z.string().optional(), + type: z.enum(["fixed_amount"]).optional(), + }) + .optional(), + }), + ) + .optional(), + submit_type: z.enum(["auto", "book", "donate", "pay"]).optional(), + subscription_data: z + .object({ + application_fee_percent: z.coerce.number().optional(), + billing_cycle_anchor: z.coerce.number().optional(), + default_tax_rates: z.array(z.string()).optional(), + description: z.string().optional(), + invoice_settings: z + .object({ + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), + metadata: z.record(z.string()).optional(), + on_behalf_of: z.string().optional(), + proration_behavior: z.enum(["create_prorations", "none"]).optional(), + transfer_data: z + .object({ + amount_percent: z.coerce.number().optional(), + destination: z.string(), + }) + .optional(), + trial_end: z.coerce.number().optional(), + trial_period_days: z.coerce.number().optional(), + trial_settings: z + .object({ + end_behavior: z.object({ + missing_payment_method: z.enum([ + "cancel", + "create_invoice", + "pause", + ]), + }), + }) + .optional(), + }) + .optional(), + success_url: z.string().optional(), + tax_id_collection: z.object({ enabled: z.coerce.boolean() }).optional(), + ui_mode: z.enum(["embedded", "hosted"]).optional(), + }) + .optional() + + const postCheckoutSessionsResponseValidator = responseValidationFactory( + [["200", s_checkout_session]], + s_error, + ) + + router.post( + "postCheckoutSessions", + "/v1/checkout/sessions", + async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postCheckoutSessionsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postCheckoutSessions(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postCheckoutSessionsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getCheckoutSessionsSessionParamSchema = z.object({ + session: z.string(), + }) + + const getCheckoutSessionsSessionQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getCheckoutSessionsSessionBodySchema = z.object({}).optional() + + const getCheckoutSessionsSessionResponseValidator = responseValidationFactory( + [["200", s_checkout_session]], + s_error, + ) + + router.get( + "getCheckoutSessionsSession", + "/v1/checkout/sessions/:session", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getCheckoutSessionsSessionParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getCheckoutSessionsSessionQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getCheckoutSessionsSessionBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getCheckoutSessionsSession(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getCheckoutSessionsSessionResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postCheckoutSessionsSessionExpireParamSchema = z.object({ + session: z.string(), + }) + + const postCheckoutSessionsSessionExpireBodySchema = z + .object({ expand: z.array(z.string()).optional() }) + .optional() + + const postCheckoutSessionsSessionExpireResponseValidator = + responseValidationFactory([["200", s_checkout_session]], s_error) + + router.post( + "postCheckoutSessionsSessionExpire", + "/v1/checkout/sessions/:session/expire", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postCheckoutSessionsSessionExpireParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postCheckoutSessionsSessionExpireBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postCheckoutSessionsSessionExpire(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postCheckoutSessionsSessionExpireResponseValidator( + status, + body, ) - .optional(), - submit_type: z.enum(["auto", "book", "donate", "pay"]).optional(), - subscription_data: z - .object({ - application_fee_percent: z.coerce.number().optional(), - billing_cycle_anchor: z.coerce.number().optional(), - default_tax_rates: z.array(z.string()).optional(), - description: z.string().optional(), - metadata: z.record(z.string()).optional(), - on_behalf_of: z.string().optional(), - proration_behavior: z.enum(["create_prorations", "none"]).optional(), - transfer_data: z - .object({ - amount_percent: z.coerce.number().optional(), - destination: z.string(), - }) - .optional(), - trial_end: z.coerce.number().optional(), - trial_period_days: z.coerce.number().optional(), - trial_settings: z - .object({ - end_behavior: z.object({ - missing_payment_method: z.enum([ - "cancel", - "create_invoice", - "pause", - ]), - }), - }) - .optional(), + ctx.status = status + return next() + }, + ) + + const getCheckoutSessionsSessionLineItemsParamSchema = z.object({ + session: z.string(), + }) + + const getCheckoutSessionsSessionLineItemsQuerySchema = z.object({ + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + starting_after: z.string().optional(), + }) + + const getCheckoutSessionsSessionLineItemsBodySchema = z.object({}).optional() + + const getCheckoutSessionsSessionLineItemsResponseValidator = + responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(z.lazy(() => s_item)), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get( + "getCheckoutSessionsSessionLineItems", + "/v1/checkout/sessions/:session/line_items", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getCheckoutSessionsSessionLineItemsParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getCheckoutSessionsSessionLineItemsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getCheckoutSessionsSessionLineItemsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_item[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getCheckoutSessionsSessionLineItems(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getCheckoutSessionsSessionLineItemsResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const getClimateOrdersQuerySchema = z.object({ + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + starting_after: z.string().optional(), + }) + + const getClimateOrdersBodySchema = z.object({}).optional() + + const getClimateOrdersResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(s_climate_order), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get("getClimateOrders", "/v1/climate/orders", async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getClimateOrdersQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getClimateOrdersBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_climate_order[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getClimateOrders(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getClimateOrdersResponseValidator(status, body) + ctx.status = status + return next() + }) + + const postClimateOrdersBodySchema = z.object({ + amount: z.coerce.number().optional(), + beneficiary: z.object({ public_name: z.string() }).optional(), + currency: z.string().optional(), + expand: z.array(z.string()).optional(), + metadata: z.record(z.string()).optional(), + metric_tons: z.string().optional(), + product: z.string(), + }) + + const postClimateOrdersResponseValidator = responseValidationFactory( + [["200", s_climate_order]], + s_error, + ) + + router.post("postClimateOrders", "/v1/climate/orders", async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postClimateOrdersBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postClimateOrders(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) }) - .optional(), - success_url: z.string(), - tax_id_collection: z.object({ enabled: z.coerce.boolean() }).optional(), + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postClimateOrdersResponseValidator(status, body) + ctx.status = status + return next() }) - const postCheckoutSessionsResponseValidator = responseValidationFactory( - [["200", s_checkout_session]], + const getClimateOrdersOrderParamSchema = z.object({ order: z.string() }) + + const getClimateOrdersOrderQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getClimateOrdersOrderBodySchema = z.object({}).optional() + + const getClimateOrdersOrderResponseValidator = responseValidationFactory( + [["200", s_climate_order]], s_error, ) - router.post( - "postCheckoutSessions", - "/v1/checkout/sessions", + router.get( + "getClimateOrdersOrder", + "/v1/climate/orders/:order", async (ctx, next) => { const input = { - params: undefined, - query: undefined, + params: parseRequestInput( + getClimateOrdersOrderParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getClimateOrdersOrderQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: parseRequestInput( - postCheckoutSessionsBodySchema, + getClimateOrdersOrderBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -19381,7 +21817,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withDefault(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -19392,7 +21828,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .postCheckoutSessions(input, responder, ctx) + .getClimateOrdersOrder(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -19400,44 +21836,45 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = postCheckoutSessionsResponseValidator(status, body) + ctx.body = getClimateOrdersOrderResponseValidator(status, body) ctx.status = status return next() }, ) - const getCheckoutSessionsSessionParamSchema = z.object({ - session: z.string(), - }) - - const getCheckoutSessionsSessionQuerySchema = z.object({ - expand: z.array(z.string()).optional(), - }) + const postClimateOrdersOrderParamSchema = z.object({ order: z.string() }) - const getCheckoutSessionsSessionBodySchema = z.object({}).optional() + const postClimateOrdersOrderBodySchema = z + .object({ + beneficiary: z + .union([ + z.object({ public_name: z.union([z.string(), z.enum([""])]) }), + z.enum([""]), + ]) + .optional(), + expand: z.array(z.string()).optional(), + metadata: z.record(z.string()).optional(), + }) + .optional() - const getCheckoutSessionsSessionResponseValidator = responseValidationFactory( - [["200", s_checkout_session]], + const postClimateOrdersOrderResponseValidator = responseValidationFactory( + [["200", s_climate_order]], s_error, ) - router.get( - "getCheckoutSessionsSession", - "/v1/checkout/sessions/:session", + router.post( + "postClimateOrdersOrder", + "/v1/climate/orders/:order", async (ctx, next) => { const input = { params: parseRequestInput( - getCheckoutSessionsSessionParamSchema, + postClimateOrdersOrderParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: parseRequestInput( - getCheckoutSessionsSessionQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), + query: undefined, body: parseRequestInput( - getCheckoutSessionsSessionBodySchema, + postClimateOrdersOrderBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -19445,7 +21882,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withDefault(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -19456,7 +21893,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .getCheckoutSessionsSession(input, responder, ctx) + .postClimateOrdersOrder(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -19464,36 +21901,36 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = getCheckoutSessionsSessionResponseValidator(status, body) + ctx.body = postClimateOrdersOrderResponseValidator(status, body) ctx.status = status return next() }, ) - const postCheckoutSessionsSessionExpireParamSchema = z.object({ - session: z.string(), + const postClimateOrdersOrderCancelParamSchema = z.object({ + order: z.string(), }) - const postCheckoutSessionsSessionExpireBodySchema = z + const postClimateOrdersOrderCancelBodySchema = z .object({ expand: z.array(z.string()).optional() }) .optional() - const postCheckoutSessionsSessionExpireResponseValidator = - responseValidationFactory([["200", s_checkout_session]], s_error) + const postClimateOrdersOrderCancelResponseValidator = + responseValidationFactory([["200", s_climate_order]], s_error) router.post( - "postCheckoutSessionsSessionExpire", - "/v1/checkout/sessions/:session/expire", + "postClimateOrdersOrderCancel", + "/v1/climate/orders/:order/cancel", async (ctx, next) => { const input = { params: parseRequestInput( - postCheckoutSessionsSessionExpireParamSchema, + postClimateOrdersOrderCancelParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - postCheckoutSessionsSessionExpireBodySchema, + postClimateOrdersOrderCancelBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -19501,7 +21938,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withDefault(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -19512,7 +21949,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .postCheckoutSessionsSessionExpire(input, responder, ctx) + .postClimateOrdersOrderCancel(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -19520,61 +21957,185 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = postCheckoutSessionsSessionExpireResponseValidator( - status, - body, - ) + ctx.body = postClimateOrdersOrderCancelResponseValidator(status, body) ctx.status = status return next() }, ) - const getCheckoutSessionsSessionLineItemsParamSchema = z.object({ - session: z.string(), - }) - - const getCheckoutSessionsSessionLineItemsQuerySchema = z.object({ + const getClimateProductsQuerySchema = z.object({ ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.coerce.number().optional(), starting_after: z.string().optional(), }) - const getCheckoutSessionsSessionLineItemsBodySchema = z.object({}).optional() + const getClimateProductsBodySchema = z.object({}).optional() - const getCheckoutSessionsSessionLineItemsResponseValidator = - responseValidationFactory( + const getClimateProductsResponseValidator = responseValidationFactory( + [ [ - [ - "200", - z.object({ - data: z.array(z.lazy(() => s_item)), - has_more: z.coerce.boolean(), - object: z.enum(["list"]), - url: z.string(), - }), - ], + "200", + z.object({ + data: z.array(s_climate_product), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), ], - s_error, - ) + ], + s_error, + ) router.get( - "getCheckoutSessionsSessionLineItems", - "/v1/checkout/sessions/:session/line_items", + "getClimateProducts", + "/v1/climate/products", + async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getClimateProductsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getClimateProductsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_climate_product[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getClimateProducts(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getClimateProductsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getClimateProductsProductParamSchema = z.object({ product: z.string() }) + + const getClimateProductsProductQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getClimateProductsProductBodySchema = z.object({}).optional() + + const getClimateProductsProductResponseValidator = responseValidationFactory( + [["200", s_climate_product]], + s_error, + ) + + router.get( + "getClimateProductsProduct", + "/v1/climate/products/:product", async (ctx, next) => { const input = { params: parseRequestInput( - getCheckoutSessionsSessionLineItemsParamSchema, + getClimateProductsProductParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - getCheckoutSessionsSessionLineItemsQuerySchema, + getClimateProductsProductQuerySchema, ctx.query, RequestInputType.QueryString, ), body: parseRequestInput( - getCheckoutSessionsSessionLineItemsBodySchema, + getClimateProductsProductBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getClimateProductsProduct(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getClimateProductsProductResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getClimateSuppliersQuerySchema = z.object({ + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + starting_after: z.string().optional(), + }) + + const getClimateSuppliersBodySchema = z.object({}).optional() + + const getClimateSuppliersResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(s_climate_supplier), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get( + "getClimateSuppliers", + "/v1/climate/suppliers", + async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getClimateSuppliersQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getClimateSuppliersBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -19583,7 +22144,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { return new KoaRuntimeResponse<{ - data: t_item[] + data: t_climate_supplier[] has_more: boolean object: "list" url: string @@ -19598,7 +22159,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .getCheckoutSessionsSessionLineItems(input, responder, ctx) + .getClimateSuppliers(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -19606,7 +22167,133 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = getCheckoutSessionsSessionLineItemsResponseValidator( + ctx.body = getClimateSuppliersResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getClimateSuppliersSupplierParamSchema = z.object({ + supplier: z.string(), + }) + + const getClimateSuppliersSupplierQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getClimateSuppliersSupplierBodySchema = z.object({}).optional() + + const getClimateSuppliersSupplierResponseValidator = + responseValidationFactory([["200", s_climate_supplier]], s_error) + + router.get( + "getClimateSuppliersSupplier", + "/v1/climate/suppliers/:supplier", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getClimateSuppliersSupplierParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getClimateSuppliersSupplierQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getClimateSuppliersSupplierBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getClimateSuppliersSupplier(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getClimateSuppliersSupplierResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getConfirmationTokensConfirmationTokenParamSchema = z.object({ + confirmation_token: z.string(), + }) + + const getConfirmationTokensConfirmationTokenQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getConfirmationTokensConfirmationTokenBodySchema = z + .object({}) + .optional() + + const getConfirmationTokensConfirmationTokenResponseValidator = + responseValidationFactory([["200", s_confirmation_token]], s_error) + + router.get( + "getConfirmationTokensConfirmationToken", + "/v1/confirmation_tokens/:confirmation_token", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getConfirmationTokensConfirmationTokenParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getConfirmationTokensConfirmationTokenQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getConfirmationTokensConfirmationTokenBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getConfirmationTokensConfirmationToken(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getConfirmationTokensConfirmationTokenResponseValidator( status, body, ) @@ -20064,6 +22751,17 @@ export function createRouter(implementation: Implementation): KoaRouter { }) const getCreditNotesQuerySchema = z.object({ + created: z + .union([ + z.object({ + gt: z.coerce.number().optional(), + gte: z.coerce.number().optional(), + lt: z.coerce.number().optional(), + lte: z.coerce.number().optional(), + }), + z.coerce.number(), + ]) + .optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), @@ -20148,6 +22846,18 @@ export function createRouter(implementation: Implementation): KoaRouter { description: z.string().optional(), invoice_line_item: z.string().optional(), quantity: z.coerce.number().optional(), + tax_amounts: z + .union([ + z.array( + z.object({ + amount: z.coerce.number(), + tax_rate: z.string(), + taxable_amount: z.coerce.number(), + }), + ), + z.enum([""]), + ]) + .optional(), tax_rates: z.union([z.array(z.string()), z.enum([""])]).optional(), type: z.enum(["custom_line_item", "invoice_line_item"]), unit_amount: z.coerce.number().optional(), @@ -20228,6 +22938,18 @@ export function createRouter(implementation: Implementation): KoaRouter { description: z.string().optional(), invoice_line_item: z.string().optional(), quantity: z.coerce.number().optional(), + tax_amounts: z + .union([ + z.array( + z.object({ + amount: z.coerce.number(), + tax_rate: z.string(), + taxable_amount: z.coerce.number(), + }), + ), + z.enum([""]), + ]) + .optional(), tax_rates: z.union([z.array(z.string()), z.enum([""])]).optional(), type: z.enum(["custom_line_item", "invoice_line_item"]), unit_amount: z.coerce.number().optional(), @@ -20320,6 +23042,18 @@ export function createRouter(implementation: Implementation): KoaRouter { description: z.string().optional(), invoice_line_item: z.string().optional(), quantity: z.coerce.number().optional(), + tax_amounts: z + .union([ + z.array( + z.object({ + amount: z.coerce.number(), + tax_rate: z.string(), + taxable_amount: z.coerce.number(), + }), + ), + z.enum([""]), + ]) + .optional(), tax_rates: z.union([z.array(z.string()), z.enum([""])]).optional(), type: z.enum(["custom_line_item", "invoice_line_item"]), unit_amount: z.coerce.number().optional(), @@ -20670,6 +23404,61 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const postCustomerSessionsBodySchema = z.object({ + components: z.object({ + buy_button: z.object({ enabled: z.coerce.boolean() }).optional(), + pricing_table: z.object({ enabled: z.coerce.boolean() }).optional(), + }), + customer: z.string(), + expand: z.array(z.string()).optional(), + }) + + const postCustomerSessionsResponseValidator = responseValidationFactory( + [["200", s_customer_session]], + s_error, + ) + + router.post( + "postCustomerSessions", + "/v1/customer_sessions", + async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postCustomerSessionsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postCustomerSessions(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postCustomerSessionsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + const getCustomersQuerySchema = z.object({ created: z .union([ @@ -20833,7 +23622,10 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), source: z.string().optional(), tax: z - .object({ ip_address: z.union([z.string(), z.enum([""])]).optional() }) + .object({ + ip_address: z.union([z.string(), z.enum([""])]).optional(), + validate_location: z.enum(["deferred", "immediately"]).optional(), + }) .optional(), tax_exempt: z.enum(["", "exempt", "none", "reverse"]).optional(), tax_id_data: z @@ -20885,6 +23677,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "my_itn", "my_sst", "no_vat", + "no_voec", "nz_gst", "pe_ruc", "ph_tin", @@ -21270,7 +24063,10 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), source: z.string().optional(), tax: z - .object({ ip_address: z.union([z.string(), z.enum([""])]).optional() }) + .object({ + ip_address: z.union([z.string(), z.enum([""])]).optional(), + validate_location: z.enum(["deferred", "immediately"]).optional(), + }) .optional(), tax_exempt: z.enum(["", "exempt", "none", "reverse"]).optional(), }) @@ -23026,14 +25822,17 @@ export function createRouter(implementation: Implementation): KoaRouter { "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -23758,6 +26557,15 @@ export function createRouter(implementation: Implementation): KoaRouter { add_invoice_items: z .array( z.object({ + discounts: z + .array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ) + .optional(), price: z.string().optional(), price_data: z .object({ @@ -23775,8 +26583,20 @@ export function createRouter(implementation: Implementation): KoaRouter { }), ) .optional(), - application_fee_percent: z.coerce.number().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + application_fee_percent: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), backdate_start_date: z.coerce.number().optional(), billing_cycle_anchor: z.coerce.number().optional(), billing_thresholds: z @@ -23801,13 +26621,50 @@ export function createRouter(implementation: Implementation): KoaRouter { default_tax_rates: z .union([z.array(z.string()), z.enum([""])]) .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), expand: z.array(z.string()).optional(), + invoice_settings: z + .object({ + account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), items: z .array( z.object({ billing_thresholds: z .union([z.object({ usage_gte: z.coerce.number() }), z.enum([""])]) .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), metadata: z.record(z.string()).optional(), price: z.string().optional(), price_data: z @@ -23897,7 +26754,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), request_three_d_secure: z - .enum(["any", "automatic"]) + .enum(["any", "automatic", "challenge"]) .optional(), }), z.enum([""]), @@ -23920,6 +26777,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), konbini: z.union([z.object({}), z.enum([""])]).optional(), + sepa_debit: z.union([z.object({}), z.enum([""])]).optional(), us_bank_account: z .union([ z.object({ @@ -23935,7 +26793,9 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), }) .optional(), verification_method: z @@ -23961,12 +26821,14 @@ export function createRouter(implementation: Implementation): KoaRouter { "card", "cashapp", "customer_balance", + "eps", "fpx", "giropay", "grabpay", "ideal", "konbini", "link", + "p24", "paynow", "paypal", "promptpay", @@ -24216,6 +27078,15 @@ export function createRouter(implementation: Implementation): KoaRouter { add_invoice_items: z .array( z.object({ + discounts: z + .array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ) + .optional(), price: z.string().optional(), price_data: z .object({ @@ -24233,8 +27104,20 @@ export function createRouter(implementation: Implementation): KoaRouter { }), ) .optional(), - application_fee_percent: z.coerce.number().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + application_fee_percent: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), billing_cycle_anchor: z.enum(["now", "unchanged"]).optional(), billing_thresholds: z .union([ @@ -24275,7 +27158,32 @@ export function createRouter(implementation: Implementation): KoaRouter { default_tax_rates: z .union([z.array(z.string()), z.enum([""])]) .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), expand: z.array(z.string()).optional(), + invoice_settings: z + .object({ + account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), items: z .array( z.object({ @@ -24284,6 +27192,18 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), clear_usage: z.coerce.boolean().optional(), deleted: z.coerce.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), id: z.string().optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), price: z.string().optional(), @@ -24383,7 +27303,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), request_three_d_secure: z - .enum(["any", "automatic"]) + .enum(["any", "automatic", "challenge"]) .optional(), }), z.enum([""]), @@ -24406,6 +27326,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), konbini: z.union([z.object({}), z.enum([""])]).optional(), + sepa_debit: z.union([z.object({}), z.enum([""])]).optional(), us_bank_account: z .union([ z.object({ @@ -24421,7 +27342,9 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), }) .optional(), verification_method: z @@ -24447,12 +27370,14 @@ export function createRouter(implementation: Implementation): KoaRouter { "card", "cashapp", "customer_balance", + "eps", "fpx", "giropay", "grabpay", "ideal", "konbini", "link", + "p24", "paynow", "paypal", "promptpay", @@ -24830,6 +27755,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "my_itn", "my_sst", "no_vat", + "no_voec", "nz_gst", "pe_ruc", "ph_tin", @@ -26485,7 +29411,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const postFinancialConnectionsAccountsAccountRefreshBodySchema = z.object({ expand: z.array(z.string()).optional(), - features: z.array(z.enum(["balance", "ownership"])), + features: z.array(z.enum(["balance", "ownership", "transactions"])), }) const postFinancialConnectionsAccountsAccountRefreshResponseValidator = @@ -26543,6 +29469,139 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const postFinancialConnectionsAccountsAccountSubscribeParamSchema = z.object({ + account: z.string(), + }) + + const postFinancialConnectionsAccountsAccountSubscribeBodySchema = z.object({ + expand: z.array(z.string()).optional(), + features: z.array(z.enum(["transactions"])), + }) + + const postFinancialConnectionsAccountsAccountSubscribeResponseValidator = + responseValidationFactory( + [["200", s_financial_connections_account]], + s_error, + ) + + router.post( + "postFinancialConnectionsAccountsAccountSubscribe", + "/v1/financial_connections/accounts/:account/subscribe", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postFinancialConnectionsAccountsAccountSubscribeParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postFinancialConnectionsAccountsAccountSubscribeBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postFinancialConnectionsAccountsAccountSubscribe(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = + postFinancialConnectionsAccountsAccountSubscribeResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const postFinancialConnectionsAccountsAccountUnsubscribeParamSchema = + z.object({ account: z.string() }) + + const postFinancialConnectionsAccountsAccountUnsubscribeBodySchema = z.object( + { + expand: z.array(z.string()).optional(), + features: z.array(z.enum(["transactions"])), + }, + ) + + const postFinancialConnectionsAccountsAccountUnsubscribeResponseValidator = + responseValidationFactory( + [["200", s_financial_connections_account]], + s_error, + ) + + router.post( + "postFinancialConnectionsAccountsAccountUnsubscribe", + "/v1/financial_connections/accounts/:account/unsubscribe", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postFinancialConnectionsAccountsAccountUnsubscribeParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postFinancialConnectionsAccountsAccountUnsubscribeBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postFinancialConnectionsAccountsAccountUnsubscribe( + input, + responder, + ctx, + ) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = + postFinancialConnectionsAccountsAccountUnsubscribeResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + const postFinancialConnectionsSessionsBodySchema = z.object({ account_holder: z.object({ account: z.string().optional(), @@ -26554,7 +29613,9 @@ export function createRouter(implementation: Implementation): KoaRouter { permissions: z.array( z.enum(["balances", "ownership", "payment_method", "transactions"]), ), - prefetch: z.array(z.enum(["balances", "ownership"])).optional(), + prefetch: z + .array(z.enum(["balances", "ownership", "transactions"])) + .optional(), return_url: z.string().optional(), }) @@ -26675,7 +29736,380 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const getFinancialConnectionsTransactionsQuerySchema = z.object({ + account: z.string(), + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + starting_after: z.string().optional(), + transacted_at: z + .union([ + z.object({ + gt: z.coerce.number().optional(), + gte: z.coerce.number().optional(), + lt: z.coerce.number().optional(), + lte: z.coerce.number().optional(), + }), + z.coerce.number(), + ]) + .optional(), + transaction_refresh: z.object({ after: z.string() }).optional(), + }) + + const getFinancialConnectionsTransactionsBodySchema = z.object({}).optional() + + const getFinancialConnectionsTransactionsResponseValidator = + responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(s_financial_connections_transaction), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get( + "getFinancialConnectionsTransactions", + "/v1/financial_connections/transactions", + async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getFinancialConnectionsTransactionsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getFinancialConnectionsTransactionsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_financial_connections_transaction[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getFinancialConnectionsTransactions(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getFinancialConnectionsTransactionsResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const getFinancialConnectionsTransactionsTransactionParamSchema = z.object({ + transaction: z.string(), + }) + + const getFinancialConnectionsTransactionsTransactionQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getFinancialConnectionsTransactionsTransactionBodySchema = z + .object({}) + .optional() + + const getFinancialConnectionsTransactionsTransactionResponseValidator = + responseValidationFactory( + [["200", s_financial_connections_transaction]], + s_error, + ) + + router.get( + "getFinancialConnectionsTransactionsTransaction", + "/v1/financial_connections/transactions/:transaction", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getFinancialConnectionsTransactionsTransactionParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getFinancialConnectionsTransactionsTransactionQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getFinancialConnectionsTransactionsTransactionBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse( + 200, + ) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getFinancialConnectionsTransactionsTransaction(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = + getFinancialConnectionsTransactionsTransactionResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const getForwardingRequestsQuerySchema = z.object({ + created: z + .object({ + gt: z.coerce.number().optional(), + gte: z.coerce.number().optional(), + lt: z.coerce.number().optional(), + lte: z.coerce.number().optional(), + }) + .optional(), + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + starting_after: z.string().optional(), + }) + + const getForwardingRequestsBodySchema = z.object({}).optional() + + const getForwardingRequestsResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(s_forwarding_request), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get( + "getForwardingRequests", + "/v1/forwarding/requests", + async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getForwardingRequestsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getForwardingRequestsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_forwarding_request[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getForwardingRequests(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getForwardingRequestsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postForwardingRequestsBodySchema = z.object({ + config: z.string(), + expand: z.array(z.string()).optional(), + payment_method: z.string(), + replacements: z.array( + z.enum(["card_cvc", "card_expiry", "card_number", "cardholder_name"]), + ), + request: z + .object({ + body: z.string().optional(), + headers: z + .array(z.object({ name: z.string(), value: z.string() })) + .optional(), + }) + .optional(), + url: z.string(), + }) + + const postForwardingRequestsResponseValidator = responseValidationFactory( + [["200", s_forwarding_request]], + s_error, + ) + + router.post( + "postForwardingRequests", + "/v1/forwarding/requests", + async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postForwardingRequestsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postForwardingRequests(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postForwardingRequestsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getForwardingRequestsIdParamSchema = z.object({ id: z.string() }) + + const getForwardingRequestsIdQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getForwardingRequestsIdBodySchema = z.object({}).optional() + + const getForwardingRequestsIdResponseValidator = responseValidationFactory( + [["200", s_forwarding_request]], + s_error, + ) + + router.get( + "getForwardingRequestsId", + "/v1/forwarding/requests/:id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getForwardingRequestsIdParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getForwardingRequestsIdQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getForwardingRequestsIdBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getForwardingRequestsId(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getForwardingRequestsIdResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + const getIdentityVerificationReportsQuerySchema = z.object({ + client_reference_id: z.string().optional(), created: z .union([ z.object({ @@ -26832,6 +30266,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ) const getIdentityVerificationSessionsQuerySchema = z.object({ + client_reference_id: z.string().optional(), created: z .union([ z.object({ @@ -26920,29 +30355,48 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) - const postIdentityVerificationSessionsBodySchema = z.object({ - expand: z.array(z.string()).optional(), - metadata: z.record(z.string()).optional(), - options: z - .object({ - document: z - .union([ - z.object({ - allowed_types: z - .array(z.enum(["driving_license", "id_card", "passport"])) - .optional(), - require_id_number: z.coerce.boolean().optional(), - require_live_capture: z.coerce.boolean().optional(), - require_matching_selfie: z.coerce.boolean().optional(), - }), - z.enum([""]), - ]) - .optional(), - }) - .optional(), - return_url: z.string().optional(), - type: z.enum(["document", "id_number"]), - }) + const postIdentityVerificationSessionsBodySchema = z + .object({ + client_reference_id: z.string().optional(), + expand: z.array(z.string()).optional(), + metadata: z.record(z.string()).optional(), + options: z + .object({ + document: z + .union([ + z.object({ + allowed_types: z + .array(z.enum(["driving_license", "id_card", "passport"])) + .optional(), + require_id_number: z.coerce.boolean().optional(), + require_live_capture: z.coerce.boolean().optional(), + require_matching_selfie: z.coerce.boolean().optional(), + }), + z.enum([""]), + ]) + .optional(), + email: z + .union([ + z.object({ require_verification: z.coerce.boolean().optional() }), + z.enum([""]), + ]) + .optional(), + phone: z + .union([ + z.object({ require_verification: z.coerce.boolean().optional() }), + z.enum([""]), + ]) + .optional(), + }) + .optional(), + provided_details: z + .object({ email: z.string().optional(), phone: z.string().optional() }) + .optional(), + return_url: z.string().optional(), + type: z.enum(["document", "id_number"]).optional(), + verification_flow: z.string().optional(), + }) + .optional() const postIdentityVerificationSessionsResponseValidator = responseValidationFactory( @@ -27084,8 +30538,23 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + email: z + .union([ + z.object({ require_verification: z.coerce.boolean().optional() }), + z.enum([""]), + ]) + .optional(), + phone: z + .union([ + z.object({ require_verification: z.coerce.boolean().optional() }), + z.enum([""]), + ]) + .optional(), }) .optional(), + provided_details: z + .object({ email: z.string().optional(), phone: z.string().optional() }) + .optional(), type: z.enum(["document", "id_number"]).optional(), }) .optional() @@ -27364,6 +30833,7 @@ export function createRouter(implementation: Implementation): KoaRouter { z.object({ coupon: z.string().optional(), discount: z.string().optional(), + promotion_code: z.string().optional(), }), ), z.enum([""]), @@ -27571,6 +31041,7 @@ export function createRouter(implementation: Implementation): KoaRouter { z.object({ coupon: z.string().optional(), discount: z.string().optional(), + promotion_code: z.string().optional(), }), ), z.enum([""]), @@ -27757,7 +31228,17 @@ export function createRouter(implementation: Implementation): KoaRouter { account_tax_ids: z.union([z.array(z.string()), z.enum([""])]).optional(), application_fee_amount: z.coerce.number().optional(), auto_advance: z.coerce.boolean().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), collection_method: z .enum(["charge_automatically", "send_invoice"]) .optional(), @@ -27780,6 +31261,7 @@ export function createRouter(implementation: Implementation): KoaRouter { z.object({ coupon: z.string().optional(), discount: z.string().optional(), + promotion_code: z.string().optional(), }), ), z.enum([""]), @@ -27792,7 +31274,14 @@ export function createRouter(implementation: Implementation): KoaRouter { from_invoice: z .object({ action: z.enum(["revision"]), invoice: z.string() }) .optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + number: z.string().optional(), on_behalf_of: z.string().optional(), payment_settings: z .object({ @@ -27845,7 +31334,7 @@ export function createRouter(implementation: Implementation): KoaRouter { }) .optional(), request_three_d_secure: z - .enum(["any", "automatic"]) + .enum(["any", "automatic", "challenge"]) .optional(), }), z.enum([""]), @@ -27868,6 +31357,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), konbini: z.union([z.object({}), z.enum([""])]).optional(), + sepa_debit: z.union([z.object({}), z.enum([""])]).optional(), us_bank_account: z .union([ z.object({ @@ -27883,7 +31373,9 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), }) .optional(), verification_method: z @@ -27909,12 +31401,14 @@ export function createRouter(implementation: Implementation): KoaRouter { "card", "cashapp", "customer_balance", + "eps", "fpx", "giropay", "grabpay", "ideal", "konbini", "link", + "p24", "paynow", "paypal", "promptpay", @@ -27929,9 +31423,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), - pending_invoice_items_behavior: z - .enum(["exclude", "include", "include_and_require"]) - .optional(), + pending_invoice_items_behavior: z.enum(["exclude", "include"]).optional(), rendering: z .object({ amount_tax_display: z @@ -27942,16 +31434,6 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), - rendering_options: z - .union([ - z.object({ - amount_tax_display: z - .enum(["", "exclude_tax", "include_inclusive_tax"]) - .optional(), - }), - z.enum([""]), - ]) - .optional(), shipping_cost: z .object({ shipping_rate: z.string().optional(), @@ -28154,7 +31636,17 @@ export function createRouter(implementation: Implementation): KoaRouter { }) const getInvoicesUpcomingQuerySchema = z.object({ - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), coupon: z.string().optional(), currency: z.string().optional(), customer: z.string().optional(), @@ -28245,6 +31737,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "my_itn", "my_sst", "no_vat", + "no_voec", "nz_gst", "pe_ruc", "ph_tin", @@ -28279,6 +31772,7 @@ export function createRouter(implementation: Implementation): KoaRouter { z.object({ coupon: z.string().optional(), discount: z.string().optional(), + promotion_code: z.string().optional(), }), ), z.enum([""]), @@ -28298,6 +31792,326 @@ export function createRouter(implementation: Implementation): KoaRouter { z.object({ coupon: z.string().optional(), discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), + invoiceitem: z.string().optional(), + metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + period: z + .object({ end: z.coerce.number(), start: z.coerce.number() }) + .optional(), + price: z.string().optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string(), + tax_behavior: z + .enum(["exclusive", "inclusive", "unspecified"]) + .optional(), + unit_amount: z.coerce.number().optional(), + unit_amount_decimal: z.string().optional(), + }) + .optional(), + quantity: z.coerce.number().optional(), + tax_behavior: z + .enum(["exclusive", "inclusive", "unspecified"]) + .optional(), + tax_code: z.union([z.string(), z.enum([""])]).optional(), + tax_rates: z.union([z.array(z.string()), z.enum([""])]).optional(), + unit_amount: z.coerce.number().optional(), + unit_amount_decimal: z.string().optional(), + }), + ) + .optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + on_behalf_of: z.union([z.string(), z.enum([""])]).optional(), + schedule: z.string().optional(), + subscription: z.string().optional(), + subscription_billing_cycle_anchor: z + .union([z.enum(["now", "unchanged"]), z.coerce.number()]) + .optional(), + subscription_cancel_at: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + subscription_cancel_at_period_end: z.coerce.boolean().optional(), + subscription_cancel_now: z.coerce.boolean().optional(), + subscription_default_tax_rates: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + subscription_items: z + .array( + z.object({ + billing_thresholds: z + .union([z.object({ usage_gte: z.coerce.number() }), z.enum([""])]) + .optional(), + clear_usage: z.coerce.boolean().optional(), + deleted: z.coerce.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), + id: z.string().optional(), + metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + price: z.string().optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string(), + recurring: z.object({ + interval: z.enum(["day", "month", "week", "year"]), + interval_count: z.coerce.number().optional(), + }), + tax_behavior: z + .enum(["exclusive", "inclusive", "unspecified"]) + .optional(), + unit_amount: z.coerce.number().optional(), + unit_amount_decimal: z.string().optional(), + }) + .optional(), + quantity: z.coerce.number().optional(), + tax_rates: z.union([z.array(z.string()), z.enum([""])]).optional(), + }), + ) + .optional(), + subscription_proration_behavior: z + .enum(["always_invoice", "create_prorations", "none"]) + .optional(), + subscription_proration_date: z.coerce.number().optional(), + subscription_resume_at: z.enum(["now"]).optional(), + subscription_start_date: z.coerce.number().optional(), + subscription_trial_end: z + .union([z.enum(["now"]), z.coerce.number()]) + .optional(), + subscription_trial_from_plan: z.coerce.boolean().optional(), + }) + + const getInvoicesUpcomingBodySchema = z.object({}).optional() + + const getInvoicesUpcomingResponseValidator = responseValidationFactory( + [["200", s_invoice]], + s_error, + ) + + router.get( + "getInvoicesUpcoming", + "/v1/invoices/upcoming", + async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getInvoicesUpcomingQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getInvoicesUpcomingBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getInvoicesUpcoming(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getInvoicesUpcomingResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getInvoicesUpcomingLinesQuerySchema = z.object({ + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), + coupon: z.string().optional(), + currency: z.string().optional(), + customer: z.string().optional(), + customer_details: z + .object({ + address: z + .union([ + z.object({ + city: z.string().optional(), + country: z.string().optional(), + line1: z.string().optional(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional(), + }), + z.enum([""]), + ]) + .optional(), + shipping: z + .union([ + z.object({ + address: z.object({ + city: z.string().optional(), + country: z.string().optional(), + line1: z.string().optional(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional(), + }), + name: z.string(), + phone: z.string().optional(), + }), + z.enum([""]), + ]) + .optional(), + tax: z + .object({ + ip_address: z.union([z.string(), z.enum([""])]).optional(), + }) + .optional(), + tax_exempt: z.enum(["", "exempt", "none", "reverse"]).optional(), + tax_ids: z + .array( + z.object({ + type: z.enum([ + "ad_nrt", + "ae_trn", + "ar_cuit", + "au_abn", + "au_arn", + "bg_uic", + "bo_tin", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "cn_tin", + "co_nit", + "cr_tin", + "do_rcn", + "ec_ruc", + "eg_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", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "no_voec", + "nz_gst", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sv_nit", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "uy_ruc", + "ve_rif", + "vn_tin", + "za_vat", + ]), + value: z.string(), + }), + ) + .optional(), + }) + .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + invoice_items: z + .array( + z.object({ + amount: z.coerce.number().optional(), + currency: z.string().optional(), + description: z.string().optional(), + discountable: z.coerce.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), }), ), z.enum([""]), @@ -28331,7 +32145,16 @@ export function createRouter(implementation: Implementation): KoaRouter { }), ) .optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + limit: z.coerce.number().optional(), + on_behalf_of: z.union([z.string(), z.enum([""])]).optional(), schedule: z.string().optional(), + starting_after: z.string().optional(), subscription: z.string().optional(), subscription_billing_cycle_anchor: z .union([z.enum(["now", "unchanged"]), z.coerce.number()]) @@ -28352,295 +32175,18 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), clear_usage: z.coerce.boolean().optional(), deleted: z.coerce.boolean().optional(), - id: z.string().optional(), - metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), - price: z.string().optional(), - price_data: z - .object({ - currency: z.string(), - product: z.string(), - recurring: z.object({ - interval: z.enum(["day", "month", "week", "year"]), - interval_count: z.coerce.number().optional(), - }), - tax_behavior: z - .enum(["exclusive", "inclusive", "unspecified"]) - .optional(), - unit_amount: z.coerce.number().optional(), - unit_amount_decimal: z.string().optional(), - }) - .optional(), - quantity: z.coerce.number().optional(), - tax_rates: z.union([z.array(z.string()), z.enum([""])]).optional(), - }), - ) - .optional(), - subscription_proration_behavior: z - .enum(["always_invoice", "create_prorations", "none"]) - .optional(), - subscription_proration_date: z.coerce.number().optional(), - subscription_resume_at: z.enum(["now"]).optional(), - subscription_start_date: z.coerce.number().optional(), - subscription_trial_end: z - .union([z.enum(["now"]), z.coerce.number()]) - .optional(), - subscription_trial_from_plan: z.coerce.boolean().optional(), - }) - - const getInvoicesUpcomingBodySchema = z.object({}).optional() - - const getInvoicesUpcomingResponseValidator = responseValidationFactory( - [["200", s_invoice]], - s_error, - ) - - router.get( - "getInvoicesUpcoming", - "/v1/invoices/upcoming", - async (ctx, next) => { - const input = { - params: undefined, - query: parseRequestInput( - getInvoicesUpcomingQuerySchema, - ctx.query, - RequestInputType.QueryString, - ), - body: parseRequestInput( - getInvoicesUpcomingBodySchema, - Reflect.get(ctx.request, "body"), - RequestInputType.RequestBody, - ), - } - - const responder = { - with200() { - return new KoaRuntimeResponse(200) - }, - withDefault(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - withStatus(status: StatusCode) { - return new KoaRuntimeResponse(status) - }, - } - - const response = await implementation - .getInvoicesUpcoming(input, responder, ctx) - .catch((err) => { - throw KoaRuntimeError.HandlerError(err) - }) - - const { status, body } = - response instanceof KoaRuntimeResponse ? response.unpack() : response - - ctx.body = getInvoicesUpcomingResponseValidator(status, body) - ctx.status = status - return next() - }, - ) - - const getInvoicesUpcomingLinesQuerySchema = z.object({ - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), - coupon: z.string().optional(), - currency: z.string().optional(), - customer: z.string().optional(), - customer_details: z - .object({ - address: z - .union([ - z.object({ - city: z.string().optional(), - country: z.string().optional(), - line1: z.string().optional(), - line2: z.string().optional(), - postal_code: z.string().optional(), - state: z.string().optional(), - }), - z.enum([""]), - ]) - .optional(), - shipping: z - .union([ - z.object({ - address: z.object({ - city: z.string().optional(), - country: z.string().optional(), - line1: z.string().optional(), - line2: z.string().optional(), - postal_code: z.string().optional(), - state: z.string().optional(), - }), - name: z.string(), - phone: z.string().optional(), - }), - z.enum([""]), - ]) - .optional(), - tax: z - .object({ - ip_address: z.union([z.string(), z.enum([""])]).optional(), - }) - .optional(), - tax_exempt: z.enum(["", "exempt", "none", "reverse"]).optional(), - tax_ids: z - .array( - z.object({ - type: z.enum([ - "ad_nrt", - "ae_trn", - "ar_cuit", - "au_abn", - "au_arn", - "bg_uic", - "bo_tin", - "br_cnpj", - "br_cpf", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "ch_vat", - "cl_tin", - "cn_tin", - "co_nit", - "cr_tin", - "do_rcn", - "ec_ruc", - "eg_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", - "jp_trn", - "ke_pin", - "kr_brn", - "li_uid", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "no_vat", - "nz_gst", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sv_nit", - "th_vat", - "tr_tin", - "tw_vat", - "ua_vat", - "us_ein", - "uy_ruc", - "ve_rif", - "vn_tin", - "za_vat", - ]), - value: z.string(), - }), - ) - .optional(), - }) - .optional(), - discounts: z - .union([ - z.array( - z.object({ - coupon: z.string().optional(), - discount: z.string().optional(), - }), - ), - z.enum([""]), - ]) - .optional(), - ending_before: z.string().optional(), - expand: z.array(z.string()).optional(), - invoice_items: z - .array( - z.object({ - amount: z.coerce.number().optional(), - currency: z.string().optional(), - description: z.string().optional(), - discountable: z.coerce.boolean().optional(), discounts: z .union([ z.array( z.object({ coupon: z.string().optional(), discount: z.string().optional(), + promotion_code: z.string().optional(), }), ), z.enum([""]), ]) .optional(), - invoiceitem: z.string().optional(), - metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), - period: z - .object({ end: z.coerce.number(), start: z.coerce.number() }) - .optional(), - price: z.string().optional(), - price_data: z - .object({ - currency: z.string(), - product: z.string(), - tax_behavior: z - .enum(["exclusive", "inclusive", "unspecified"]) - .optional(), - unit_amount: z.coerce.number().optional(), - unit_amount_decimal: z.string().optional(), - }) - .optional(), - quantity: z.coerce.number().optional(), - tax_behavior: z - .enum(["exclusive", "inclusive", "unspecified"]) - .optional(), - tax_code: z.union([z.string(), z.enum([""])]).optional(), - tax_rates: z.union([z.array(z.string()), z.enum([""])]).optional(), - unit_amount: z.coerce.number().optional(), - unit_amount_decimal: z.string().optional(), - }), - ) - .optional(), - limit: z.coerce.number().optional(), - schedule: z.string().optional(), - starting_after: z.string().optional(), - subscription: z.string().optional(), - subscription_billing_cycle_anchor: z - .union([z.enum(["now", "unchanged"]), z.coerce.number()]) - .optional(), - subscription_cancel_at: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - subscription_cancel_at_period_end: z.coerce.boolean().optional(), - subscription_cancel_now: z.coerce.boolean().optional(), - subscription_default_tax_rates: z - .union([z.array(z.string()), z.enum([""])]) - .optional(), - subscription_items: z - .array( - z.object({ - billing_thresholds: z - .union([z.object({ usage_gte: z.coerce.number() }), z.enum([""])]) - .optional(), - clear_usage: z.coerce.boolean().optional(), - deleted: z.coerce.boolean().optional(), id: z.string().optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), price: z.string().optional(), @@ -28866,7 +32412,17 @@ export function createRouter(implementation: Implementation): KoaRouter { account_tax_ids: z.union([z.array(z.string()), z.enum([""])]).optional(), application_fee_amount: z.coerce.number().optional(), auto_advance: z.coerce.boolean().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), collection_method: z .enum(["charge_automatically", "send_invoice"]) .optional(), @@ -28889,6 +32445,7 @@ export function createRouter(implementation: Implementation): KoaRouter { z.object({ coupon: z.string().optional(), discount: z.string().optional(), + promotion_code: z.string().optional(), }), ), z.enum([""]), @@ -28898,7 +32455,14 @@ export function createRouter(implementation: Implementation): KoaRouter { effective_at: z.union([z.coerce.number(), z.enum([""])]).optional(), expand: z.array(z.string()).optional(), footer: z.string().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + number: z.union([z.string(), z.enum([""])]).optional(), on_behalf_of: z.union([z.string(), z.enum([""])]).optional(), payment_settings: z .object({ @@ -28951,7 +32515,7 @@ export function createRouter(implementation: Implementation): KoaRouter { }) .optional(), request_three_d_secure: z - .enum(["any", "automatic"]) + .enum(["any", "automatic", "challenge"]) .optional(), }), z.enum([""]), @@ -28974,6 +32538,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), konbini: z.union([z.object({}), z.enum([""])]).optional(), + sepa_debit: z.union([z.object({}), z.enum([""])]).optional(), us_bank_account: z .union([ z.object({ @@ -28989,7 +32554,9 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), }) .optional(), verification_method: z @@ -29015,12 +32582,14 @@ export function createRouter(implementation: Implementation): KoaRouter { "card", "cashapp", "customer_balance", + "eps", "fpx", "giropay", "grabpay", "ideal", "konbini", "link", + "p24", "paynow", "paypal", "promptpay", @@ -29045,16 +32614,6 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), - rendering_options: z - .union([ - z.object({ - amount_tax_display: z - .enum(["", "exclude_tax", "include_inclusive_tax"]) - .optional(), - }), - z.enum([""]), - ]) - .optional(), shipping_cost: z .union([ z.object({ @@ -29337,6 +32896,146 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const postInvoicesInvoiceLinesLineItemIdParamSchema = z.object({ + invoice: z.string(), + line_item_id: z.string(), + }) + + const postInvoicesInvoiceLinesLineItemIdBodySchema = z + .object({ + amount: z.coerce.number().optional(), + description: z.string().optional(), + discountable: z.coerce.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), + expand: z.array(z.string()).optional(), + metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + period: z + .object({ end: z.coerce.number(), start: z.coerce.number() }) + .optional(), + price: z.string().optional(), + price_data: z + .object({ + currency: z.string(), + product: z.string().optional(), + product_data: z + .object({ + description: z.string().optional(), + images: z.array(z.string()).optional(), + metadata: z.record(z.string()).optional(), + name: z.string(), + tax_code: z.string().optional(), + }) + .optional(), + tax_behavior: z + .enum(["exclusive", "inclusive", "unspecified"]) + .optional(), + unit_amount: z.coerce.number().optional(), + unit_amount_decimal: z.string().optional(), + }) + .optional(), + quantity: z.coerce.number().optional(), + tax_amounts: z + .union([ + z.array( + z.object({ + amount: z.coerce.number(), + tax_rate_data: z.object({ + country: z.string().optional(), + description: z.string().optional(), + display_name: z.string(), + inclusive: z.coerce.boolean(), + jurisdiction: z.string().optional(), + percentage: z.coerce.number(), + state: z.string().optional(), + tax_type: z + .enum([ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "rst", + "sales_tax", + "vat", + ]) + .optional(), + }), + taxable_amount: z.coerce.number(), + }), + ), + z.enum([""]), + ]) + .optional(), + tax_rates: z.union([z.array(z.string()), z.enum([""])]).optional(), + }) + .optional() + + const postInvoicesInvoiceLinesLineItemIdResponseValidator = + responseValidationFactory([["200", s_line_item]], s_error) + + router.post( + "postInvoicesInvoiceLinesLineItemId", + "/v1/invoices/:invoice/lines/:line_item_id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postInvoicesInvoiceLinesLineItemIdParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postInvoicesInvoiceLinesLineItemIdBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postInvoicesInvoiceLinesLineItemId(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postInvoicesInvoiceLinesLineItemIdResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + const postInvoicesInvoiceMarkUncollectibleParamSchema = z.object({ invoice: z.string(), }) @@ -30360,6 +34059,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), + allowed_merchant_countries: z.array(z.string()).optional(), blocked_categories: z .array( z.enum([ @@ -30661,6 +34361,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), + blocked_merchant_countries: z.array(z.string()).optional(), spending_limits: z .array( z.object({ @@ -31455,6 +35156,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), + allowed_merchant_countries: z.array(z.string()).optional(), blocked_categories: z .array( z.enum([ @@ -31756,6 +35458,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), + blocked_merchant_countries: z.array(z.string()).optional(), spending_limits: z .array( z.object({ @@ -32146,6 +35849,7 @@ export function createRouter(implementation: Implementation): KoaRouter { expand: z.array(z.string()).optional(), last4: z.string().optional(), limit: z.coerce.number().optional(), + personalization_design: z.string().optional(), starting_after: z.string().optional(), status: z.enum(["active", "canceled", "inactive"]).optional(), type: z.enum(["physical", "virtual"]).optional(), @@ -32220,10 +35924,13 @@ export function createRouter(implementation: Implementation): KoaRouter { expand: z.array(z.string()).optional(), financial_account: z.string().optional(), metadata: z.record(z.string()).optional(), + personalization_design: z.string().optional(), + pin: z.object({ encrypted_number: z.string().optional() }).optional(), replacement_for: z.string().optional(), replacement_reason: z .enum(["damaged", "expired", "lost", "stolen"]) .optional(), + second_line: z.union([z.string(), z.enum([""])]).optional(), shipping: z .object({ address: z.object({ @@ -32545,6 +36252,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), + allowed_merchant_countries: z.array(z.string()).optional(), blocked_categories: z .array( z.enum([ @@ -32846,6 +36554,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), + blocked_merchant_countries: z.array(z.string()).optional(), spending_limits: z .array( z.object({ @@ -33279,6 +36988,7 @@ export function createRouter(implementation: Implementation): KoaRouter { cancellation_reason: z.enum(["lost", "stolen"]).optional(), expand: z.array(z.string()).optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + personalization_design: z.string().optional(), pin: z.object({ encrypted_number: z.string().optional() }).optional(), spending_controls: z .object({ @@ -33583,6 +37293,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), + allowed_merchant_countries: z.array(z.string()).optional(), blocked_categories: z .array( z.enum([ @@ -33884,6 +37595,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), + blocked_merchant_countries: z.array(z.string()).optional(), spending_limits: z .array( z.object({ @@ -34505,20 +38217,502 @@ export function createRouter(implementation: Implementation): KoaRouter { }) .optional() - const postIssuingDisputesResponseValidator = responseValidationFactory( - [["200", s_issuing_dispute]], - s_error, - ) + const postIssuingDisputesResponseValidator = responseValidationFactory( + [["200", s_issuing_dispute]], + s_error, + ) + + router.post( + "postIssuingDisputes", + "/v1/issuing/disputes", + async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postIssuingDisputesBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postIssuingDisputes(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postIssuingDisputesResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getIssuingDisputesDisputeParamSchema = z.object({ dispute: z.string() }) + + const getIssuingDisputesDisputeQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getIssuingDisputesDisputeBodySchema = z.object({}).optional() + + const getIssuingDisputesDisputeResponseValidator = responseValidationFactory( + [["200", s_issuing_dispute]], + s_error, + ) + + router.get( + "getIssuingDisputesDispute", + "/v1/issuing/disputes/:dispute", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getIssuingDisputesDisputeParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getIssuingDisputesDisputeQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getIssuingDisputesDisputeBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getIssuingDisputesDispute(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getIssuingDisputesDisputeResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postIssuingDisputesDisputeParamSchema = z.object({ + dispute: z.string(), + }) + + const postIssuingDisputesDisputeBodySchema = z + .object({ + amount: z.coerce.number().optional(), + evidence: z + .object({ + canceled: z + .union([ + z.object({ + additional_documentation: z + .union([z.string(), z.enum([""])]) + .optional(), + canceled_at: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + cancellation_policy_provided: z + .union([z.coerce.boolean(), z.enum([""])]) + .optional(), + cancellation_reason: z + .union([z.string(), z.enum([""])]) + .optional(), + expected_at: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + explanation: z.union([z.string(), z.enum([""])]).optional(), + product_description: z + .union([z.string(), z.enum([""])]) + .optional(), + product_type: z.enum(["", "merchandise", "service"]).optional(), + return_status: z + .enum(["", "merchant_rejected", "successful"]) + .optional(), + returned_at: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + }), + z.enum([""]), + ]) + .optional(), + duplicate: z + .union([ + z.object({ + additional_documentation: z + .union([z.string(), z.enum([""])]) + .optional(), + card_statement: z.union([z.string(), z.enum([""])]).optional(), + cash_receipt: z.union([z.string(), z.enum([""])]).optional(), + check_image: z.union([z.string(), z.enum([""])]).optional(), + explanation: z.union([z.string(), z.enum([""])]).optional(), + original_transaction: z.string().optional(), + }), + z.enum([""]), + ]) + .optional(), + fraudulent: z + .union([ + z.object({ + additional_documentation: z + .union([z.string(), z.enum([""])]) + .optional(), + explanation: z.union([z.string(), z.enum([""])]).optional(), + }), + z.enum([""]), + ]) + .optional(), + merchandise_not_as_described: z + .union([ + z.object({ + additional_documentation: z + .union([z.string(), z.enum([""])]) + .optional(), + explanation: z.union([z.string(), z.enum([""])]).optional(), + received_at: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + return_description: z + .union([z.string(), z.enum([""])]) + .optional(), + return_status: z + .enum(["", "merchant_rejected", "successful"]) + .optional(), + returned_at: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + }), + z.enum([""]), + ]) + .optional(), + not_received: z + .union([ + z.object({ + additional_documentation: z + .union([z.string(), z.enum([""])]) + .optional(), + expected_at: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + explanation: z.union([z.string(), z.enum([""])]).optional(), + product_description: z + .union([z.string(), z.enum([""])]) + .optional(), + product_type: z.enum(["", "merchandise", "service"]).optional(), + }), + z.enum([""]), + ]) + .optional(), + other: z + .union([ + z.object({ + additional_documentation: z + .union([z.string(), z.enum([""])]) + .optional(), + explanation: z.union([z.string(), z.enum([""])]).optional(), + product_description: z + .union([z.string(), z.enum([""])]) + .optional(), + product_type: z.enum(["", "merchandise", "service"]).optional(), + }), + z.enum([""]), + ]) + .optional(), + reason: z + .enum([ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "not_received", + "other", + "service_not_as_described", + ]) + .optional(), + service_not_as_described: z + .union([ + z.object({ + additional_documentation: z + .union([z.string(), z.enum([""])]) + .optional(), + canceled_at: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + cancellation_reason: z + .union([z.string(), z.enum([""])]) + .optional(), + explanation: z.union([z.string(), z.enum([""])]).optional(), + received_at: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + }), + z.enum([""]), + ]) + .optional(), + }) + .optional(), + expand: z.array(z.string()).optional(), + metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + }) + .optional() + + const postIssuingDisputesDisputeResponseValidator = responseValidationFactory( + [["200", s_issuing_dispute]], + s_error, + ) + + router.post( + "postIssuingDisputesDispute", + "/v1/issuing/disputes/:dispute", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postIssuingDisputesDisputeParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postIssuingDisputesDisputeBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postIssuingDisputesDispute(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postIssuingDisputesDisputeResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postIssuingDisputesDisputeSubmitParamSchema = z.object({ + dispute: z.string(), + }) + + const postIssuingDisputesDisputeSubmitBodySchema = z + .object({ + expand: z.array(z.string()).optional(), + metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + }) + .optional() + + const postIssuingDisputesDisputeSubmitResponseValidator = + responseValidationFactory([["200", s_issuing_dispute]], s_error) + + router.post( + "postIssuingDisputesDisputeSubmit", + "/v1/issuing/disputes/:dispute/submit", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postIssuingDisputesDisputeSubmitParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postIssuingDisputesDisputeSubmitBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postIssuingDisputesDisputeSubmit(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postIssuingDisputesDisputeSubmitResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getIssuingPersonalizationDesignsQuerySchema = z.object({ + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + lookup_keys: z.array(z.string()).optional(), + preferences: z + .object({ + is_default: z.coerce.boolean().optional(), + is_platform_default: z.coerce.boolean().optional(), + }) + .optional(), + starting_after: z.string().optional(), + status: z.enum(["active", "inactive", "rejected", "review"]).optional(), + }) + + const getIssuingPersonalizationDesignsBodySchema = z.object({}).optional() + + const getIssuingPersonalizationDesignsResponseValidator = + responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(z.lazy(() => s_issuing_personalization_design)), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get( + "getIssuingPersonalizationDesigns", + "/v1/issuing/personalization_designs", + async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getIssuingPersonalizationDesignsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getIssuingPersonalizationDesignsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_issuing_personalization_design[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getIssuingPersonalizationDesigns(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getIssuingPersonalizationDesignsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postIssuingPersonalizationDesignsBodySchema = z.object({ + card_logo: z.string().optional(), + carrier_text: z + .object({ + footer_body: z.union([z.string(), z.enum([""])]).optional(), + footer_title: z.union([z.string(), z.enum([""])]).optional(), + header_body: z.union([z.string(), z.enum([""])]).optional(), + header_title: z.union([z.string(), z.enum([""])]).optional(), + }) + .optional(), + expand: z.array(z.string()).optional(), + lookup_key: z.string().optional(), + metadata: z.record(z.string()).optional(), + name: z.string().optional(), + physical_bundle: z.string(), + preferences: z.object({ is_default: z.coerce.boolean() }).optional(), + transfer_lookup_key: z.coerce.boolean().optional(), + }) + + const postIssuingPersonalizationDesignsResponseValidator = + responseValidationFactory( + [["200", s_issuing_personalization_design]], + s_error, + ) router.post( - "postIssuingDisputes", - "/v1/issuing/disputes", + "postIssuingPersonalizationDesigns", + "/v1/issuing/personalization_designs", async (ctx, next) => { const input = { params: undefined, query: undefined, body: parseRequestInput( - postIssuingDisputesBodySchema, + postIssuingPersonalizationDesignsBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -34526,7 +38720,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withDefault(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -34537,7 +38731,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .postIssuingDisputes(input, responder, ctx) + .postIssuingPersonalizationDesigns(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -34545,42 +38739,48 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = postIssuingDisputesResponseValidator(status, body) + ctx.body = postIssuingPersonalizationDesignsResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const getIssuingDisputesDisputeParamSchema = z.object({ dispute: z.string() }) + const getIssuingPersonalizationDesignsPersonalizationDesignParamSchema = + z.object({ personalization_design: z.string() }) - const getIssuingDisputesDisputeQuerySchema = z.object({ - expand: z.array(z.string()).optional(), - }) + const getIssuingPersonalizationDesignsPersonalizationDesignQuerySchema = + z.object({ expand: z.array(z.string()).optional() }) - const getIssuingDisputesDisputeBodySchema = z.object({}).optional() + const getIssuingPersonalizationDesignsPersonalizationDesignBodySchema = z + .object({}) + .optional() - const getIssuingDisputesDisputeResponseValidator = responseValidationFactory( - [["200", s_issuing_dispute]], - s_error, - ) + const getIssuingPersonalizationDesignsPersonalizationDesignResponseValidator = + responseValidationFactory( + [["200", s_issuing_personalization_design]], + s_error, + ) router.get( - "getIssuingDisputesDispute", - "/v1/issuing/disputes/:dispute", + "getIssuingPersonalizationDesignsPersonalizationDesign", + "/v1/issuing/personalization_designs/:personalization_design", async (ctx, next) => { const input = { params: parseRequestInput( - getIssuingDisputesDisputeParamSchema, + getIssuingPersonalizationDesignsPersonalizationDesignParamSchema, ctx.params, RequestInputType.RouteParam, ), query: parseRequestInput( - getIssuingDisputesDisputeQuerySchema, + getIssuingPersonalizationDesignsPersonalizationDesignQuerySchema, ctx.query, RequestInputType.QueryString, ), body: parseRequestInput( - getIssuingDisputesDisputeBodySchema, + getIssuingPersonalizationDesignsPersonalizationDesignBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -34588,7 +38788,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withDefault(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -34599,7 +38799,11 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .getIssuingDisputesDispute(input, responder, ctx) + .getIssuingPersonalizationDesignsPersonalizationDesign( + input, + responder, + ctx, + ) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -34607,192 +38811,62 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = getIssuingDisputesDisputeResponseValidator(status, body) + ctx.body = + getIssuingPersonalizationDesignsPersonalizationDesignResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const postIssuingDisputesDisputeParamSchema = z.object({ - dispute: z.string(), - }) + const postIssuingPersonalizationDesignsPersonalizationDesignParamSchema = + z.object({ personalization_design: z.string() }) - const postIssuingDisputesDisputeBodySchema = z + const postIssuingPersonalizationDesignsPersonalizationDesignBodySchema = z .object({ - amount: z.coerce.number().optional(), - evidence: z - .object({ - canceled: z - .union([ - z.object({ - additional_documentation: z - .union([z.string(), z.enum([""])]) - .optional(), - canceled_at: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - cancellation_policy_provided: z - .union([z.coerce.boolean(), z.enum([""])]) - .optional(), - cancellation_reason: z - .union([z.string(), z.enum([""])]) - .optional(), - expected_at: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - explanation: z.union([z.string(), z.enum([""])]).optional(), - product_description: z - .union([z.string(), z.enum([""])]) - .optional(), - product_type: z.enum(["", "merchandise", "service"]).optional(), - return_status: z - .enum(["", "merchant_rejected", "successful"]) - .optional(), - returned_at: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - }), - z.enum([""]), - ]) - .optional(), - duplicate: z - .union([ - z.object({ - additional_documentation: z - .union([z.string(), z.enum([""])]) - .optional(), - card_statement: z.union([z.string(), z.enum([""])]).optional(), - cash_receipt: z.union([z.string(), z.enum([""])]).optional(), - check_image: z.union([z.string(), z.enum([""])]).optional(), - explanation: z.union([z.string(), z.enum([""])]).optional(), - original_transaction: z.string().optional(), - }), - z.enum([""]), - ]) - .optional(), - fraudulent: z - .union([ - z.object({ - additional_documentation: z - .union([z.string(), z.enum([""])]) - .optional(), - explanation: z.union([z.string(), z.enum([""])]).optional(), - }), - z.enum([""]), - ]) - .optional(), - merchandise_not_as_described: z - .union([ - z.object({ - additional_documentation: z - .union([z.string(), z.enum([""])]) - .optional(), - explanation: z.union([z.string(), z.enum([""])]).optional(), - received_at: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - return_description: z - .union([z.string(), z.enum([""])]) - .optional(), - return_status: z - .enum(["", "merchant_rejected", "successful"]) - .optional(), - returned_at: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - }), - z.enum([""]), - ]) - .optional(), - not_received: z - .union([ - z.object({ - additional_documentation: z - .union([z.string(), z.enum([""])]) - .optional(), - expected_at: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - explanation: z.union([z.string(), z.enum([""])]).optional(), - product_description: z - .union([z.string(), z.enum([""])]) - .optional(), - product_type: z.enum(["", "merchandise", "service"]).optional(), - }), - z.enum([""]), - ]) - .optional(), - other: z - .union([ - z.object({ - additional_documentation: z - .union([z.string(), z.enum([""])]) - .optional(), - explanation: z.union([z.string(), z.enum([""])]).optional(), - product_description: z - .union([z.string(), z.enum([""])]) - .optional(), - product_type: z.enum(["", "merchandise", "service"]).optional(), - }), - z.enum([""]), - ]) - .optional(), - reason: z - .enum([ - "canceled", - "duplicate", - "fraudulent", - "merchandise_not_as_described", - "not_received", - "other", - "service_not_as_described", - ]) - .optional(), - service_not_as_described: z - .union([ - z.object({ - additional_documentation: z - .union([z.string(), z.enum([""])]) - .optional(), - canceled_at: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - cancellation_reason: z - .union([z.string(), z.enum([""])]) - .optional(), - explanation: z.union([z.string(), z.enum([""])]).optional(), - received_at: z - .union([z.coerce.number(), z.enum([""])]) - .optional(), - }), - z.enum([""]), - ]) - .optional(), - }) + card_logo: z.union([z.string(), z.enum([""])]).optional(), + carrier_text: z + .union([ + z.object({ + footer_body: z.union([z.string(), z.enum([""])]).optional(), + footer_title: z.union([z.string(), z.enum([""])]).optional(), + header_body: z.union([z.string(), z.enum([""])]).optional(), + header_title: z.union([z.string(), z.enum([""])]).optional(), + }), + z.enum([""]), + ]) .optional(), expand: z.array(z.string()).optional(), - metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + lookup_key: z.union([z.string(), z.enum([""])]).optional(), + metadata: z.record(z.string()).optional(), + name: z.union([z.string(), z.enum([""])]).optional(), + physical_bundle: z.string().optional(), + preferences: z.object({ is_default: z.coerce.boolean() }).optional(), + transfer_lookup_key: z.coerce.boolean().optional(), }) .optional() - const postIssuingDisputesDisputeResponseValidator = responseValidationFactory( - [["200", s_issuing_dispute]], - s_error, - ) + const postIssuingPersonalizationDesignsPersonalizationDesignResponseValidator = + responseValidationFactory( + [["200", s_issuing_personalization_design]], + s_error, + ) router.post( - "postIssuingDisputesDispute", - "/v1/issuing/disputes/:dispute", + "postIssuingPersonalizationDesignsPersonalizationDesign", + "/v1/issuing/personalization_designs/:personalization_design", async (ctx, next) => { const input = { params: parseRequestInput( - postIssuingDisputesDisputeParamSchema, + postIssuingPersonalizationDesignsPersonalizationDesignParamSchema, ctx.params, RequestInputType.RouteParam, ), query: undefined, body: parseRequestInput( - postIssuingDisputesDisputeBodySchema, + postIssuingPersonalizationDesignsPersonalizationDesignBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -34800,7 +38874,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withDefault(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -34811,7 +38885,11 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .postIssuingDisputesDispute(input, responder, ctx) + .postIssuingPersonalizationDesignsPersonalizationDesign( + input, + responder, + ctx, + ) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -34819,39 +38897,124 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = postIssuingDisputesDisputeResponseValidator(status, body) + ctx.body = + postIssuingPersonalizationDesignsPersonalizationDesignResponseValidator( + status, + body, + ) ctx.status = status return next() }, ) - const postIssuingDisputesDisputeSubmitParamSchema = z.object({ - dispute: z.string(), + const getIssuingPhysicalBundlesQuerySchema = z.object({ + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + starting_after: z.string().optional(), + status: z.enum(["active", "inactive", "review"]).optional(), + type: z.enum(["custom", "standard"]).optional(), }) - const postIssuingDisputesDisputeSubmitBodySchema = z - .object({ - expand: z.array(z.string()).optional(), - metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), - }) + const getIssuingPhysicalBundlesBodySchema = z.object({}).optional() + + const getIssuingPhysicalBundlesResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(s_issuing_physical_bundle), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get( + "getIssuingPhysicalBundles", + "/v1/issuing/physical_bundles", + async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getIssuingPhysicalBundlesQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getIssuingPhysicalBundlesBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_issuing_physical_bundle[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getIssuingPhysicalBundles(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getIssuingPhysicalBundlesResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getIssuingPhysicalBundlesPhysicalBundleParamSchema = z.object({ + physical_bundle: z.string(), + }) + + const getIssuingPhysicalBundlesPhysicalBundleQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getIssuingPhysicalBundlesPhysicalBundleBodySchema = z + .object({}) .optional() - const postIssuingDisputesDisputeSubmitResponseValidator = - responseValidationFactory([["200", s_issuing_dispute]], s_error) + const getIssuingPhysicalBundlesPhysicalBundleResponseValidator = + responseValidationFactory([["200", s_issuing_physical_bundle]], s_error) - router.post( - "postIssuingDisputesDisputeSubmit", - "/v1/issuing/disputes/:dispute/submit", + router.get( + "getIssuingPhysicalBundlesPhysicalBundle", + "/v1/issuing/physical_bundles/:physical_bundle", async (ctx, next) => { const input = { params: parseRequestInput( - postIssuingDisputesDisputeSubmitParamSchema, + getIssuingPhysicalBundlesPhysicalBundleParamSchema, ctx.params, RequestInputType.RouteParam, ), - query: undefined, + query: parseRequestInput( + getIssuingPhysicalBundlesPhysicalBundleQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), body: parseRequestInput( - postIssuingDisputesDisputeSubmitBodySchema, + getIssuingPhysicalBundlesPhysicalBundleBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -34859,7 +39022,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withDefault(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -34870,7 +39033,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .postIssuingDisputesDisputeSubmit(input, responder, ctx) + .getIssuingPhysicalBundlesPhysicalBundle(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -34878,7 +39041,10 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = postIssuingDisputesDisputeSubmitResponseValidator(status, body) + ctx.body = getIssuingPhysicalBundlesPhysicalBundleResponseValidator( + status, + body, + ) ctx.status = status return next() }, @@ -35090,6 +39256,208 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const getIssuingTokensQuerySchema = z.object({ + card: z.string(), + created: z + .union([ + z.object({ + gt: z.coerce.number().optional(), + gte: z.coerce.number().optional(), + lt: z.coerce.number().optional(), + lte: z.coerce.number().optional(), + }), + z.coerce.number(), + ]) + .optional(), + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + starting_after: z.string().optional(), + status: z.enum(["active", "deleted", "requested", "suspended"]).optional(), + }) + + const getIssuingTokensBodySchema = z.object({}).optional() + + const getIssuingTokensResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(z.lazy(() => s_issuing_token)), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get("getIssuingTokens", "/v1/issuing/tokens", async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getIssuingTokensQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getIssuingTokensBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_issuing_token[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getIssuingTokens(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getIssuingTokensResponseValidator(status, body) + ctx.status = status + return next() + }) + + const getIssuingTokensTokenParamSchema = z.object({ token: z.string() }) + + const getIssuingTokensTokenQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getIssuingTokensTokenBodySchema = z.object({}).optional() + + const getIssuingTokensTokenResponseValidator = responseValidationFactory( + [["200", s_issuing_token]], + s_error, + ) + + router.get( + "getIssuingTokensToken", + "/v1/issuing/tokens/:token", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getIssuingTokensTokenParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getIssuingTokensTokenQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getIssuingTokensTokenBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getIssuingTokensToken(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getIssuingTokensTokenResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postIssuingTokensTokenParamSchema = z.object({ token: z.string() }) + + const postIssuingTokensTokenBodySchema = z.object({ + expand: z.array(z.string()).optional(), + status: z.enum(["active", "deleted", "suspended"]), + }) + + const postIssuingTokensTokenResponseValidator = responseValidationFactory( + [["200", s_issuing_token]], + s_error, + ) + + router.post( + "postIssuingTokensToken", + "/v1/issuing/tokens/:token", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postIssuingTokensTokenParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postIssuingTokensTokenBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postIssuingTokensToken(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postIssuingTokensTokenResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + const getIssuingTransactionsQuerySchema = z.object({ card: z.string().optional(), cardholder: z.string().optional(), @@ -35316,7 +39684,9 @@ export function createRouter(implementation: Implementation): KoaRouter { permissions: z.array( z.enum(["balances", "ownership", "payment_method", "transactions"]), ), - prefetch: z.array(z.enum(["balances", "ownership"])).optional(), + prefetch: z + .array(z.enum(["balances", "ownership", "transactions"])) + .optional(), return_url: z.string().optional(), }) @@ -35722,7 +40092,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const postLinkedAccountsAccountRefreshBodySchema = z.object({ expand: z.array(z.string()).optional(), - features: z.array(z.enum(["balance", "ownership"])), + features: z.array(z.enum(["balance", "ownership", "transactions"])), }) const postLinkedAccountsAccountRefreshResponseValidator = @@ -35934,6 +40304,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), confirm: z.coerce.boolean().optional(), confirmation_method: z.enum(["automatic", "manual"]).optional(), + confirmation_token: z.string().optional(), currency: z.string(), customer: z.string().optional(), description: z.string().optional(), @@ -36086,6 +40457,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "knab", "moneyou", "n26", + "nn", "rabobank", "regiobank", "revolut", @@ -36112,6 +40484,7 @@ export function createRouter(implementation: Implementation): KoaRouter { konbini: z.object({}).optional(), link: z.object({}).optional(), metadata: z.record(z.string()).optional(), + mobilepay: z.object({}).optional(), oxxo: z.object({}).optional(), p24: z .object({ @@ -36141,6 +40514,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "santander_przelew24", "tmobile_usbugi_bankowe", "toyota_bank", + "velobank", "volkswagen_bank", ]) .optional(), @@ -36151,10 +40525,12 @@ export function createRouter(implementation: Implementation): KoaRouter { pix: z.object({}).optional(), promptpay: z.object({}).optional(), radar_options: z.object({ session: z.string().optional() }).optional(), + revolut_pay: z.object({}).optional(), sepa_debit: z.object({ iban: z.string() }).optional(), sofort: z .object({ country: z.enum(["AT", "BE", "DE", "ES", "IT", "NL"]) }) .optional(), + swish: z.object({}).optional(), type: z.enum([ "acss_debit", "affirm", @@ -36175,14 +40551,17 @@ export function createRouter(implementation: Implementation): KoaRouter { "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -36289,7 +40668,13 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), blik: z - .union([z.object({ code: z.string().optional() }), z.enum([""])]) + .union([ + z.object({ + code: z.string().optional(), + setup_future_usage: z.enum(["", "none"]).optional(), + }), + z.enum([""]), + ]) .optional(), boleto: z .union([ @@ -36356,7 +40741,20 @@ export function createRouter(implementation: Implementation): KoaRouter { "visa", ]) .optional(), - request_three_d_secure: z.enum(["any", "automatic"]).optional(), + request_extended_authorization: z + .enum(["if_available", "never"]) + .optional(), + request_incremental_authorization: z + .enum(["if_available", "never"]) + .optional(), + request_multicapture: z + .enum(["if_available", "never"]) + .optional(), + request_overcapture: z.enum(["if_available", "never"]).optional(), + request_three_d_secure: z + .enum(["any", "automatic", "challenge"]) + .optional(), + require_cvc_recollection: z.coerce.boolean().optional(), setup_future_usage: z .enum(["", "none", "off_session", "on_session"]) .optional(), @@ -36366,6 +40764,32 @@ export function createRouter(implementation: Implementation): KoaRouter { statement_descriptor_suffix_kanji: z .union([z.string(), z.enum([""])]) .optional(), + three_d_secure: z + .object({ + ares_trans_status: z + .enum(["A", "C", "I", "N", "R", "U", "Y"]) + .optional(), + cryptogram: z.string(), + electronic_commerce_indicator: z + .enum(["01", "02", "05", "06", "07"]) + .optional(), + exemption_indicator: z.enum(["low_risk", "none"]).optional(), + network_options: z + .object({ + cartes_bancaires: z + .object({ + cb_avalgo: z.enum(["0", "1", "2", "3", "4", "A"]), + cb_exemption: z.string().optional(), + cb_score: z.coerce.number().optional(), + }) + .optional(), + }) + .optional(), + requestor_challenge_indicator: z.string().optional(), + transaction_id: z.string(), + version: z.enum(["1.0.2", "2.1.0", "2.2.0"]), + }) + .optional(), }), z.enum([""]), ]) @@ -36549,6 +40973,15 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + mobilepay: z + .union([ + z.object({ + capture_method: z.enum(["", "manual"]).optional(), + setup_future_usage: z.enum(["none"]).optional(), + }), + z.enum([""]), + ]) + .optional(), oxxo: z .union([ z.object({ @@ -36627,6 +41060,16 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + revolut_pay: z + .union([ + z.object({ + setup_future_usage: z + .enum(["", "none", "off_session"]) + .optional(), + }), + z.enum([""]), + ]) + .optional(), sepa_debit: z .union([ z.object({ @@ -36651,6 +41094,15 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + swish: z + .union([ + z.object({ + reference: z.union([z.string(), z.enum([""])]).optional(), + setup_future_usage: z.enum(["none"]).optional(), + }), + z.enum([""]), + ]) + .optional(), us_bank_account: z .union([ z.object({ @@ -36666,10 +41118,15 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), return_url: z.string().optional(), }) .optional(), + mandate_options: z + .object({ collection_method: z.enum(["", "paper"]).optional() }) + .optional(), networks: z .object({ requested: z @@ -37067,6 +41524,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "knab", "moneyou", "n26", + "nn", "rabobank", "regiobank", "revolut", @@ -37093,6 +41551,7 @@ export function createRouter(implementation: Implementation): KoaRouter { konbini: z.object({}).optional(), link: z.object({}).optional(), metadata: z.record(z.string()).optional(), + mobilepay: z.object({}).optional(), oxxo: z.object({}).optional(), p24: z .object({ @@ -37122,6 +41581,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "santander_przelew24", "tmobile_usbugi_bankowe", "toyota_bank", + "velobank", "volkswagen_bank", ]) .optional(), @@ -37134,10 +41594,12 @@ export function createRouter(implementation: Implementation): KoaRouter { radar_options: z .object({ session: z.string().optional() }) .optional(), + revolut_pay: z.object({}).optional(), sepa_debit: z.object({ iban: z.string() }).optional(), sofort: z .object({ country: z.enum(["AT", "BE", "DE", "ES", "IT", "NL"]) }) .optional(), + swish: z.object({}).optional(), type: z.enum([ "acss_debit", "affirm", @@ -37158,14 +41620,17 @@ export function createRouter(implementation: Implementation): KoaRouter { "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -37274,7 +41739,13 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), blik: z - .union([z.object({ code: z.string().optional() }), z.enum([""])]) + .union([ + z.object({ + code: z.string().optional(), + setup_future_usage: z.enum(["", "none"]).optional(), + }), + z.enum([""]), + ]) .optional(), boleto: z .union([ @@ -37341,7 +41812,22 @@ export function createRouter(implementation: Implementation): KoaRouter { "visa", ]) .optional(), - request_three_d_secure: z.enum(["any", "automatic"]).optional(), + request_extended_authorization: z + .enum(["if_available", "never"]) + .optional(), + request_incremental_authorization: z + .enum(["if_available", "never"]) + .optional(), + request_multicapture: z + .enum(["if_available", "never"]) + .optional(), + request_overcapture: z + .enum(["if_available", "never"]) + .optional(), + request_three_d_secure: z + .enum(["any", "automatic", "challenge"]) + .optional(), + require_cvc_recollection: z.coerce.boolean().optional(), setup_future_usage: z .enum(["", "none", "off_session", "on_session"]) .optional(), @@ -37351,6 +41837,34 @@ export function createRouter(implementation: Implementation): KoaRouter { statement_descriptor_suffix_kanji: z .union([z.string(), z.enum([""])]) .optional(), + three_d_secure: z + .object({ + ares_trans_status: z + .enum(["A", "C", "I", "N", "R", "U", "Y"]) + .optional(), + cryptogram: z.string(), + electronic_commerce_indicator: z + .enum(["01", "02", "05", "06", "07"]) + .optional(), + exemption_indicator: z + .enum(["low_risk", "none"]) + .optional(), + network_options: z + .object({ + cartes_bancaires: z + .object({ + cb_avalgo: z.enum(["0", "1", "2", "3", "4", "A"]), + cb_exemption: z.string().optional(), + cb_score: z.coerce.number().optional(), + }) + .optional(), + }) + .optional(), + requestor_challenge_indicator: z.string().optional(), + transaction_id: z.string(), + version: z.enum(["1.0.2", "2.1.0", "2.2.0"]), + }) + .optional(), }), z.enum([""]), ]) @@ -37536,6 +42050,15 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + mobilepay: z + .union([ + z.object({ + capture_method: z.enum(["", "manual"]).optional(), + setup_future_usage: z.enum(["none"]).optional(), + }), + z.enum([""]), + ]) + .optional(), oxxo: z .union([ z.object({ @@ -37614,6 +42137,16 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + revolut_pay: z + .union([ + z.object({ + setup_future_usage: z + .enum(["", "none", "off_session"]) + .optional(), + }), + z.enum([""]), + ]) + .optional(), sepa_debit: z .union([ z.object({ @@ -37638,6 +42171,15 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + swish: z + .union([ + z.object({ + reference: z.union([z.string(), z.enum([""])]).optional(), + setup_future_usage: z.enum(["none"]).optional(), + }), + z.enum([""]), + ]) + .optional(), us_bank_account: z .union([ z.object({ @@ -37653,10 +42195,17 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), return_url: z.string().optional(), }) .optional(), + mandate_options: z + .object({ + collection_method: z.enum(["", "paper"]).optional(), + }) + .optional(), networks: z .object({ requested: z @@ -37909,6 +42458,7 @@ export function createRouter(implementation: Implementation): KoaRouter { amount_to_capture: z.coerce.number().optional(), application_fee_amount: z.coerce.number().optional(), expand: z.array(z.string()).optional(), + final_capture: z.coerce.boolean().optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), statement_descriptor: z.string().optional(), statement_descriptor_suffix: z.string().optional(), @@ -37976,6 +42526,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .enum(["automatic", "automatic_async", "manual"]) .optional(), client_secret: z.string().optional(), + confirmation_token: z.string().optional(), error_on_requires_action: z.coerce.boolean().optional(), expand: z.array(z.string()).optional(), mandate: z.string().optional(), @@ -38131,6 +42682,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "knab", "moneyou", "n26", + "nn", "rabobank", "regiobank", "revolut", @@ -38157,6 +42709,7 @@ export function createRouter(implementation: Implementation): KoaRouter { konbini: z.object({}).optional(), link: z.object({}).optional(), metadata: z.record(z.string()).optional(), + mobilepay: z.object({}).optional(), oxxo: z.object({}).optional(), p24: z .object({ @@ -38186,6 +42739,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "santander_przelew24", "tmobile_usbugi_bankowe", "toyota_bank", + "velobank", "volkswagen_bank", ]) .optional(), @@ -38198,10 +42752,12 @@ export function createRouter(implementation: Implementation): KoaRouter { radar_options: z .object({ session: z.string().optional() }) .optional(), + revolut_pay: z.object({}).optional(), sepa_debit: z.object({ iban: z.string() }).optional(), sofort: z .object({ country: z.enum(["AT", "BE", "DE", "ES", "IT", "NL"]) }) .optional(), + swish: z.object({}).optional(), type: z.enum([ "acss_debit", "affirm", @@ -38222,14 +42778,17 @@ export function createRouter(implementation: Implementation): KoaRouter { "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -38338,7 +42897,13 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), blik: z - .union([z.object({ code: z.string().optional() }), z.enum([""])]) + .union([ + z.object({ + code: z.string().optional(), + setup_future_usage: z.enum(["", "none"]).optional(), + }), + z.enum([""]), + ]) .optional(), boleto: z .union([ @@ -38405,7 +42970,22 @@ export function createRouter(implementation: Implementation): KoaRouter { "visa", ]) .optional(), - request_three_d_secure: z.enum(["any", "automatic"]).optional(), + request_extended_authorization: z + .enum(["if_available", "never"]) + .optional(), + request_incremental_authorization: z + .enum(["if_available", "never"]) + .optional(), + request_multicapture: z + .enum(["if_available", "never"]) + .optional(), + request_overcapture: z + .enum(["if_available", "never"]) + .optional(), + request_three_d_secure: z + .enum(["any", "automatic", "challenge"]) + .optional(), + require_cvc_recollection: z.coerce.boolean().optional(), setup_future_usage: z .enum(["", "none", "off_session", "on_session"]) .optional(), @@ -38415,6 +42995,34 @@ export function createRouter(implementation: Implementation): KoaRouter { statement_descriptor_suffix_kanji: z .union([z.string(), z.enum([""])]) .optional(), + three_d_secure: z + .object({ + ares_trans_status: z + .enum(["A", "C", "I", "N", "R", "U", "Y"]) + .optional(), + cryptogram: z.string(), + electronic_commerce_indicator: z + .enum(["01", "02", "05", "06", "07"]) + .optional(), + exemption_indicator: z + .enum(["low_risk", "none"]) + .optional(), + network_options: z + .object({ + cartes_bancaires: z + .object({ + cb_avalgo: z.enum(["0", "1", "2", "3", "4", "A"]), + cb_exemption: z.string().optional(), + cb_score: z.coerce.number().optional(), + }) + .optional(), + }) + .optional(), + requestor_challenge_indicator: z.string().optional(), + transaction_id: z.string(), + version: z.enum(["1.0.2", "2.1.0", "2.2.0"]), + }) + .optional(), }), z.enum([""]), ]) @@ -38600,6 +43208,15 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + mobilepay: z + .union([ + z.object({ + capture_method: z.enum(["", "manual"]).optional(), + setup_future_usage: z.enum(["none"]).optional(), + }), + z.enum([""]), + ]) + .optional(), oxxo: z .union([ z.object({ @@ -38678,6 +43295,16 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + revolut_pay: z + .union([ + z.object({ + setup_future_usage: z + .enum(["", "none", "off_session"]) + .optional(), + }), + z.enum([""]), + ]) + .optional(), sepa_debit: z .union([ z.object({ @@ -38702,6 +43329,15 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + swish: z + .union([ + z.object({ + reference: z.union([z.string(), z.enum([""])]).optional(), + setup_future_usage: z.enum(["none"]).optional(), + }), + z.enum([""]), + ]) + .optional(), us_bank_account: z .union([ z.object({ @@ -38717,10 +43353,17 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), return_url: z.string().optional(), }) .optional(), + mandate_options: z + .object({ + collection_method: z.enum(["", "paper"]).optional(), + }) + .optional(), networks: z .object({ requested: z @@ -39051,10 +43694,23 @@ export function createRouter(implementation: Implementation): KoaRouter { allow_promotion_codes: z.coerce.boolean().optional(), application_fee_amount: z.coerce.number().optional(), application_fee_percent: z.coerce.number().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), billing_address_collection: z.enum(["auto", "required"]).optional(), consent_collection: z .object({ + payment_method_reuse_agreement: z + .object({ position: z.enum(["auto", "hidden"]) }) + .optional(), promotions: z.enum(["auto", "none"]).optional(), terms_of_service: z.enum(["none", "required"]).optional(), }) @@ -39091,6 +43747,9 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), custom_text: z .object({ + after_submit: z + .union([z.object({ message: z.string() }), z.enum([""])]) + .optional(), shipping_address: z .union([z.object({ message: z.string() }), z.enum([""])]) .optional(), @@ -39104,6 +43763,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), customer_creation: z.enum(["always", "if_required"]).optional(), expand: z.array(z.string()).optional(), + inactive_message: z.string().optional(), invoice_creation: z .object({ enabled: z.coerce.boolean(), @@ -39120,6 +43780,12 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), description: z.string().optional(), footer: z.string().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), rendering_options: z .union([ @@ -39155,7 +43821,12 @@ export function createRouter(implementation: Implementation): KoaRouter { capture_method: z .enum(["automatic", "automatic_async", "manual"]) .optional(), + description: z.string().optional(), + metadata: z.record(z.string()).optional(), setup_future_usage: z.enum(["off_session", "on_session"]).optional(), + statement_descriptor: z.string().optional(), + statement_descriptor_suffix: z.string().optional(), + transfer_group: z.string().optional(), }) .optional(), payment_method_collection: z.enum(["always", "if_required"]).optional(), @@ -39188,6 +43859,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "promptpay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", ]), @@ -39196,6 +43868,9 @@ export function createRouter(implementation: Implementation): KoaRouter { phone_number_collection: z .object({ enabled: z.coerce.boolean() }) .optional(), + restrictions: z + .object({ completed_sessions: z.object({ limit: z.coerce.number() }) }) + .optional(), shipping_address_collection: z .object({ allowed_countries: z.array( @@ -39448,7 +44123,29 @@ export function createRouter(implementation: Implementation): KoaRouter { subscription_data: z .object({ description: z.string().optional(), + invoice_settings: z + .object({ + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), + metadata: z.record(z.string()).optional(), trial_period_days: z.coerce.number().optional(), + trial_settings: z + .object({ + end_behavior: z.object({ + missing_payment_method: z.enum([ + "cancel", + "create_invoice", + "pause", + ]), + }), + }) + .optional(), }) .optional(), tax_id_collection: z.object({ enabled: z.coerce.boolean() }).optional(), @@ -39580,7 +44277,17 @@ export function createRouter(implementation: Implementation): KoaRouter { }) .optional(), allow_promotion_codes: z.coerce.boolean().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), billing_address_collection: z.enum(["auto", "required"]).optional(), custom_fields: z .union([ @@ -39616,6 +44323,9 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), custom_text: z .object({ + after_submit: z + .union([z.object({ message: z.string() }), z.enum([""])]) + .optional(), shipping_address: z .union([z.object({ message: z.string() }), z.enum([""])]) .optional(), @@ -39629,6 +44339,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), customer_creation: z.enum(["always", "if_required"]).optional(), expand: z.array(z.string()).optional(), + inactive_message: z.union([z.string(), z.enum([""])]).optional(), invoice_creation: z .object({ enabled: z.coerce.boolean(), @@ -39645,6 +44356,12 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), description: z.string().optional(), footer: z.string().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), metadata: z .union([z.record(z.string()), z.enum([""])]) .optional(), @@ -39678,6 +44395,17 @@ export function createRouter(implementation: Implementation): KoaRouter { ) .optional(), metadata: z.record(z.string()).optional(), + payment_intent_data: z + .object({ + description: z.union([z.string(), z.enum([""])]).optional(), + metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + statement_descriptor: z.union([z.string(), z.enum([""])]).optional(), + statement_descriptor_suffix: z + .union([z.string(), z.enum([""])]) + .optional(), + transfer_group: z.union([z.string(), z.enum([""])]).optional(), + }) + .optional(), payment_method_collection: z.enum(["always", "if_required"]).optional(), payment_method_types: z .union([ @@ -39709,6 +44437,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "promptpay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", ]), @@ -39716,6 +44445,14 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + restrictions: z + .union([ + z.object({ + completed_sessions: z.object({ limit: z.coerce.number() }), + }), + z.enum([""]), + ]) + .optional(), shipping_address_collection: z .union([ z.object({ @@ -39964,6 +44701,35 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + subscription_data: z + .object({ + invoice_settings: z + .object({ + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), + metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + trial_settings: z + .union([ + z.object({ + end_behavior: z.object({ + missing_payment_method: z.enum([ + "cancel", + "create_invoice", + "pause", + ]), + }), + }), + z.enum([""]), + ]) + .optional(), + }) + .optional(), }) .optional() @@ -40274,6 +45040,13 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), + customer_balance: z + .object({ + display_preference: z + .object({ preference: z.enum(["none", "off", "on"]).optional() }) + .optional(), + }) + .optional(), eps: z .object({ display_preference: z @@ -40382,6 +45155,13 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), + revolut_pay: z + .object({ + display_preference: z + .object({ preference: z.enum(["none", "off", "on"]).optional() }) + .optional(), + }) + .optional(), sepa_debit: z .object({ display_preference: z @@ -40410,6 +45190,13 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), + zip: z + .object({ + display_preference: z + .object({ preference: z.enum(["none", "off", "on"]).optional() }) + .optional(), + }) + .optional(), }) .optional() @@ -40635,6 +45422,13 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), + customer_balance: z + .object({ + display_preference: z + .object({ preference: z.enum(["none", "off", "on"]).optional() }) + .optional(), + }) + .optional(), eps: z .object({ display_preference: z @@ -40742,6 +45536,13 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), + revolut_pay: z + .object({ + display_preference: z + .object({ preference: z.enum(["none", "off", "on"]).optional() }) + .optional(), + }) + .optional(), sepa_debit: z .object({ display_preference: z @@ -40770,6 +45571,13 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), }) .optional(), + zip: z + .object({ + display_preference: z + .object({ preference: z.enum(["none", "off", "on"]).optional() }) + .optional(), + }) + .optional(), }) .optional() @@ -41175,14 +45983,17 @@ export function createRouter(implementation: Implementation): KoaRouter { "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -41303,6 +46114,13 @@ export function createRouter(implementation: Implementation): KoaRouter { cvc: z.string().optional(), exp_month: z.coerce.number(), exp_year: z.coerce.number(), + networks: z + .object({ + preferred: z + .enum(["cartes_bancaires", "mastercard", "visa"]) + .optional(), + }) + .optional(), number: z.string(), }), z.object({ token: z.string() }), @@ -41390,6 +46208,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "knab", "moneyou", "n26", + "nn", "rabobank", "regiobank", "revolut", @@ -41416,6 +46235,7 @@ export function createRouter(implementation: Implementation): KoaRouter { konbini: z.object({}).optional(), link: z.object({}).optional(), metadata: z.record(z.string()).optional(), + mobilepay: z.object({}).optional(), oxxo: z.object({}).optional(), p24: z .object({ @@ -41445,6 +46265,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "santander_przelew24", "tmobile_usbugi_bankowe", "toyota_bank", + "velobank", "volkswagen_bank", ]) .optional(), @@ -41456,10 +46277,12 @@ export function createRouter(implementation: Implementation): KoaRouter { pix: z.object({}).optional(), promptpay: z.object({}).optional(), radar_options: z.object({ session: z.string().optional() }).optional(), + revolut_pay: z.object({}).optional(), sepa_debit: z.object({ iban: z.string() }).optional(), sofort: z .object({ country: z.enum(["AT", "BE", "DE", "ES", "IT", "NL"]) }) .optional(), + swish: z.object({}).optional(), type: z .enum([ "acss_debit", @@ -41482,14 +46305,17 @@ export function createRouter(implementation: Implementation): KoaRouter { "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -41647,6 +46473,13 @@ export function createRouter(implementation: Implementation): KoaRouter { .object({ exp_month: z.coerce.number().optional(), exp_year: z.coerce.number().optional(), + networks: z + .object({ + preferred: z + .enum(["", "cartes_bancaires", "mastercard", "visa"]) + .optional(), + }) + .optional(), }) .optional(), expand: z.array(z.string()).optional(), @@ -41655,6 +46488,7 @@ export function createRouter(implementation: Implementation): KoaRouter { us_bank_account: z .object({ account_holder_type: z.enum(["company", "individual"]).optional(), + account_type: z.enum(["checking", "savings"]).optional(), }) .optional(), }) @@ -42300,6 +47134,7 @@ export function createRouter(implementation: Implementation): KoaRouter { interval: z.enum(["day", "month", "week", "year"]), interval_count: z.coerce.number().optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), + meter: z.string().optional(), nickname: z.string().optional(), product: z .union([ @@ -42565,6 +47400,7 @@ export function createRouter(implementation: Implementation): KoaRouter { recurring: z .object({ interval: z.enum(["day", "month", "week", "year"]).optional(), + meter: z.string().optional(), usage_type: z.enum(["licensed", "metered"]).optional(), }) .optional(), @@ -42700,6 +47536,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), interval: z.enum(["day", "month", "week", "year"]), interval_count: z.coerce.number().optional(), + meter: z.string().optional(), usage_type: z.enum(["licensed", "metered"]).optional(), }) .optional(), @@ -43813,7 +48650,17 @@ export function createRouter(implementation: Implementation): KoaRouter { application_fee_percent: z .union([z.coerce.number(), z.enum([""])]) .optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), collection_method: z .enum(["charge_automatically", "send_invoice"]) .optional(), @@ -43828,6 +48675,7 @@ export function createRouter(implementation: Implementation): KoaRouter { z.object({ coupon: z.string().optional(), discount: z.string().optional(), + promotion_code: z.string().optional(), }), ), z.enum([""]), @@ -43844,11 +48692,31 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), header: z.union([z.string(), z.enum([""])]).optional(), invoice_settings: z - .object({ days_until_due: z.coerce.number().optional() }) + .object({ + days_until_due: z.coerce.number().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) .optional(), line_items: z .array( z.object({ + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), price: z.string().optional(), price_data: z .object({ @@ -43884,6 +48752,7 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + metadata: z.record(z.string()).optional(), trial_period_days: z .union([z.coerce.number(), z.enum([""])]) .optional(), @@ -44013,7 +48882,17 @@ export function createRouter(implementation: Implementation): KoaRouter { application_fee_percent: z .union([z.coerce.number(), z.enum([""])]) .optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), collection_method: z .enum(["charge_automatically", "send_invoice"]) .optional(), @@ -44028,6 +48907,7 @@ export function createRouter(implementation: Implementation): KoaRouter { z.object({ coupon: z.string().optional(), discount: z.string().optional(), + promotion_code: z.string().optional(), }), ), z.enum([""]), @@ -44038,11 +48918,31 @@ export function createRouter(implementation: Implementation): KoaRouter { footer: z.union([z.string(), z.enum([""])]).optional(), header: z.union([z.string(), z.enum([""])]).optional(), invoice_settings: z - .object({ days_until_due: z.coerce.number().optional() }) + .object({ + days_until_due: z.coerce.number().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) .optional(), line_items: z .array( z.object({ + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), id: z.string().optional(), price: z.string().optional(), price_data: z @@ -44079,6 +48979,7 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + metadata: z.record(z.string()).optional(), trial_period_days: z .union([z.coerce.number(), z.enum([""])]) .optional(), @@ -44546,6 +49447,17 @@ export function createRouter(implementation: Implementation): KoaRouter { const getRadarEarlyFraudWarningsQuerySchema = z.object({ charge: z.string().optional(), + created: z + .union([ + z.object({ + gt: z.coerce.number().optional(), + gte: z.coerce.number().optional(), + lt: z.coerce.number().optional(), + lte: z.coerce.number().optional(), + }), + z.coerce.number(), + ]) + .optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), limit: z.coerce.number().optional(), @@ -45691,6 +50603,8 @@ export function createRouter(implementation: Implementation): KoaRouter { "anticipation_repayment", "charge", "charge_failure", + "climate_order_purchase", + "climate_order_refund", "connect_collection_transfer", "connect_reserved_funds", "contribution", @@ -45706,7 +50620,6 @@ export function createRouter(implementation: Implementation): KoaRouter { "issuing_dispute", "issuing_transaction", "network_cost", - "obligation", "other_adjustment", "partial_capture_reversal", "payout", @@ -45721,6 +50634,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "topup_reversal", "transfer", "transfer_reversal", + "unreconciled_customer_funds", ]) .optional(), timezone: z @@ -46945,6 +51859,7 @@ export function createRouter(implementation: Implementation): KoaRouter { }) .optional(), confirm: z.coerce.boolean().optional(), + confirmation_token: z.string().optional(), customer: z.string().optional(), description: z.string().optional(), expand: z.array(z.string()).optional(), @@ -47092,6 +52007,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "knab", "moneyou", "n26", + "nn", "rabobank", "regiobank", "revolut", @@ -47118,6 +52034,7 @@ export function createRouter(implementation: Implementation): KoaRouter { konbini: z.object({}).optional(), link: z.object({}).optional(), metadata: z.record(z.string()).optional(), + mobilepay: z.object({}).optional(), oxxo: z.object({}).optional(), p24: z .object({ @@ -47147,6 +52064,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "santander_przelew24", "tmobile_usbugi_bankowe", "toyota_bank", + "velobank", "volkswagen_bank", ]) .optional(), @@ -47159,10 +52077,12 @@ export function createRouter(implementation: Implementation): KoaRouter { radar_options: z .object({ session: z.string().optional() }) .optional(), + revolut_pay: z.object({}).optional(), sepa_debit: z.object({ iban: z.string() }).optional(), sofort: z .object({ country: z.enum(["AT", "BE", "DE", "ES", "IT", "NL"]) }) .optional(), + swish: z.object({}).optional(), type: z.enum([ "acss_debit", "affirm", @@ -47183,14 +52103,17 @@ export function createRouter(implementation: Implementation): KoaRouter { "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -47270,9 +52193,37 @@ export function createRouter(implementation: Implementation): KoaRouter { "visa", ]) .optional(), - request_three_d_secure: z.enum(["any", "automatic"]).optional(), + request_three_d_secure: z + .enum(["any", "automatic", "challenge"]) + .optional(), + three_d_secure: z + .object({ + ares_trans_status: z + .enum(["A", "C", "I", "N", "R", "U", "Y"]) + .optional(), + cryptogram: z.string().optional(), + electronic_commerce_indicator: z + .enum(["01", "02", "05", "06", "07"]) + .optional(), + network_options: z + .object({ + cartes_bancaires: z + .object({ + cb_avalgo: z.enum(["0", "1", "2", "3", "4", "A"]), + cb_exemption: z.string().optional(), + cb_score: z.coerce.number().optional(), + }) + .optional(), + }) + .optional(), + requestor_challenge_indicator: z.string().optional(), + transaction_id: z.string().optional(), + version: z.enum(["1.0.2", "2.1.0", "2.2.0"]).optional(), + }) + .optional(), }) .optional(), + card_present: z.object({}).optional(), link: z.object({}).optional(), paypal: z .object({ billing_agreement_id: z.string().optional() }) @@ -47294,10 +52245,15 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), return_url: z.string().optional(), }) .optional(), + mandate_options: z + .object({ collection_method: z.enum(["", "paper"]).optional() }) + .optional(), networks: z .object({ requested: z @@ -47563,6 +52519,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "knab", "moneyou", "n26", + "nn", "rabobank", "regiobank", "revolut", @@ -47589,6 +52546,7 @@ export function createRouter(implementation: Implementation): KoaRouter { konbini: z.object({}).optional(), link: z.object({}).optional(), metadata: z.record(z.string()).optional(), + mobilepay: z.object({}).optional(), oxxo: z.object({}).optional(), p24: z .object({ @@ -47618,6 +52576,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "santander_przelew24", "tmobile_usbugi_bankowe", "toyota_bank", + "velobank", "volkswagen_bank", ]) .optional(), @@ -47630,10 +52589,12 @@ export function createRouter(implementation: Implementation): KoaRouter { radar_options: z .object({ session: z.string().optional() }) .optional(), + revolut_pay: z.object({}).optional(), sepa_debit: z.object({ iban: z.string() }).optional(), sofort: z .object({ country: z.enum(["AT", "BE", "DE", "ES", "IT", "NL"]) }) .optional(), + swish: z.object({}).optional(), type: z.enum([ "acss_debit", "affirm", @@ -47654,14 +52615,17 @@ export function createRouter(implementation: Implementation): KoaRouter { "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -47741,9 +52705,37 @@ export function createRouter(implementation: Implementation): KoaRouter { "visa", ]) .optional(), - request_three_d_secure: z.enum(["any", "automatic"]).optional(), + request_three_d_secure: z + .enum(["any", "automatic", "challenge"]) + .optional(), + three_d_secure: z + .object({ + ares_trans_status: z + .enum(["A", "C", "I", "N", "R", "U", "Y"]) + .optional(), + cryptogram: z.string().optional(), + electronic_commerce_indicator: z + .enum(["01", "02", "05", "06", "07"]) + .optional(), + network_options: z + .object({ + cartes_bancaires: z + .object({ + cb_avalgo: z.enum(["0", "1", "2", "3", "4", "A"]), + cb_exemption: z.string().optional(), + cb_score: z.coerce.number().optional(), + }) + .optional(), + }) + .optional(), + requestor_challenge_indicator: z.string().optional(), + transaction_id: z.string().optional(), + version: z.enum(["1.0.2", "2.1.0", "2.2.0"]).optional(), + }) + .optional(), }) .optional(), + card_present: z.object({}).optional(), link: z.object({}).optional(), paypal: z .object({ billing_agreement_id: z.string().optional() }) @@ -47765,10 +52757,15 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), return_url: z.string().optional(), }) .optional(), + mandate_options: z + .object({ collection_method: z.enum(["", "paper"]).optional() }) + .optional(), networks: z .object({ requested: z @@ -47905,6 +52902,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const postSetupIntentsIntentConfirmBodySchema = z .object({ client_secret: z.string().optional(), + confirmation_token: z.string().optional(), expand: z.array(z.string()).optional(), mandate_data: z .union([ @@ -48055,6 +53053,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "knab", "moneyou", "n26", + "nn", "rabobank", "regiobank", "revolut", @@ -48081,6 +53080,7 @@ export function createRouter(implementation: Implementation): KoaRouter { konbini: z.object({}).optional(), link: z.object({}).optional(), metadata: z.record(z.string()).optional(), + mobilepay: z.object({}).optional(), oxxo: z.object({}).optional(), p24: z .object({ @@ -48110,6 +53110,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "santander_przelew24", "tmobile_usbugi_bankowe", "toyota_bank", + "velobank", "volkswagen_bank", ]) .optional(), @@ -48122,10 +53123,12 @@ export function createRouter(implementation: Implementation): KoaRouter { radar_options: z .object({ session: z.string().optional() }) .optional(), + revolut_pay: z.object({}).optional(), sepa_debit: z.object({ iban: z.string() }).optional(), sofort: z .object({ country: z.enum(["AT", "BE", "DE", "ES", "IT", "NL"]) }) .optional(), + swish: z.object({}).optional(), type: z.enum([ "acss_debit", "affirm", @@ -48146,14 +53149,17 @@ export function createRouter(implementation: Implementation): KoaRouter { "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -48233,9 +53239,37 @@ export function createRouter(implementation: Implementation): KoaRouter { "visa", ]) .optional(), - request_three_d_secure: z.enum(["any", "automatic"]).optional(), + request_three_d_secure: z + .enum(["any", "automatic", "challenge"]) + .optional(), + three_d_secure: z + .object({ + ares_trans_status: z + .enum(["A", "C", "I", "N", "R", "U", "Y"]) + .optional(), + cryptogram: z.string().optional(), + electronic_commerce_indicator: z + .enum(["01", "02", "05", "06", "07"]) + .optional(), + network_options: z + .object({ + cartes_bancaires: z + .object({ + cb_avalgo: z.enum(["0", "1", "2", "3", "4", "A"]), + cb_exemption: z.string().optional(), + cb_score: z.coerce.number().optional(), + }) + .optional(), + }) + .optional(), + requestor_challenge_indicator: z.string().optional(), + transaction_id: z.string().optional(), + version: z.enum(["1.0.2", "2.1.0", "2.2.0"]).optional(), + }) + .optional(), }) .optional(), + card_present: z.object({}).optional(), link: z.object({}).optional(), paypal: z .object({ billing_agreement_id: z.string().optional() }) @@ -48257,10 +53291,15 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), return_url: z.string().optional(), }) .optional(), + mandate_options: z + .object({ collection_method: z.enum(["", "paper"]).optional() }) + .optional(), networks: z .object({ requested: z @@ -49553,6 +54592,18 @@ export function createRouter(implementation: Implementation): KoaRouter { billing_thresholds: z .union([z.object({ usage_gte: z.coerce.number() }), z.enum([""])]) .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), expand: z.array(z.string()).optional(), metadata: z.record(z.string()).optional(), payment_behavior: z @@ -49763,6 +54814,18 @@ export function createRouter(implementation: Implementation): KoaRouter { billing_thresholds: z .union([z.object({ usage_gte: z.coerce.number() }), z.enum([""])]) .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), expand: z.array(z.string()).optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), off_session: z.coerce.boolean().optional(), @@ -50135,7 +55198,17 @@ export function createRouter(implementation: Implementation): KoaRouter { default_settings: z .object({ application_fee_percent: z.coerce.number().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), billing_cycle_anchor: z.enum(["automatic", "phase_start"]).optional(), billing_thresholds: z .union([ @@ -50152,7 +55225,18 @@ export function createRouter(implementation: Implementation): KoaRouter { default_payment_method: z.string().optional(), description: z.union([z.string(), z.enum([""])]).optional(), invoice_settings: z - .object({ days_until_due: z.coerce.number().optional() }) + .object({ + account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + days_until_due: z.coerce.number().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) .optional(), on_behalf_of: z.union([z.string(), z.enum([""])]).optional(), transfer_data: z @@ -50176,6 +55260,15 @@ export function createRouter(implementation: Implementation): KoaRouter { add_invoice_items: z .array( z.object({ + discounts: z + .array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ) + .optional(), price: z.string().optional(), price_data: z .object({ @@ -50196,7 +55289,17 @@ export function createRouter(implementation: Implementation): KoaRouter { ) .optional(), application_fee_percent: z.coerce.number().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), billing_cycle_anchor: z .enum(["automatic", "phase_start"]) .optional(), @@ -50219,9 +55322,32 @@ export function createRouter(implementation: Implementation): KoaRouter { .union([z.array(z.string()), z.enum([""])]) .optional(), description: z.union([z.string(), z.enum([""])]).optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), end_date: z.coerce.number().optional(), invoice_settings: z - .object({ days_until_due: z.coerce.number().optional() }) + .object({ + account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + days_until_due: z.coerce.number().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) .optional(), items: z.array( z.object({ @@ -50231,6 +55357,18 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), metadata: z.record(z.string()).optional(), price: z.string().optional(), price_data: z @@ -50392,7 +55530,17 @@ export function createRouter(implementation: Implementation): KoaRouter { default_settings: z .object({ application_fee_percent: z.coerce.number().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), billing_cycle_anchor: z.enum(["automatic", "phase_start"]).optional(), billing_thresholds: z .union([ @@ -50409,7 +55557,18 @@ export function createRouter(implementation: Implementation): KoaRouter { default_payment_method: z.string().optional(), description: z.union([z.string(), z.enum([""])]).optional(), invoice_settings: z - .object({ days_until_due: z.coerce.number().optional() }) + .object({ + account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + days_until_due: z.coerce.number().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) .optional(), on_behalf_of: z.union([z.string(), z.enum([""])]).optional(), transfer_data: z @@ -50432,6 +55591,15 @@ export function createRouter(implementation: Implementation): KoaRouter { add_invoice_items: z .array( z.object({ + discounts: z + .array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ) + .optional(), price: z.string().optional(), price_data: z .object({ @@ -50452,7 +55620,17 @@ export function createRouter(implementation: Implementation): KoaRouter { ) .optional(), application_fee_percent: z.coerce.number().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), billing_cycle_anchor: z .enum(["automatic", "phase_start"]) .optional(), @@ -50474,9 +55652,32 @@ export function createRouter(implementation: Implementation): KoaRouter { .union([z.array(z.string()), z.enum([""])]) .optional(), description: z.union([z.string(), z.enum([""])]).optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), end_date: z.union([z.coerce.number(), z.enum(["now"])]).optional(), invoice_settings: z - .object({ days_until_due: z.coerce.number().optional() }) + .object({ + account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + days_until_due: z.coerce.number().optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) .optional(), items: z.array( z.object({ @@ -50486,6 +55687,18 @@ export function createRouter(implementation: Implementation): KoaRouter { z.enum([""]), ]) .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), metadata: z.record(z.string()).optional(), price: z.string().optional(), price_data: z @@ -50839,6 +56052,15 @@ export function createRouter(implementation: Implementation): KoaRouter { add_invoice_items: z .array( z.object({ + discounts: z + .array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ) + .optional(), price: z.string().optional(), price_data: z .object({ @@ -50856,10 +56078,31 @@ export function createRouter(implementation: Implementation): KoaRouter { }), ) .optional(), - application_fee_percent: z.coerce.number().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + application_fee_percent: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), backdate_start_date: z.coerce.number().optional(), billing_cycle_anchor: z.coerce.number().optional(), + billing_cycle_anchor_config: z + .object({ + day_of_month: z.coerce.number(), + hour: z.coerce.number().optional(), + minute: z.coerce.number().optional(), + month: z.coerce.number().optional(), + second: z.coerce.number().optional(), + }) + .optional(), billing_thresholds: z .union([ z.object({ @@ -50882,13 +56125,50 @@ export function createRouter(implementation: Implementation): KoaRouter { default_source: z.string().optional(), default_tax_rates: z.union([z.array(z.string()), z.enum([""])]).optional(), description: z.string().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), expand: z.array(z.string()).optional(), + invoice_settings: z + .object({ + account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), items: z .array( z.object({ billing_thresholds: z .union([z.object({ usage_gte: z.coerce.number() }), z.enum([""])]) .optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), metadata: z.record(z.string()).optional(), price: z.string().optional(), price_data: z @@ -50979,7 +56259,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), request_three_d_secure: z - .enum(["any", "automatic"]) + .enum(["any", "automatic", "challenge"]) .optional(), }), z.enum([""]), @@ -51002,6 +56282,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), konbini: z.union([z.object({}), z.enum([""])]).optional(), + sepa_debit: z.union([z.object({}), z.enum([""])]).optional(), us_bank_account: z .union([ z.object({ @@ -51017,7 +56298,9 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), }) .optional(), verification_method: z @@ -51043,12 +56326,14 @@ export function createRouter(implementation: Implementation): KoaRouter { "card", "cashapp", "customer_balance", + "eps", "fpx", "giropay", "grabpay", "ideal", "konbini", "link", + "p24", "paynow", "paypal", "promptpay", @@ -51374,6 +56659,15 @@ export function createRouter(implementation: Implementation): KoaRouter { add_invoice_items: z .array( z.object({ + discounts: z + .array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ) + .optional(), price: z.string().optional(), price_data: z .object({ @@ -51391,8 +56685,20 @@ export function createRouter(implementation: Implementation): KoaRouter { }), ) .optional(), - application_fee_percent: z.coerce.number().optional(), - automatic_tax: z.object({ enabled: z.coerce.boolean() }).optional(), + application_fee_percent: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + automatic_tax: z + .object({ + enabled: z.coerce.boolean(), + liability: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), billing_cycle_anchor: z.enum(["now", "unchanged"]).optional(), billing_thresholds: z .union([ @@ -51434,7 +56740,32 @@ export function createRouter(implementation: Implementation): KoaRouter { .union([z.array(z.string()), z.enum([""])]) .optional(), description: z.union([z.string(), z.enum([""])]).optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), expand: z.array(z.string()).optional(), + invoice_settings: z + .object({ + account_tax_ids: z + .union([z.array(z.string()), z.enum([""])]) + .optional(), + issuer: z + .object({ + account: z.string().optional(), + type: z.enum(["account", "self"]), + }) + .optional(), + }) + .optional(), items: z .array( z.object({ @@ -51443,6 +56774,18 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), clear_usage: z.coerce.boolean().optional(), deleted: z.coerce.boolean().optional(), + discounts: z + .union([ + z.array( + z.object({ + coupon: z.string().optional(), + discount: z.string().optional(), + promotion_code: z.string().optional(), + }), + ), + z.enum([""]), + ]) + .optional(), id: z.string().optional(), metadata: z.union([z.record(z.string()), z.enum([""])]).optional(), price: z.string().optional(), @@ -51543,7 +56886,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), request_three_d_secure: z - .enum(["any", "automatic"]) + .enum(["any", "automatic", "challenge"]) .optional(), }), z.enum([""]), @@ -51566,6 +56909,7 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), konbini: z.union([z.object({}), z.enum([""])]).optional(), + sepa_debit: z.union([z.object({}), z.enum([""])]).optional(), us_bank_account: z .union([ z.object({ @@ -51581,7 +56925,9 @@ export function createRouter(implementation: Implementation): KoaRouter { ]), ) .optional(), - prefetch: z.array(z.enum(["balances"])).optional(), + prefetch: z + .array(z.enum(["balances", "transactions"])) + .optional(), }) .optional(), verification_method: z @@ -51607,12 +56953,14 @@ export function createRouter(implementation: Implementation): KoaRouter { "card", "cashapp", "customer_balance", + "eps", "fpx", "giropay", "grabpay", "ideal", "konbini", "link", + "p24", "paynow", "paypal", "promptpay", @@ -51912,6 +57260,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "my_itn", "my_sst", "no_vat", + "no_voec", "nz_gst", "pe_ruc", "ph_tin", @@ -52099,6 +57448,571 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const getTaxRegistrationsQuerySchema = z.object({ + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + starting_after: z.string().optional(), + status: z.enum(["active", "all", "expired", "scheduled"]).optional(), + }) + + const getTaxRegistrationsBodySchema = z.object({}).optional() + + const getTaxRegistrationsResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(s_tax_registration), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get( + "getTaxRegistrations", + "/v1/tax/registrations", + async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getTaxRegistrationsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getTaxRegistrationsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_tax_registration[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getTaxRegistrations(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getTaxRegistrationsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postTaxRegistrationsBodySchema = z.object({ + active_from: z.union([z.enum(["now"]), z.coerce.number()]), + country: z.string(), + country_options: z.object({ + ae: z.object({ type: z.enum(["standard"]) }).optional(), + at: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + au: z.object({ type: z.enum(["standard"]) }).optional(), + be: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + bg: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + ca: z + .object({ + province_standard: z.object({ province: z.string() }).optional(), + type: z.enum(["province_standard", "simplified", "standard"]), + }) + .optional(), + ch: z.object({ type: z.enum(["standard"]) }).optional(), + cl: z.object({ type: z.enum(["simplified"]) }).optional(), + co: z.object({ type: z.enum(["simplified"]) }).optional(), + cy: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + cz: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + de: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + dk: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + ee: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + es: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + fi: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + fr: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + gb: z.object({ type: z.enum(["standard"]) }).optional(), + gr: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + hr: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + hu: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + id: z.object({ type: z.enum(["simplified"]) }).optional(), + ie: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + is: z.object({ type: z.enum(["standard"]) }).optional(), + it: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + jp: z.object({ type: z.enum(["standard"]) }).optional(), + kr: z.object({ type: z.enum(["simplified"]) }).optional(), + lt: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + lu: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + lv: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + mt: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + mx: z.object({ type: z.enum(["simplified"]) }).optional(), + my: z.object({ type: z.enum(["simplified"]) }).optional(), + nl: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + no: z.object({ type: z.enum(["standard"]) }).optional(), + nz: z.object({ type: z.enum(["standard"]) }).optional(), + pl: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + pt: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + ro: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + sa: z.object({ type: z.enum(["simplified"]) }).optional(), + se: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + sg: z.object({ type: z.enum(["standard"]) }).optional(), + si: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + sk: z + .object({ + standard: z + .object({ + place_of_supply_scheme: z.enum(["small_seller", "standard"]), + }) + .optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + .optional(), + th: z.object({ type: z.enum(["simplified"]) }).optional(), + tr: z.object({ type: z.enum(["simplified"]) }).optional(), + us: z + .object({ + local_amusement_tax: z + .object({ jurisdiction: z.string() }) + .optional(), + local_lease_tax: z.object({ jurisdiction: z.string() }).optional(), + state: z.string(), + type: z.enum([ + "local_amusement_tax", + "local_lease_tax", + "state_communications_tax", + "state_sales_tax", + ]), + }) + .optional(), + vn: z.object({ type: z.enum(["simplified"]) }).optional(), + za: z.object({ type: z.enum(["standard"]) }).optional(), + }), + expand: z.array(z.string()).optional(), + expires_at: z.coerce.number().optional(), + }) + + const postTaxRegistrationsResponseValidator = responseValidationFactory( + [["200", s_tax_registration]], + s_error, + ) + + router.post( + "postTaxRegistrations", + "/v1/tax/registrations", + async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postTaxRegistrationsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postTaxRegistrations(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postTaxRegistrationsResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const getTaxRegistrationsIdParamSchema = z.object({ id: z.string() }) + + const getTaxRegistrationsIdQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getTaxRegistrationsIdBodySchema = z.object({}).optional() + + const getTaxRegistrationsIdResponseValidator = responseValidationFactory( + [["200", s_tax_registration]], + s_error, + ) + + router.get( + "getTaxRegistrationsId", + "/v1/tax/registrations/:id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + getTaxRegistrationsIdParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getTaxRegistrationsIdQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getTaxRegistrationsIdBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getTaxRegistrationsId(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getTaxRegistrationsIdResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + + const postTaxRegistrationsIdParamSchema = z.object({ id: z.string() }) + + const postTaxRegistrationsIdBodySchema = z + .object({ + active_from: z.union([z.enum(["now"]), z.coerce.number()]).optional(), + expand: z.array(z.string()).optional(), + expires_at: z + .union([z.enum(["now"]), z.coerce.number(), z.enum([""])]) + .optional(), + }) + .optional() + + const postTaxRegistrationsIdResponseValidator = responseValidationFactory( + [["200", s_tax_registration]], + s_error, + ) + + router.post( + "postTaxRegistrationsId", + "/v1/tax/registrations/:id", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postTaxRegistrationsIdParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postTaxRegistrationsIdBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postTaxRegistrationsId(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postTaxRegistrationsIdResponseValidator(status, body) + ctx.status = status + return next() + }, + ) + const getTaxSettingsQuerySchema = z.object({ expand: z.array(z.string()).optional(), }) @@ -52622,6 +58536,314 @@ export function createRouter(implementation: Implementation): KoaRouter { return next() }) + const getTaxIdsQuerySchema = z.object({ + ending_before: z.string().optional(), + expand: z.array(z.string()).optional(), + limit: z.coerce.number().optional(), + owner: z + .object({ + account: z.string().optional(), + customer: z.string().optional(), + type: z.enum(["account", "application", "customer", "self"]), + }) + .optional(), + starting_after: z.string().optional(), + }) + + const getTaxIdsBodySchema = z.object({}).optional() + + const getTaxIdsResponseValidator = responseValidationFactory( + [ + [ + "200", + z.object({ + data: z.array(z.lazy(() => s_tax_id)), + has_more: z.coerce.boolean(), + object: z.enum(["list"]), + url: z.string(), + }), + ], + ], + s_error, + ) + + router.get("getTaxIds", "/v1/tax_ids", async (ctx, next) => { + const input = { + params: undefined, + query: parseRequestInput( + getTaxIdsQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getTaxIdsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse<{ + data: t_tax_id[] + has_more: boolean + object: "list" + url: string + }>(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getTaxIds(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getTaxIdsResponseValidator(status, body) + ctx.status = status + return next() + }) + + const postTaxIdsBodySchema = z.object({ + expand: z.array(z.string()).optional(), + owner: z + .object({ + account: z.string().optional(), + customer: z.string().optional(), + type: z.enum(["account", "application", "customer", "self"]), + }) + .optional(), + type: z.enum([ + "ad_nrt", + "ae_trn", + "ar_cuit", + "au_abn", + "au_arn", + "bg_uic", + "bo_tin", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_vat", + "cl_tin", + "cn_tin", + "co_nit", + "cr_tin", + "do_rcn", + "ec_ruc", + "eg_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", + "jp_trn", + "ke_pin", + "kr_brn", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "no_vat", + "no_voec", + "nz_gst", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sv_nit", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "us_ein", + "uy_ruc", + "ve_rif", + "vn_tin", + "za_vat", + ]), + value: z.string(), + }) + + const postTaxIdsResponseValidator = responseValidationFactory( + [["200", s_tax_id]], + s_error, + ) + + router.post("postTaxIds", "/v1/tax_ids", async (ctx, next) => { + const input = { + params: undefined, + query: undefined, + body: parseRequestInput( + postTaxIdsBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postTaxIds(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postTaxIdsResponseValidator(status, body) + ctx.status = status + return next() + }) + + const deleteTaxIdsIdParamSchema = z.object({ id: z.string() }) + + const deleteTaxIdsIdBodySchema = z.object({}).optional() + + const deleteTaxIdsIdResponseValidator = responseValidationFactory( + [["200", s_deleted_tax_id]], + s_error, + ) + + router.delete("deleteTaxIdsId", "/v1/tax_ids/:id", async (ctx, next) => { + const input = { + params: parseRequestInput( + deleteTaxIdsIdParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + deleteTaxIdsIdBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .deleteTaxIdsId(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = deleteTaxIdsIdResponseValidator(status, body) + ctx.status = status + return next() + }) + + const getTaxIdsIdParamSchema = z.object({ id: z.string() }) + + const getTaxIdsIdQuerySchema = z.object({ + expand: z.array(z.string()).optional(), + }) + + const getTaxIdsIdBodySchema = z.object({}).optional() + + const getTaxIdsIdResponseValidator = responseValidationFactory( + [["200", s_tax_id]], + s_error, + ) + + router.get("getTaxIdsId", "/v1/tax_ids/:id", async (ctx, next) => { + const input = { + params: parseRequestInput( + getTaxIdsIdParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: parseRequestInput( + getTaxIdsIdQuerySchema, + ctx.query, + RequestInputType.QueryString, + ), + body: parseRequestInput( + getTaxIdsIdBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .getTaxIdsId(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = getTaxIdsIdResponseValidator(status, body) + ctx.status = status + return next() + }) + const getTaxRatesQuerySchema = z.object({ active: z.coerce.boolean().optional(), created: z @@ -52729,7 +58951,6 @@ export function createRouter(implementation: Implementation): KoaRouter { "qst", "rst", "sales_tax", - "service_tax", "vat", ]) .optional(), @@ -52864,7 +59085,6 @@ export function createRouter(implementation: Implementation): KoaRouter { "qst", "rst", "sales_tax", - "service_tax", "vat", ]) .optional(), @@ -53004,6 +59224,10 @@ export function createRouter(implementation: Implementation): KoaRouter { }) .optional(), expand: z.array(z.string()).optional(), + name: z.string().optional(), + offline: z + .union([z.object({ enabled: z.coerce.boolean() }), z.enum([""])]) + .optional(), tipping: z .union([ z.object({ @@ -53320,6 +59544,10 @@ export function createRouter(implementation: Implementation): KoaRouter { ]) .optional(), expand: z.array(z.string()).optional(), + name: z.string().optional(), + offline: z + .union([z.object({ enabled: z.coerce.boolean() }), z.enum([""])]) + .optional(), tipping: z .union([ z.object({ @@ -53889,6 +60117,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "bbpos_chipper2x", "bbpos_wisepad3", "bbpos_wisepos_e", + "mobile_phone_reader", "simulated_wisepos_e", "stripe_m2", "verifone_P400", @@ -54282,6 +60511,7 @@ export function createRouter(implementation: Implementation): KoaRouter { payment_intent: z.string(), process_config: z .object({ + enable_customer_cancellation: z.coerce.boolean().optional(), skip_tipping: z.coerce.boolean().optional(), tipping: z .object({ amount_eligible: z.coerce.number().optional() }) @@ -54348,7 +60578,9 @@ export function createRouter(implementation: Implementation): KoaRouter { const postTerminalReadersReaderProcessSetupIntentBodySchema = z.object({ customer_consent_collected: z.coerce.boolean(), expand: z.array(z.string()).optional(), - process_config: z.object({}).optional(), + process_config: z + .object({ enable_customer_cancellation: z.coerce.boolean().optional() }) + .optional(), setup_intent: z.string(), }) @@ -54415,6 +60647,9 @@ export function createRouter(implementation: Implementation): KoaRouter { metadata: z.record(z.string()).optional(), payment_intent: z.string().optional(), refund_application_fee: z.coerce.boolean().optional(), + refund_payment_config: z + .object({ enable_customer_cancellation: z.coerce.boolean().optional() }) + .optional(), reverse_transfer: z.coerce.boolean().optional(), }) .optional() @@ -54453,7 +60688,81 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .postTerminalReadersReaderRefundPayment(input, responder, ctx) + .postTerminalReadersReaderRefundPayment(input, responder, ctx) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = postTerminalReadersReaderRefundPaymentResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const postTerminalReadersReaderSetReaderDisplayParamSchema = z.object({ + reader: z.string(), + }) + + const postTerminalReadersReaderSetReaderDisplayBodySchema = z.object({ + cart: z + .object({ + currency: z.string(), + line_items: z.array( + z.object({ + amount: z.coerce.number(), + description: z.string(), + quantity: z.coerce.number(), + }), + ), + tax: z.coerce.number().optional(), + total: z.coerce.number(), + }) + .optional(), + expand: z.array(z.string()).optional(), + type: z.enum(["cart"]), + }) + + const postTerminalReadersReaderSetReaderDisplayResponseValidator = + responseValidationFactory([["200", s_terminal_reader]], s_error) + + router.post( + "postTerminalReadersReaderSetReaderDisplay", + "/v1/terminal/readers/:reader/set_reader_display", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postTerminalReadersReaderSetReaderDisplayParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postTerminalReadersReaderSetReaderDisplayBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postTerminalReadersReaderSetReaderDisplay(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -54461,7 +60770,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = postTerminalReadersReaderRefundPaymentResponseValidator( + ctx.body = postTerminalReadersReaderSetReaderDisplayResponseValidator( status, body, ) @@ -54470,45 +60779,289 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) - const postTerminalReadersReaderSetReaderDisplayParamSchema = z.object({ - reader: z.string(), - }) - - const postTerminalReadersReaderSetReaderDisplayBodySchema = z.object({ - cart: z - .object({ - currency: z.string(), - line_items: z.array( - z.object({ - amount: z.coerce.number(), - description: z.string(), - quantity: z.coerce.number(), + const postTestHelpersConfirmationTokensBodySchema = z + .object({ + expand: z.array(z.string()).optional(), + payment_method: z.string().optional(), + payment_method_data: z + .object({ + acss_debit: z + .object({ + account_number: z.string(), + institution_number: z.string(), + transit_number: z.string(), + }) + .optional(), + affirm: z.object({}).optional(), + afterpay_clearpay: z.object({}).optional(), + alipay: z.object({}).optional(), + au_becs_debit: z + .object({ account_number: z.string(), bsb_number: z.string() }) + .optional(), + bacs_debit: z + .object({ + account_number: z.string().optional(), + sort_code: z.string().optional(), + }) + .optional(), + bancontact: z.object({}).optional(), + billing_details: z + .object({ + address: z + .union([ + z.object({ + city: z.string().optional(), + country: z.string().optional(), + line1: z.string().optional(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional(), + }), + z.enum([""]), + ]) + .optional(), + email: z.union([z.string(), z.enum([""])]).optional(), + name: z.union([z.string(), z.enum([""])]).optional(), + phone: z.union([z.string(), z.enum([""])]).optional(), + }) + .optional(), + blik: z.object({}).optional(), + boleto: z.object({ tax_id: z.string() }).optional(), + cashapp: z.object({}).optional(), + customer_balance: z.object({}).optional(), + eps: z + .object({ + bank: z + .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", + ]) + .optional(), + }) + .optional(), + fpx: z + .object({ + bank: z.enum([ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ]), + }) + .optional(), + giropay: z.object({}).optional(), + grabpay: z.object({}).optional(), + ideal: z + .object({ + bank: z + .enum([ + "abn_amro", + "asn_bank", + "bunq", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ]) + .optional(), + }) + .optional(), + interac_present: z.object({}).optional(), + klarna: z + .object({ + dob: z + .object({ + day: z.coerce.number(), + month: z.coerce.number(), + year: z.coerce.number(), + }) + .optional(), + }) + .optional(), + konbini: z.object({}).optional(), + link: z.object({}).optional(), + metadata: z.record(z.string()).optional(), + mobilepay: z.object({}).optional(), + oxxo: z.object({}).optional(), + p24: z + .object({ + bank: z + .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", + "velobank", + "volkswagen_bank", + ]) + .optional(), + }) + .optional(), + paynow: z.object({}).optional(), + paypal: z.object({}).optional(), + pix: z.object({}).optional(), + promptpay: z.object({}).optional(), + radar_options: z + .object({ session: z.string().optional() }) + .optional(), + revolut_pay: z.object({}).optional(), + sepa_debit: z.object({ iban: z.string() }).optional(), + sofort: z + .object({ country: z.enum(["AT", "BE", "DE", "ES", "IT", "NL"]) }) + .optional(), + swish: z.object({}).optional(), + type: z.enum([ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "mobilepay", + "oxxo", + "p24", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay", + "zip", + ]), + us_bank_account: z + .object({ + account_holder_type: z.enum(["company", "individual"]).optional(), + account_number: z.string().optional(), + account_type: z.enum(["checking", "savings"]).optional(), + financial_connections_account: z.string().optional(), + routing_number: z.string().optional(), + }) + .optional(), + wechat_pay: z.object({}).optional(), + zip: z.object({}).optional(), + }) + .optional(), + return_url: z.string().optional(), + setup_future_usage: z.enum(["off_session", "on_session"]).optional(), + shipping: z + .object({ + address: z.object({ + city: z.string().optional(), + country: z.string().optional(), + line1: z.string().optional(), + line2: z.string().optional(), + postal_code: z.string().optional(), + state: z.string().optional(), }), - ), - tax: z.coerce.number().optional(), - total: z.coerce.number(), - }) - .optional(), - expand: z.array(z.string()).optional(), - type: z.enum(["cart"]), - }) + name: z.string(), + phone: z.union([z.string(), z.enum([""])]).optional(), + }) + .optional(), + }) + .optional() - const postTerminalReadersReaderSetReaderDisplayResponseValidator = - responseValidationFactory([["200", s_terminal_reader]], s_error) + const postTestHelpersConfirmationTokensResponseValidator = + responseValidationFactory([["200", s_confirmation_token]], s_error) router.post( - "postTerminalReadersReaderSetReaderDisplay", - "/v1/terminal/readers/:reader/set_reader_display", + "postTestHelpersConfirmationTokens", + "/v1/test_helpers/confirmation_tokens", async (ctx, next) => { const input = { - params: parseRequestInput( - postTerminalReadersReaderSetReaderDisplayParamSchema, - ctx.params, - RequestInputType.RouteParam, - ), + params: undefined, query: undefined, body: parseRequestInput( - postTerminalReadersReaderSetReaderDisplayBodySchema, + postTestHelpersConfirmationTokensBodySchema, Reflect.get(ctx.request, "body"), RequestInputType.RequestBody, ), @@ -54516,7 +61069,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const responder = { with200() { - return new KoaRuntimeResponse(200) + return new KoaRuntimeResponse(200) }, withDefault(status: StatusCode) { return new KoaRuntimeResponse(status) @@ -54527,7 +61080,7 @@ export function createRouter(implementation: Implementation): KoaRouter { } const response = await implementation - .postTerminalReadersReaderSetReaderDisplay(input, responder, ctx) + .postTestHelpersConfirmationTokens(input, responder, ctx) .catch((err) => { throw KoaRuntimeError.HandlerError(err) }) @@ -54535,7 +61088,7 @@ export function createRouter(implementation: Implementation): KoaRouter { const { status, body } = response instanceof KoaRuntimeResponse ? response.unpack() : response - ctx.body = postTerminalReadersReaderSetReaderDisplayResponseValidator( + ctx.body = postTestHelpersConfirmationTokensResponseValidator( status, body, ) @@ -54934,6 +61487,7 @@ export function createRouter(implementation: Implementation): KoaRouter { postal_code: z.string().optional(), state: z.string().optional(), terminal_id: z.string().optional(), + url: z.string().optional(), }) .optional(), network_data: z @@ -54947,8 +61501,28 @@ export function createRouter(implementation: Implementation): KoaRouter { address_postal_code_check: z .enum(["match", "mismatch", "not_provided"]) .optional(), + authentication_exemption: z + .object({ + claimed_by: z.enum(["acquirer", "issuer"]), + type: z.enum([ + "low_value_transaction", + "transaction_risk_analysis", + "unknown", + ]), + }) + .optional(), cvc_check: z.enum(["match", "mismatch", "not_provided"]).optional(), expiry_check: z.enum(["match", "mismatch", "not_provided"]).optional(), + three_d_secure: z + .object({ + result: z.enum([ + "attempt_acknowledged", + "authenticated", + "failed", + "required", + ]), + }) + .optional(), }) .optional(), wallet: z.enum(["apple_pay", "google_pay", "samsung_pay"]).optional(), @@ -55557,6 +62131,232 @@ export function createRouter(implementation: Implementation): KoaRouter { }, ) + const postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParamSchema = + z.object({ personalization_design: z.string() }) + + const postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateBodySchema = + z.object({ expand: z.array(z.string()).optional() }).optional() + + const postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateResponseValidator = + responseValidationFactory( + [["200", s_issuing_personalization_design]], + s_error, + ) + + router.post( + "postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate", + "/v1/test_helpers/issuing/personalization_designs/:personalization_design/activate", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivate( + input, + responder, + ctx, + ) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParamSchema = + z.object({ personalization_design: z.string() }) + + const postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateBodySchema = + z.object({ expand: z.array(z.string()).optional() }).optional() + + const postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateResponseValidator = + responseValidationFactory( + [["200", s_issuing_personalization_design]], + s_error, + ) + + router.post( + "postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate", + "/v1/test_helpers/issuing/personalization_designs/:personalization_design/deactivate", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivate( + input, + responder, + ctx, + ) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + + const postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParamSchema = + z.object({ personalization_design: z.string() }) + + const postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectBodySchema = + z.object({ + expand: z.array(z.string()).optional(), + rejection_reasons: z.object({ + card_logo: z + .array( + z.enum([ + "geographic_location", + "inappropriate", + "network_name", + "non_binary_image", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ]), + ) + .optional(), + carrier_text: z + .array( + z.enum([ + "geographic_location", + "inappropriate", + "network_name", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ]), + ) + .optional(), + }), + }) + + const postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectResponseValidator = + responseValidationFactory( + [["200", s_issuing_personalization_design]], + s_error, + ) + + router.post( + "postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject", + "/v1/test_helpers/issuing/personalization_designs/:personalization_design/reject", + async (ctx, next) => { + const input = { + params: parseRequestInput( + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParamSchema, + ctx.params, + RequestInputType.RouteParam, + ), + query: undefined, + body: parseRequestInput( + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectBodySchema, + Reflect.get(ctx.request, "body"), + RequestInputType.RequestBody, + ), + } + + const responder = { + with200() { + return new KoaRuntimeResponse(200) + }, + withDefault(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + withStatus(status: StatusCode) { + return new KoaRuntimeResponse(status) + }, + } + + const response = await implementation + .postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignReject( + input, + responder, + ctx, + ) + .catch((err) => { + throw KoaRuntimeError.HandlerError(err) + }) + + const { status, body } = + response instanceof KoaRuntimeResponse ? response.unpack() : response + + ctx.body = + postTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectResponseValidator( + status, + body, + ) + ctx.status = status + return next() + }, + ) + const postTestHelpersIssuingTransactionsCreateForceCaptureBodySchema = z.object({ amount: z.coerce.number(), @@ -55870,6 +62670,7 @@ export function createRouter(implementation: Implementation): KoaRouter { postal_code: z.string().optional(), state: z.string().optional(), terminal_id: z.string().optional(), + url: z.string().optional(), }) .optional(), purchase_details: z @@ -56296,6 +63097,7 @@ export function createRouter(implementation: Implementation): KoaRouter { postal_code: z.string().optional(), state: z.string().optional(), terminal_id: z.string().optional(), + url: z.string().optional(), }) .optional(), purchase_details: z @@ -57737,6 +64539,7 @@ export function createRouter(implementation: Implementation): KoaRouter { "public_company", "public_corporation", "public_partnership", + "registered_charity", "single_member_llc", "sole_establishment", "sole_proprietorship", @@ -57834,6 +64637,17 @@ export function createRouter(implementation: Implementation): KoaRouter { state: z.string().optional(), }) .optional(), + relationship: z + .object({ + director: z.coerce.boolean().optional(), + executive: z.coerce.boolean().optional(), + owner: z.coerce.boolean().optional(), + percent_ownership: z + .union([z.coerce.number(), z.enum([""])]) + .optional(), + title: z.string().optional(), + }) + .optional(), ssn_last_4: z.string().optional(), verification: z .object({ @@ -57866,6 +64680,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .optional(), country: z.string(), currency: z.string().optional(), + payment_method: z.string().optional(), routing_number: z.string().optional(), }) .optional(), @@ -57883,6 +64698,13 @@ export function createRouter(implementation: Implementation): KoaRouter { exp_month: z.string(), exp_year: z.string(), name: z.string().optional(), + networks: z + .object({ + preferred: z + .enum(["cartes_bancaires", "mastercard", "visa"]) + .optional(), + }) + .optional(), number: z.string(), }), z.string(), @@ -57893,6 +64715,17 @@ export function createRouter(implementation: Implementation): KoaRouter { expand: z.array(z.string()).optional(), person: z .object({ + additional_tos_acceptances: z + .object({ + account: z + .object({ + date: z.coerce.number().optional(), + ip: z.string().optional(), + user_agent: z.union([z.string(), z.enum([""])]).optional(), + }) + .optional(), + }) + .optional(), address: z .object({ city: z.string().optional(), @@ -57992,6 +64825,7 @@ export function createRouter(implementation: Implementation): KoaRouter { .object({ director: z.coerce.boolean().optional(), executive: z.coerce.boolean().optional(), + legal_guardian: z.coerce.boolean().optional(), owner: z.coerce.boolean().optional(), percent_ownership: z .union([z.coerce.number(), z.enum([""])]) @@ -60136,6 +66970,17 @@ export function createRouter(implementation: Implementation): KoaRouter { ) const getTreasuryOutboundPaymentsQuerySchema = z.object({ + created: z + .union([ + z.object({ + gt: z.coerce.number().optional(), + gte: z.coerce.number().optional(), + lt: z.coerce.number().optional(), + lte: z.coerce.number().optional(), + }), + z.coerce.number(), + ]) + .optional(), customer: z.string().optional(), ending_before: z.string().optional(), expand: z.array(z.string()).optional(), @@ -61505,6 +68350,8 @@ export function createRouter(implementation: Implementation): KoaRouter { "2022-08-01", "2022-11-15", "2023-08-16", + "2023-10-16", + "2024-04-10", ]) .optional(), connect: z.coerce.boolean().optional(), @@ -61544,6 +68391,13 @@ export function createRouter(implementation: Implementation): KoaRouter { "checkout.session.async_payment_succeeded", "checkout.session.completed", "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", "coupon.created", "coupon.deleted", "coupon.updated", @@ -61578,6 +68432,8 @@ export function createRouter(implementation: Implementation): KoaRouter { "financial_connections.account.disconnected", "financial_connections.account.reactivated", "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", "identity.verification_session.canceled", "identity.verification_session.created", "identity.verification_session.processing", @@ -61611,6 +68467,8 @@ export function createRouter(implementation: Implementation): KoaRouter { "issuing_dispute.funds_reinstated", "issuing_dispute.submitted", "issuing_dispute.updated", + "issuing_token.created", + "issuing_token.updated", "issuing_transaction.created", "issuing_transaction.updated", "mandate.updated", @@ -61948,6 +68806,13 @@ export function createRouter(implementation: Implementation): KoaRouter { "checkout.session.async_payment_succeeded", "checkout.session.completed", "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", "coupon.created", "coupon.deleted", "coupon.updated", @@ -61982,6 +68847,8 @@ export function createRouter(implementation: Implementation): KoaRouter { "financial_connections.account.disconnected", "financial_connections.account.reactivated", "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", "identity.verification_session.canceled", "identity.verification_session.created", "identity.verification_session.processing", @@ -62015,6 +68882,8 @@ export function createRouter(implementation: Implementation): KoaRouter { "issuing_dispute.funds_reinstated", "issuing_dispute.submitted", "issuing_dispute.updated", + "issuing_token.created", + "issuing_token.updated", "issuing_transaction.created", "issuing_transaction.updated", "mandate.updated", diff --git a/integration-tests/typescript-koa/src/generated/stripe.yaml/models.ts b/integration-tests/typescript-koa/src/generated/stripe.yaml/models.ts index 37e02174..40247a34 100644 --- a/integration-tests/typescript-koa/src/generated/stripe.yaml/models.ts +++ b/integration-tests/typescript-koa/src/generated/stripe.yaml/models.ts @@ -41,8 +41,15 @@ export type t_account = { type?: "custom" | "express" | "standard" } +export type t_account_annual_revenue = { + amount?: number | null + currency?: string | null + fiscal_year_end?: string | null +} + export type t_account_bacs_debit_payments_settings = { - display_name?: string + display_name?: string | null + service_user_number?: string | null } export type t_account_branding_settings = { @@ -53,6 +60,8 @@ export type t_account_branding_settings = { } export type t_account_business_profile = { + annual_revenue?: t_account_annual_revenue | null + estimated_worker_count?: number | null mcc?: string | null monthly_estimated_revenue?: t_account_monthly_estimated_revenue name?: string | null @@ -68,6 +77,7 @@ export type t_account_capabilities = { acss_debit_payments?: "active" | "inactive" | "pending" affirm_payments?: "active" | "inactive" | "pending" afterpay_clearpay_payments?: "active" | "inactive" | "pending" + amazon_pay_payments?: "active" | "inactive" | "pending" au_becs_debit_payments?: "active" | "inactive" | "pending" bacs_debit_payments?: "active" | "inactive" | "pending" bancontact_payments?: "active" | "inactive" | "pending" @@ -89,12 +99,15 @@ export type t_account_capabilities = { konbini_payments?: "active" | "inactive" | "pending" legacy_payments?: "active" | "inactive" | "pending" link_payments?: "active" | "inactive" | "pending" + mobilepay_payments?: "active" | "inactive" | "pending" oxxo_payments?: "active" | "inactive" | "pending" p24_payments?: "active" | "inactive" | "pending" paynow_payments?: "active" | "inactive" | "pending" promptpay_payments?: "active" | "inactive" | "pending" + revolut_pay_payments?: "active" | "inactive" | "pending" sepa_debit_payments?: "active" | "inactive" | "pending" sofort_payments?: "active" | "inactive" | "pending" + swish_payments?: "active" | "inactive" | "pending" tax_reporting_us_1099_k?: "active" | "inactive" | "pending" tax_reporting_us_1099_misc?: "active" | "inactive" | "pending" transfers?: "active" | "inactive" | "pending" @@ -157,6 +170,10 @@ export type t_account_future_requirements = { pending_verification?: string[] | null } +export type t_account_invoices_settings = { + default_account_tax_ids?: (string | t_tax_id)[] | null +} + export type t_account_link = { created: number expires_at: number @@ -202,10 +219,43 @@ export type t_account_requirements_alternative = { export type t_account_requirements_error = { code: | "invalid_address_city_state_postal_code" + | "invalid_address_highway_contract_box" + | "invalid_address_private_mailbox" + | "invalid_business_profile_name" + | "invalid_business_profile_name_denylisted" + | "invalid_company_name_denylisted" + | "invalid_dob_age_over_maximum" | "invalid_dob_age_under_18" + | "invalid_dob_age_under_minimum" + | "invalid_product_description_length" + | "invalid_product_description_url_match" | "invalid_representative_country" + | "invalid_statement_descriptor_business_mismatch" + | "invalid_statement_descriptor_denylisted" + | "invalid_statement_descriptor_length" + | "invalid_statement_descriptor_prefix_denylisted" + | "invalid_statement_descriptor_prefix_mismatch" | "invalid_street_address" + | "invalid_tax_id" + | "invalid_tax_id_format" | "invalid_tos_acceptance" + | "invalid_url_denylisted" + | "invalid_url_format" + | "invalid_url_web_presence_detected" + | "invalid_url_website_business_information_mismatch" + | "invalid_url_website_empty" + | "invalid_url_website_inaccessible" + | "invalid_url_website_inaccessible_geoblocked" + | "invalid_url_website_inaccessible_password_protected" + | "invalid_url_website_incomplete" + | "invalid_url_website_incomplete_cancellation_policy" + | "invalid_url_website_incomplete_customer_service_details" + | "invalid_url_website_incomplete_legal_restrictions" + | "invalid_url_website_incomplete_refund_policy" + | "invalid_url_website_incomplete_return_policy" + | "invalid_url_website_incomplete_terms_and_conditions" + | "invalid_url_website_incomplete_under_construction" + | "invalid_url_website_other" | "invalid_value_other" | "verification_directors_mismatch" | "verification_document_address_mismatch" @@ -247,6 +297,7 @@ export type t_account_requirements_error = { | "verification_failed_keyed_match" | "verification_failed_name_match" | "verification_failed_other" + | "verification_failed_representative_authority" | "verification_failed_residential_address" | "verification_failed_tax_id_match" | "verification_failed_tax_id_not_issued" @@ -277,6 +328,7 @@ export type t_account_settings = { card_issuing?: t_account_card_issuing_settings card_payments: t_account_card_payments_settings dashboard: t_account_dashboard_settings + invoices?: t_account_invoices_settings payments: t_account_payments_settings payouts?: t_account_payout_settings sepa_debit_payments?: t_account_sepa_debit_payments_settings @@ -384,13 +436,14 @@ export type t_apps_secret = { export type t_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } export type t_balance = { available: t_balance_amount[] connect_reserved?: t_balance_amount[] - instant_available?: t_balance_amount[] + instant_available?: t_balance_amount_net[] issuing?: t_balance_detail livemode: boolean object: "balance" @@ -409,6 +462,12 @@ export type t_balance_amount_by_source_type = { fpx?: number } +export type t_balance_amount_net = { + amount: number + currency: string + source_types?: t_balance_amount_by_source_type +} + export type t_balance_detail = { available: t_balance_amount[] } @@ -455,22 +514,23 @@ export type t_balance_transaction = { | "application_fee" | "application_fee_refund" | "charge" + | "climate_order_purchase" + | "climate_order_refund" | "connect_collection_transfer" | "contribution" | "issuing_authorization_hold" | "issuing_authorization_release" | "issuing_dispute" | "issuing_transaction" - | "obligation_inbound" | "obligation_outbound" - | "obligation_payout" - | "obligation_payout_failure" | "obligation_reversal_inbound" - | "obligation_reversal_outbound" | "payment" | "payment_failure_refund" + | "payment_network_reserve_hold" + | "payment_network_reserve_release" | "payment_refund" | "payment_reversal" + | "payment_unreconciled" | "payout" | "payout_cancel" | "payout_failure" @@ -543,6 +603,7 @@ export type t_bank_connections_resource_balance_api_resource_credit_balance = { export type t_bank_connections_resource_balance_refresh = { last_attempted_at: number + next_refresh_available_at?: number | null status: "failed" | "pending" | "succeeded" } @@ -555,6 +616,66 @@ export type t_bank_connections_resource_ownership_refresh = { status: "failed" | "pending" | "succeeded" } +export type t_bank_connections_resource_transaction_refresh = { + id: string + last_attempted_at: number + next_refresh_available_at?: number | null + status: "failed" | "pending" | "succeeded" +} + +export type t_bank_connections_resource_transaction_resource_status_transitions = + { + posted_at?: number | null + void_at?: number | null + } + +export type t_billing_meter = { + created: number + customer_mapping: t_billing_meter_resource_customer_mapping_settings + default_aggregation: t_billing_meter_resource_aggregation_settings + display_name: string + event_name: string + event_time_window?: "day" | "hour" | null + id: string + livemode: boolean + object: "billing.meter" + status: "active" | "inactive" + status_transitions: t_billing_meter_resource_billing_meter_status_transitions + updated: number + value_settings: t_billing_meter_resource_billing_meter_value +} + +export type t_billing_meter_event = { + created: number + event_name: string + identifier: string + livemode: boolean + object: "billing.meter_event" + payload: { + [key: string]: string | undefined + } + timestamp: number +} + +export type t_billing_meter_event_adjustment = { + cancel: t_billing_meter_resource_billing_meter_event_adjustment_cancel + event_name: string + livemode: boolean + object: "billing.meter_event_adjustment" + status: "complete" | "pending" + type: "cancel" +} + +export type t_billing_meter_event_summary = { + aggregated_value: number + end_time: number + id: string + livemode: boolean + meter: string + object: "billing.meter_event_summary" + start_time: number +} + export type t_billing_details = { address?: t_address | null email?: string | null @@ -562,6 +683,27 @@ export type t_billing_details = { phone?: string | null } +export type t_billing_meter_resource_aggregation_settings = { + formula: "count" | "sum" +} + +export type t_billing_meter_resource_billing_meter_event_adjustment_cancel = { + identifier: string +} + +export type t_billing_meter_resource_billing_meter_status_transitions = { + deactivated_at?: number | null +} + +export type t_billing_meter_resource_billing_meter_value = { + event_payload_key: string +} + +export type t_billing_meter_resource_customer_mapping_settings = { + event_payload_key: string + type: "by_id" +} + export type t_billing_portal_configuration = { active: boolean application?: string | t_application | t_deleted_application | null @@ -700,6 +842,7 @@ export type t_card = { [key: string]: string | undefined } | null name?: string | null + networks?: t_token_card_networks object: "card" status?: string | null tokenization_method?: string | null @@ -812,6 +955,7 @@ export type t_checkout_session = { billing_address_collection?: "auto" | "required" | null cancel_url?: string | null client_reference_id?: string | null + client_secret?: string | null consent?: t_payment_pages_checkout_session_consent | null consent_collection?: t_payment_pages_checkout_session_consent_collection | null created: number @@ -891,6 +1035,8 @@ export type t_checkout_session = { payment_status: "no_payment_required" | "paid" | "unpaid" phone_number_collection?: t_payment_pages_checkout_session_phone_number_collection recovered_from?: string | null + redirect_on_completion?: "always" | "if_required" | "never" + return_url?: string setup_intent?: string | t_setup_intent | null shipping_address_collection?: t_payment_pages_checkout_session_shipping_address_collection | null shipping_cost?: t_payment_pages_checkout_session_shipping_cost | null @@ -902,6 +1048,7 @@ export type t_checkout_session = { success_url?: string | null tax_id_collection?: t_payment_pages_checkout_session_tax_id_collection total_details?: t_payment_pages_checkout_session_total_details | null + ui_mode?: "embedded" | "hosted" | null url?: string | null } @@ -955,6 +1102,7 @@ export type t_checkout_card_installments_options = { export type t_checkout_card_payment_method_options = { installments?: t_checkout_card_installments_options + request_three_d_secure: "any" | "automatic" | "challenge" setup_future_usage?: "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -1036,10 +1184,19 @@ export type t_checkout_paynow_payment_method_options = { setup_future_usage?: "none" } +export type t_checkout_paypal_payment_method_options = { + capture_method?: "manual" + preferred_locale?: string | null + reference?: string | null + setup_future_usage?: "none" | "off_session" +} + export type t_checkout_pix_payment_method_options = { expires_after_seconds?: number | null } +export type t_checkout_revolut_pay_payment_method_options = EmptyObject + export type t_checkout_sepa_debit_payment_method_options = { setup_future_usage?: "none" | "off_session" | "on_session" } @@ -1067,9 +1224,12 @@ export type t_checkout_session_payment_method_options = { oxxo?: t_checkout_oxxo_payment_method_options p24?: t_checkout_p24_payment_method_options paynow?: t_checkout_paynow_payment_method_options + paypal?: t_checkout_paypal_payment_method_options pix?: t_checkout_pix_payment_method_options + revolut_pay?: t_checkout_revolut_pay_payment_method_options sepa_debit?: t_checkout_sepa_debit_payment_method_options sofort?: t_checkout_sofort_payment_method_options + swish?: t_checkout_swish_payment_method_options us_bank_account?: t_checkout_us_bank_account_payment_method_options } @@ -1077,12 +1237,216 @@ export type t_checkout_sofort_payment_method_options = { setup_future_usage?: "none" } +export type t_checkout_swish_payment_method_options = { + reference?: string | null +} + export type t_checkout_us_bank_account_payment_method_options = { financial_connections?: t_linked_account_options_us_bank_account setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" } +export type t_climate_order = { + amount_fees: number + amount_subtotal: number + amount_total: number + beneficiary?: t_climate_removals_beneficiary + canceled_at?: number | null + cancellation_reason?: "expired" | "product_unavailable" | "requested" | null + certificate?: string | null + confirmed_at?: number | null + created: number + currency: string + delayed_at?: number | null + delivered_at?: number | null + delivery_details: t_climate_removals_order_deliveries[] + expected_delivery_year: number + id: string + livemode: boolean + metadata: { + [key: string]: string | undefined + } + metric_tons: string + object: "climate.order" + product: string | t_climate_product + product_substituted_at?: number | null + status: "awaiting_funds" | "canceled" | "confirmed" | "delivered" | "open" +} + +export type t_climate_product = { + created: number + current_prices_per_metric_ton: { + [key: string]: t_climate_removals_products_price | undefined + } + delivery_year?: number | null + id: string + livemode: boolean + metric_tons_available: string + name: string + object: "climate.product" + suppliers: t_climate_supplier[] +} + +export type t_climate_supplier = { + id: string + info_url: string + livemode: boolean + locations: t_climate_removals_location[] + name: string + object: "climate.supplier" + removal_pathway: + | "biomass_carbon_removal_and_storage" + | "direct_air_capture" + | "enhanced_weathering" +} + +export type t_climate_removals_beneficiary = { + public_name: string +} + +export type t_climate_removals_location = { + city?: string | null + country: string + latitude?: number | null + longitude?: number | null + region?: string | null +} + +export type t_climate_removals_order_deliveries = { + delivered_at: number + location?: t_climate_removals_location | null + metric_tons: string + registry_url?: string | null + supplier: t_climate_supplier +} + +export type t_climate_removals_products_price = { + amount_fees: number + amount_subtotal: number + amount_total: number +} + +export type t_confirmation_token = { + created: number + expires_at?: number | null + id: string + livemode: boolean + mandate_data?: t_confirmation_tokens_resource_mandate_data | null + object: "confirmation_token" + payment_intent?: string | null + payment_method_preview?: t_confirmation_tokens_resource_payment_method_preview | null + return_url?: string | null + setup_future_usage?: "off_session" | "on_session" | null + setup_intent?: string | null + shipping?: t_confirmation_tokens_resource_shipping | null + use_stripe_sdk: boolean +} + +export type t_confirmation_tokens_resource_mandate_data = { + customer_acceptance: t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance +} + +export type t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance = + { + online?: t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online | null + type: string + } + +export type t_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online = + { + ip_address?: string | null + user_agent?: string | null + } + +export type t_confirmation_tokens_resource_payment_method_preview = { + acss_debit?: t_payment_method_acss_debit + affirm?: t_payment_method_affirm + afterpay_clearpay?: t_payment_method_afterpay_clearpay + alipay?: t_payment_flows_private_payment_methods_alipay + au_becs_debit?: t_payment_method_au_becs_debit + bacs_debit?: t_payment_method_bacs_debit + bancontact?: t_payment_method_bancontact + billing_details: t_billing_details + blik?: t_payment_method_blik + boleto?: t_payment_method_boleto + card?: t_payment_method_card + card_present?: t_payment_method_card_present + cashapp?: t_payment_method_cashapp + customer_balance?: t_payment_method_customer_balance + eps?: t_payment_method_eps + fpx?: t_payment_method_fpx + giropay?: t_payment_method_giropay + grabpay?: t_payment_method_grabpay + ideal?: t_payment_method_ideal + interac_present?: t_payment_method_interac_present + klarna?: t_payment_method_klarna + konbini?: t_payment_method_konbini + link?: t_payment_method_link + mobilepay?: t_payment_method_mobilepay + oxxo?: t_payment_method_oxxo + p24?: t_payment_method_p24 + paynow?: t_payment_method_paynow + paypal?: t_payment_method_paypal + pix?: t_payment_method_pix + promptpay?: t_payment_method_promptpay + revolut_pay?: t_payment_method_revolut_pay + sepa_debit?: t_payment_method_sepa_debit + sofort?: t_payment_method_sofort + swish?: t_payment_method_swish + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "card" + | "card_present" + | "cashapp" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "interac_present" + | "klarna" + | "konbini" + | "link" + | "mobilepay" + | "oxxo" + | "p24" + | "paynow" + | "paypal" + | "pix" + | "promptpay" + | "revolut_pay" + | "sepa_debit" + | "sofort" + | "swish" + | "us_bank_account" + | "wechat_pay" + | "zip" + us_bank_account?: t_payment_method_us_bank_account + wechat_pay?: t_payment_method_wechat_pay + zip?: t_payment_method_zip +} + +export type t_confirmation_tokens_resource_shipping = { + address: t_address + name: string + phone?: string | null +} + +export type t_connect_account_reference = { + account?: string | t_account + type: "account" | "self" +} + export type t_connect_collection_transfer = { amount: number currency: string @@ -1092,12 +1456,49 @@ export type t_connect_collection_transfer = { object: "connect_collection_transfer" } +export type t_connect_embedded_account_config = { + enabled: boolean + features: t_connect_embedded_account_features +} + +export type t_connect_embedded_account_features = EmptyObject + export type t_connect_embedded_account_session_create_components = { - account_onboarding: t_connect_embedded_base_config_claim + account_onboarding: t_connect_embedded_account_config + documents: t_connect_embedded_base_config_claim + payment_details: t_connect_embedded_payments_config + payments: t_connect_embedded_payments_config + payouts: t_connect_embedded_payouts_config } export type t_connect_embedded_base_config_claim = { enabled: boolean + features: t_connect_embedded_base_features +} + +export type t_connect_embedded_base_features = EmptyObject + +export type t_connect_embedded_payments_config = { + enabled: boolean + features: t_connect_embedded_payments_features +} + +export type t_connect_embedded_payments_features = { + capture_payments: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management: boolean + refund_management: boolean +} + +export type t_connect_embedded_payouts_config = { + enabled: boolean + features: t_connect_embedded_payouts_features +} + +export type t_connect_embedded_payouts_features = { + edit_payout_schedule: boolean + instant_payouts: boolean + standard_payouts: boolean } export type t_country_spec = { @@ -1189,7 +1590,7 @@ export type t_credit_note = { | "product_unsatisfactory" | null refund?: string | t_refund | null - shipping_cost?: t_invoices_shipping_cost | null + shipping_cost?: t_invoices_resource_shipping_cost | null status: "issued" | "void" subtotal: number subtotal_excluding_tax?: number | null @@ -1382,6 +1783,11 @@ export type t_customer_balance_resource_cash_balance_transaction_resource_refund refund: string | t_refund } +export type t_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance = + { + balance_transaction: string | t_balance_transaction + } + export type t_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction = { payment_intent: string | t_payment_intent @@ -1428,6 +1834,7 @@ export type t_customer_cash_balance_transaction = { net_amount: number object: "customer_cash_balance_transaction" refunded_from_payment?: t_customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction + transferred_to_balance?: t_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance type: | "adjusted_for_overdraft" | "applied_to_payment" @@ -1436,10 +1843,34 @@ export type t_customer_cash_balance_transaction = { | "refunded_from_payment" | "return_canceled" | "return_initiated" + | "transferred_to_balance" | "unapplied_from_payment" unapplied_from_payment?: t_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction } +export type t_customer_session = { + client_secret: string + components?: t_customer_session_resource_components + created: number + customer: string | t_customer + expires_at: number + livemode: boolean + object: "customer_session" +} + +export type t_customer_session_resource_components = { + buy_button: t_customer_session_resource_components_resource_buy_button + pricing_table: t_customer_session_resource_components_resource_pricing_table +} + +export type t_customer_session_resource_components_resource_buy_button = { + enabled: boolean +} + +export type t_customer_session_resource_components_resource_pricing_table = { + enabled: boolean +} + export type t_customer_tax = { automatic_tax: | "failed" @@ -1517,6 +1948,7 @@ export type t_deleted_discount = { promotion_code?: string | t_promotion_code | null start: number subscription?: string | null + subscription_item?: string | null } export type t_deleted_external_account = t_deleted_bank_account | t_deleted_card @@ -1613,6 +2045,8 @@ export type t_deleted_webhook_endpoint = { object: "webhook_endpoint" } +export type t_destination_details_unimplemented = EmptyObject + export type t_discount = { checkout_session?: string | null coupon: t_coupon @@ -1625,6 +2059,7 @@ export type t_discount = { promotion_code?: string | t_promotion_code | null start: number subscription?: string | null + subscription_item?: string | null } export type t_discounts_resource_discount_amount = { @@ -1632,6 +2067,12 @@ export type t_discounts_resource_discount_amount = { discount: string | t_discount | t_deleted_discount } +export type t_discounts_resource_stackable_discount = { + coupon?: string | t_coupon | null + discount?: string | t_discount | null + promotion_code?: string | t_promotion_code | null +} + export type t_dispute = { amount: number balance_transactions: t_balance_transaction[] @@ -1849,7 +2290,9 @@ export type t_financial_connections_account = { | "mortgage" | "other" | "savings" + subscriptions?: "transactions"[] | null supported_payment_method_types: ("link" | "us_bank_account")[] + transaction_refresh?: t_bank_connections_resource_transaction_refresh | null } export type t_financial_connections_account_owner = { @@ -1889,10 +2332,25 @@ export type t_financial_connections_session = { livemode: boolean object: "financial_connections.session" permissions: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: ("balances" | "ownership")[] | null + prefetch?: ("balances" | "ownership" | "transactions")[] | null return_url?: string } +export type t_financial_connections_transaction = { + account: string + amount: number + currency: string + description: string + id: string + livemode: boolean + object: "financial_connections.transaction" + status: "pending" | "posted" | "void" + status_transitions: t_bank_connections_resource_transaction_resource_status_transitions + transacted_at: number + transaction_refresh: string + updated: number +} + export type t_financial_reporting_finance_report_run_run_parameters = { columns?: string[] connected_account?: string @@ -1904,6 +2362,47 @@ export type t_financial_reporting_finance_report_run_run_parameters = { timezone?: string } +export type t_forwarded_request_context = { + destination_duration: number + destination_ip_address: string +} + +export type t_forwarded_request_details = { + body: string + headers: t_forwarded_request_header[] + http_method: "POST" +} + +export type t_forwarded_request_header = { + name: string + value: string +} + +export type t_forwarded_response_details = { + body: string + headers: t_forwarded_request_header[] + status: number +} + +export type t_forwarding_request = { + config: string + created: number + id: string + livemode: boolean + object: "forwarding.request" + payment_method: string + replacements: ( + | "card_cvc" + | "card_expiry" + | "card_number" + | "cardholder_name" + )[] + request_context?: t_forwarded_request_context | null + request_details?: t_forwarded_request_details | null + response_details?: t_forwarded_response_details | null + url?: string | null +} + export type t_funding_instructions = { bank_transfer: t_funding_instructions_bank_transfer currency: string @@ -1918,12 +2417,29 @@ export type t_funding_instructions_bank_transfer = { type: "eu_bank_transfer" | "jp_bank_transfer" } +export type t_funding_instructions_bank_transfer_aba_record = { + account_number: string + bank_name: string + routing_number: string +} + export type t_funding_instructions_bank_transfer_financial_address = { + aba?: t_funding_instructions_bank_transfer_aba_record iban?: t_funding_instructions_bank_transfer_iban_record sort_code?: t_funding_instructions_bank_transfer_sort_code_record spei?: t_funding_instructions_bank_transfer_spei_record - supported_networks?: ("bacs" | "fps" | "sepa" | "spei" | "zengin")[] - type: "iban" | "sort_code" | "spei" | "zengin" + supported_networks?: ( + | "ach" + | "bacs" + | "domestic_wire_us" + | "fps" + | "sepa" + | "spei" + | "swift" + | "zengin" + )[] + swift?: t_funding_instructions_bank_transfer_swift_record + type: "aba" | "iban" | "sort_code" | "spei" | "swift" | "zengin" zengin?: t_funding_instructions_bank_transfer_zengin_record } @@ -1946,6 +2462,12 @@ export type t_funding_instructions_bank_transfer_spei_record = { clabe: string } +export type t_funding_instructions_bank_transfer_swift_record = { + account_number: string + bank_name: string + swift_code: string +} + export type t_funding_instructions_bank_transfer_zengin_record = { account_holder_name?: string | null account_number?: string | null @@ -2010,6 +2532,17 @@ export type t_gelato_document_report_error = { reason?: string | null } +export type t_gelato_email_report = { + email?: string | null + error?: t_gelato_email_report_error | null + status: "unverified" | "verified" +} + +export type t_gelato_email_report_error = { + code?: "email_unverified_other" | "email_verification_declined" | null + reason?: string | null +} + export type t_gelato_id_number_report = { dob?: t_gelato_data_id_number_report_date | null error?: t_gelato_id_number_report_error | null @@ -2029,6 +2562,22 @@ export type t_gelato_id_number_report_error = { reason?: string | null } +export type t_gelato_phone_report = { + error?: t_gelato_phone_report_error | null + phone?: string | null + status: "unverified" | "verified" +} + +export type t_gelato_phone_report_error = { + code?: "phone_unverified_other" | "phone_verification_declined" | null + reason?: string | null +} + +export type t_gelato_provided_details = { + email?: string + phone?: string +} + export type t_gelato_report_document_options = { allowed_types?: ("driving_license" | "id_card" | "passport")[] require_id_number?: boolean @@ -2062,6 +2611,10 @@ export type t_gelato_session_document_options = { require_matching_selfie?: boolean } +export type t_gelato_session_email_options = { + require_verification?: boolean +} + export type t_gelato_session_id_number_options = EmptyObject export type t_gelato_session_last_error = { @@ -2073,9 +2626,13 @@ export type t_gelato_session_last_error = { | "document_expired" | "document_type_not_supported" | "document_unverified_other" + | "email_unverified_other" + | "email_verification_declined" | "id_number_insufficient_document_data" | "id_number_mismatch" | "id_number_unverified_other" + | "phone_unverified_other" + | "phone_verification_declined" | "selfie_document_missing_photo" | "selfie_face_mismatch" | "selfie_manipulated" @@ -2085,6 +2642,10 @@ export type t_gelato_session_last_error = { reason?: string | null } +export type t_gelato_session_phone_options = { + require_verification?: boolean +} + export type t_gelato_verification_report_options = { document?: t_gelato_report_document_options id_number?: t_gelato_report_id_number_options @@ -2092,32 +2653,41 @@ export type t_gelato_verification_report_options = { export type t_gelato_verification_session_options = { document?: t_gelato_session_document_options + email?: t_gelato_session_email_options id_number?: t_gelato_session_id_number_options + phone?: t_gelato_session_phone_options } export type t_gelato_verified_outputs = { address?: t_address | null dob?: t_gelato_data_verified_outputs_date | null + email?: string | null first_name?: string | null id_number?: string | null id_number_type?: "br_cpf" | "sg_nric" | "us_ssn" | null last_name?: string | null + phone?: string | null } export type t_identity_verification_report = { + client_reference_id?: string | null created: number document?: t_gelato_document_report + email?: t_gelato_email_report id: string id_number?: t_gelato_id_number_report livemode: boolean object: "identity.verification_report" options?: t_gelato_verification_report_options + phone?: t_gelato_phone_report selfie?: t_gelato_selfie_report - type?: "document" | "id_number" + type: "document" | "id_number" | "verification_flow" + verification_flow?: string verification_session?: string | null } export type t_identity_verification_session = { + client_reference_id?: string | null client_secret?: string | null created: number id: string @@ -2129,10 +2699,12 @@ export type t_identity_verification_session = { } object: "identity.verification_session" options?: t_gelato_verification_session_options | null + provided_details?: t_gelato_provided_details | null redaction?: t_verification_session_redaction | null status: "canceled" | "processing" | "requires_input" | "verified" - type?: "document" | "id_number" | null + type: "document" | "id_number" | "verification_flow" url?: string | null + verification_flow?: string verified_outputs?: t_gelato_verified_outputs | null } @@ -2148,10 +2720,19 @@ export type t_inbound_transfers_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" routing_number?: string | null } +export type t_internal_card = { + brand?: string | null + country?: string | null + exp_month?: number | null + exp_year?: number | null + last4?: string | null +} + export type t_invoice = { account_country?: string | null account_name?: string | null @@ -2195,15 +2776,16 @@ export type t_invoice = { default_tax_rates: t_tax_rate[] description?: string | null discount?: t_discount | null - discounts?: (string | t_discount | t_deleted_discount)[] | null + discounts: (string | t_discount | t_deleted_discount)[] due_date?: number | null effective_at?: number | null ending_balance?: number | null footer?: string | null - from_invoice?: t_invoices_from_invoice | null + from_invoice?: t_invoices_resource_from_invoice | null hosted_invoice_url?: string | null id?: string invoice_pdf?: string | null + issuer: t_connect_account_reference last_finalization_error?: t_api_errors | null latest_revision?: string | t_invoice | null lines: { @@ -2230,14 +2812,13 @@ export type t_invoice = { pre_payment_credit_notes_amount: number quote?: string | t_quote | null receipt_number?: string | null - rendering?: t_invoices_invoice_rendering | null - rendering_options?: t_invoice_setting_rendering_options | null - shipping_cost?: t_invoices_shipping_cost | null + rendering?: t_invoices_resource_invoice_rendering | null + shipping_cost?: t_invoices_resource_shipping_cost | null shipping_details?: t_shipping | null starting_balance: number statement_descriptor?: string | null status?: "draft" | "open" | "paid" | "uncollectible" | "void" | null - status_transitions: t_invoices_status_transitions + status_transitions: t_invoices_resource_status_transitions subscription?: string | t_subscription | null subscription_details?: t_subscription_details_data | null subscription_proration_date?: number @@ -2289,7 +2870,7 @@ export type t_invoice_payment_method_options_bancontact = { export type t_invoice_payment_method_options_card = { installments?: t_invoice_installments_card - request_three_d_secure?: "any" | "automatic" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_invoice_payment_method_options_customer_balance = { @@ -2309,6 +2890,8 @@ export type t_invoice_payment_method_options_customer_balance_bank_transfer_eu_b export type t_invoice_payment_method_options_konbini = EmptyObject +export type t_invoice_payment_method_options_sepa_debit = EmptyObject + export type t_invoice_payment_method_options_us_bank_account = { financial_connections?: t_invoice_payment_method_options_us_bank_account_linked_account_options verification_method?: "automatic" | "instant" | "microdeposits" @@ -2317,7 +2900,7 @@ export type t_invoice_payment_method_options_us_bank_account = { export type t_invoice_payment_method_options_us_bank_account_linked_account_options = { permissions?: ("balances" | "payment_method" | "transactions")[] - prefetch?: "balances"[] | null + prefetch?: ("balances" | "transactions")[] | null } export type t_invoice_rendering_pdf = { @@ -2338,6 +2921,7 @@ export type t_invoice_setting_customer_setting = { export type t_invoice_setting_quote_setting = { days_until_due?: number | null + issuer: t_connect_account_reference } export type t_invoice_setting_rendering_options = { @@ -2345,11 +2929,15 @@ export type t_invoice_setting_rendering_options = { } export type t_invoice_setting_subscription_schedule_phase_setting = { + account_tax_ids?: (string | t_tax_id | t_deleted_tax_id)[] | null days_until_due?: number | null + issuer?: t_connect_account_reference | null } export type t_invoice_setting_subscription_schedule_setting = { + account_tax_ids?: (string | t_tax_id | t_deleted_tax_id)[] | null days_until_due?: number | null + issuer: t_connect_account_reference } export type t_invoice_tax_amount = { @@ -2413,22 +3001,13 @@ export type t_invoiceitem = { unit_amount_decimal?: string | null } -export type t_invoices_from_invoice = { - action: string - invoice: string | t_invoice -} - -export type t_invoices_invoice_rendering = { - amount_tax_display?: string | null - pdf?: t_invoice_rendering_pdf | null -} - export type t_invoices_payment_method_options = { acss_debit?: t_invoice_payment_method_options_acss_debit | null bancontact?: t_invoice_payment_method_options_bancontact | null card?: t_invoice_payment_method_options_card | null customer_balance?: t_invoice_payment_method_options_customer_balance | null konbini?: t_invoice_payment_method_options_konbini | null + sepa_debit?: t_invoice_payment_method_options_sepa_debit | null us_bank_account?: t_invoice_payment_method_options_us_bank_account | null } @@ -2447,12 +3026,14 @@ export type t_invoices_payment_settings = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -2464,6 +3045,16 @@ export type t_invoices_payment_settings = { | null } +export type t_invoices_resource_from_invoice = { + action: string + invoice: string | t_invoice +} + +export type t_invoices_resource_invoice_rendering = { + amount_tax_display?: string | null + pdf?: t_invoice_rendering_pdf | null +} + export type t_invoices_resource_invoice_tax_id = { type: | "ad_nrt" @@ -2511,6 +3102,7 @@ export type t_invoices_resource_invoice_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -2545,7 +3137,7 @@ export type t_invoices_resource_line_items_proration_details = { credited_items?: t_invoices_resource_line_items_credited_items | null } -export type t_invoices_shipping_cost = { +export type t_invoices_resource_shipping_cost = { amount_subtotal: number amount_tax: number amount_total: number @@ -2553,7 +3145,7 @@ export type t_invoices_shipping_cost = { taxes?: t_line_items_tax_amount[] } -export type t_invoices_status_transitions = { +export type t_invoices_resource_status_transitions = { finalized_at?: number | null marked_uncollectible_at?: number | null paid_at?: number | null @@ -2583,6 +3175,7 @@ export type t_issuing_authorization = { pending_request?: t_issuing_authorization_pending_request | null request_history: t_issuing_authorization_request[] status: "closed" | "pending" | "reversed" + token?: string | t_issuing_token | null transactions: t_issuing_transaction[] treasury?: t_issuing_authorization_treasury | null verification_data: t_issuing_authorization_verification_data @@ -2607,6 +3200,7 @@ export type t_issuing_card = { } number?: string object: "issuing.card" + personalization_design?: string | t_issuing_personalization_design | null replaced_by?: string | t_issuing_card | null replacement_for?: string | t_issuing_card | null replacement_reason?: "damaged" | "expired" | "lost" | "stolen" | null @@ -2655,6 +3249,34 @@ export type t_issuing_dispute = { treasury?: t_issuing_dispute_treasury | null } +export type t_issuing_personalization_design = { + card_logo?: string | t_file | null + carrier_text?: t_issuing_personalization_design_carrier_text | null + created: number + id: string + livemode: boolean + lookup_key?: string | null + metadata: { + [key: string]: string | undefined + } + name?: string | null + object: "issuing.personalization_design" + physical_bundle: string | t_issuing_physical_bundle + preferences: t_issuing_personalization_design_preferences + rejection_reasons: t_issuing_personalization_design_rejection_reasons + status: "active" | "inactive" | "rejected" | "review" +} + +export type t_issuing_physical_bundle = { + features?: t_issuing_physical_bundle_features + id: string + livemode: boolean + name: string + object: "issuing.physical_bundle" + status: "active" | "inactive" | "review" + type: "custom" | "standard" +} + export type t_issuing_settlement = { bin: string clearing_date: number @@ -2676,6 +3298,21 @@ export type t_issuing_settlement = { transaction_volume: number } +export type t_issuing_token = { + card: string | t_issuing_card + created: number + device_fingerprint?: string | null + id: string + last4?: string + livemode: boolean + network: "mastercard" | "visa" + network_data?: t_issuing_network_token_network_data + network_updated_at: number + object: "issuing.token" + status: "active" | "deleted" | "requested" | "suspended" + wallet_provider?: "apple_pay" | "google_pay" | "samsung_pay" +} + export type t_issuing_transaction = { amount: number amount_details?: t_issuing_transaction_amount_details | null @@ -2694,8 +3331,10 @@ export type t_issuing_transaction = { metadata: { [key: string]: string | undefined } + network_data?: t_issuing_transaction_network_data | null object: "issuing.transaction" purchase_details?: t_issuing_transaction_purchase_details | null + token?: string | t_issuing_token | null treasury?: t_issuing_transaction_treasury | null type: "capture" | "refund" wallet?: "apple_pay" | "google_pay" | "samsung_pay" | null @@ -2706,6 +3345,11 @@ export type t_issuing_authorization_amount_details = { cashback_amount?: number | null } +export type t_issuing_authorization_authentication_exemption = { + claimed_by: "acquirer" | "issuer" + type: "low_value_transaction" | "transaction_risk_analysis" | "unknown" +} + export type t_issuing_authorization_merchant_data = { category: string category_code: string @@ -2716,10 +3360,13 @@ export type t_issuing_authorization_merchant_data = { postal_code?: string | null state?: string | null terminal_id?: string | null + url?: string | null } export type t_issuing_authorization_network_data = { acquiring_institution_id?: string | null + system_trace_audit_number?: string | null + transaction_id?: string | null } export type t_issuing_authorization_pending_request = { @@ -2729,16 +3376,19 @@ export type t_issuing_authorization_pending_request = { is_amount_controllable: boolean merchant_amount: number merchant_currency: string + network_risk_score?: number | null } export type t_issuing_authorization_request = { amount: number amount_details?: t_issuing_authorization_amount_details | null approved: boolean + authorization_code?: string | null created: number currency: string merchant_amount: number merchant_currency: string + network_risk_score?: number | null reason: | "account_disabled" | "card_active" @@ -2755,6 +3405,11 @@ export type t_issuing_authorization_request = { | "webhook_error" | "webhook_timeout" reason_message?: string | null + requested_at?: number | null +} + +export type t_issuing_authorization_three_d_secure = { + result: "attempt_acknowledged" | "authenticated" | "failed" | "required" } export type t_issuing_authorization_treasury = { @@ -2766,8 +3421,11 @@ export type t_issuing_authorization_treasury = { export type t_issuing_authorization_verification_data = { address_line1_check: "match" | "mismatch" | "not_provided" address_postal_code_check: "match" | "mismatch" | "not_provided" + authentication_exemption?: t_issuing_authorization_authentication_exemption | null cvc_check: "match" | "mismatch" | "not_provided" expiry_check: "match" | "mismatch" | "not_provided" + postal_code?: string | null + three_d_secure?: t_issuing_authorization_three_d_secure | null } export type t_issuing_card_apple_pay = { @@ -3079,6 +3737,7 @@ export type t_issuing_card_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + allowed_merchant_countries?: string[] | null blocked_categories?: | ( | "ac_refrigeration_repair" @@ -3378,6 +4037,7 @@ export type t_issuing_card_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + blocked_merchant_countries?: string[] | null spending_limits?: t_issuing_card_spending_limit[] | null spending_limits_currency?: string | null } @@ -4037,6 +4697,7 @@ export type t_issuing_cardholder_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + allowed_merchant_countries?: string[] | null blocked_categories?: | ( | "ac_refrigeration_repair" @@ -4336,6 +4997,7 @@ export type t_issuing_cardholder_authorization_controls = { | "wrecking_and_salvage_yards" )[] | null + blocked_merchant_countries?: string[] | null spending_limits?: t_issuing_cardholder_spending_limit[] | null spending_limits_currency?: string | null } @@ -4791,6 +5453,128 @@ export type t_issuing_dispute_treasury = { received_debit: string } +export type t_issuing_network_token_address = { + line1: string + postal_code: string +} + +export type t_issuing_network_token_device = { + device_fingerprint?: string + ip_address?: string + location?: string + name?: string + phone_number?: string + type?: "other" | "phone" | "watch" +} + +export type t_issuing_network_token_mastercard = { + card_reference_id?: string + token_reference_id: string + token_requestor_id: string + token_requestor_name?: string +} + +export type t_issuing_network_token_network_data = { + device?: t_issuing_network_token_device + mastercard?: t_issuing_network_token_mastercard + type: "mastercard" | "visa" + visa?: t_issuing_network_token_visa + wallet_provider?: t_issuing_network_token_wallet_provider +} + +export type t_issuing_network_token_visa = { + card_reference_id: string + token_reference_id: string + token_requestor_id: string + token_risk_score?: string +} + +export type t_issuing_network_token_wallet_provider = { + account_id?: string + account_trust_score?: number + card_number_source?: "app" | "manual" | "on_file" | "other" + cardholder_address?: t_issuing_network_token_address + cardholder_name?: string + device_trust_score?: number + hashed_account_email_address?: string + reason_codes?: ( + | "account_card_too_new" + | "account_recently_changed" + | "account_too_new" + | "account_too_new_since_launch" + | "additional_device" + | "data_expired" + | "defer_id_v_decision" + | "device_recently_lost" + | "good_activity_history" + | "has_suspended_tokens" + | "high_risk" + | "inactive_account" + | "long_account_tenure" + | "low_account_score" + | "low_device_score" + | "low_phone_number_score" + | "network_service_error" + | "outside_home_territory" + | "provisioning_cardholder_mismatch" + | "provisioning_device_and_cardholder_mismatch" + | "provisioning_device_mismatch" + | "same_device_no_prior_authentication" + | "same_device_successful_prior_authentication" + | "software_update" + | "suspicious_activity" + | "too_many_different_cardholders" + | "too_many_recent_attempts" + | "too_many_recent_tokens" + )[] + suggested_decision?: "approve" | "decline" | "require_auth" + suggested_decision_version?: string +} + +export type t_issuing_personalization_design_carrier_text = { + footer_body?: string | null + footer_title?: string | null + header_body?: string | null + header_title?: string | null +} + +export type t_issuing_personalization_design_preferences = { + is_default: boolean + is_platform_default?: boolean | null +} + +export type t_issuing_personalization_design_rejection_reasons = { + card_logo?: + | ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_binary_image" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + | null + carrier_text?: + | ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + | null +} + +export type t_issuing_physical_bundle_features = { + card_logo: "optional" | "required" | "unsupported" + carrier_text: "optional" | "required" | "unsupported" + second_line: "optional" | "required" | "unsupported" +} + export type t_issuing_transaction_amount_details = { atm_fee?: number | null cashback_amount?: number | null @@ -4825,6 +5609,12 @@ export type t_issuing_transaction_lodging_data = { nights?: number | null } +export type t_issuing_transaction_network_data = { + authorization_code?: string | null + processing_date?: string | null + transaction_id?: string | null +} + export type t_issuing_transaction_purchase_details = { flight?: t_issuing_transaction_flight_data | null fuel?: t_issuing_transaction_fuel_data | null @@ -4890,6 +5680,7 @@ export type t_legal_entity_company = { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -4958,8 +5749,9 @@ export type t_line_item = { description?: string | null discount_amounts?: t_discounts_resource_discount_amount[] | null discountable: boolean - discounts?: (string | t_discount)[] | null + discounts: (string | t_discount)[] id: string + invoice?: string | null invoice_item?: string | t_invoiceitem livemode: boolean metadata: { @@ -5009,7 +5801,7 @@ export type t_line_items_tax_amount = { export type t_linked_account_options_us_bank_account = { permissions?: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: "balances"[] | null + prefetch?: ("balances" | "transactions")[] | null return_url?: string } @@ -5047,6 +5839,13 @@ export type t_mandate_au_becs_debit = { export type t_mandate_bacs_debit = { network_status: "accepted" | "pending" | "refused" | "revoked" reference: string + revocation_reason?: + | "account_closed" + | "bank_account_restricted" + | "bank_ownership_changed" + | "could_not_process" + | "debit_not_authorized" + | null url: string } @@ -5084,7 +5883,9 @@ export type t_mandate_single_use = { currency: string } -export type t_mandate_us_bank_account = EmptyObject +export type t_mandate_us_bank_account = { + collection_method?: "paper" +} export type t_networks = { available: string[] @@ -5126,6 +5927,7 @@ export type t_outbound_payments_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" | "us_domestic_wire" routing_number?: string | null } @@ -5142,6 +5944,7 @@ export type t_outbound_transfers_payment_method_details_us_bank_account = { bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate network: "ach" | "us_domestic_wire" routing_number?: string | null } @@ -5184,6 +5987,27 @@ export type t_payment_flows_private_payment_methods_alipay_details = { transaction_id?: string | null } +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization = + { + status: "disabled" | "enabled" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization = + { + status: "available" | "unavailable" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture = + { + maximum_amount_capturable: number + status: "available" | "unavailable" + } + +export type t_payment_flows_private_payment_methods_card_details_api_resource_multicapture = + { + status: "available" | "unavailable" + } + export type t_payment_flows_private_payment_methods_klarna_dob = { day?: number | null month?: number | null @@ -5265,6 +6089,7 @@ export type t_payment_intent_next_action = { pix_display_qr_code?: t_payment_intent_next_action_pix_display_qr_code promptpay_display_qr_code?: t_payment_intent_next_action_promptpay_display_qr_code redirect_to_url?: t_payment_intent_next_action_redirect_to_url + swish_handle_redirect_or_display_qr_code?: t_payment_intent_next_action_swish_handle_redirect_or_display_qr_code type: string use_stripe_sdk?: EmptyObject verify_with_microdeposits?: t_payment_intent_next_action_verify_with_microdeposits @@ -5385,6 +6210,18 @@ export type t_payment_intent_next_action_redirect_to_url = { url?: string | null } +export type t_payment_intent_next_action_swish_handle_redirect_or_display_qr_code = + { + hosted_instructions_url: string + qr_code: t_payment_intent_next_action_swish_qr_code + } + +export type t_payment_intent_next_action_swish_qr_code = { + data: string + image_url_png: string + image_url_svg: string +} + export type t_payment_intent_next_action_verify_with_microdeposits = { arrival_date: number hosted_verification_url: string @@ -5480,6 +6317,9 @@ export type t_payment_intent_payment_method_options = { link?: | t_payment_intent_payment_method_options_link | t_payment_intent_type_specific_payment_method_options_client + mobilepay?: + | t_payment_intent_payment_method_options_mobilepay + | t_payment_intent_type_specific_payment_method_options_client oxxo?: | t_payment_method_options_oxxo | t_payment_intent_type_specific_payment_method_options_client @@ -5498,12 +6338,18 @@ export type t_payment_intent_payment_method_options = { promptpay?: | t_payment_method_options_promptpay | t_payment_intent_type_specific_payment_method_options_client + revolut_pay?: + | t_payment_method_options_revolut_pay + | t_payment_intent_type_specific_payment_method_options_client sepa_debit?: | t_payment_intent_payment_method_options_sepa_debit | t_payment_intent_type_specific_payment_method_options_client sofort?: | t_payment_method_options_sofort | t_payment_intent_type_specific_payment_method_options_client + swish?: + | t_payment_intent_payment_method_options_swish + | t_payment_intent_type_specific_payment_method_options_client us_bank_account?: | t_payment_intent_payment_method_options_us_bank_account | t_payment_intent_type_specific_payment_method_options_client @@ -5525,7 +6371,9 @@ export type t_payment_intent_payment_method_options_au_becs_debit = { setup_future_usage?: "none" | "off_session" | "on_session" } -export type t_payment_intent_payment_method_options_blik = EmptyObject +export type t_payment_intent_payment_method_options_blik = { + setup_future_usage?: "none" +} export type t_payment_intent_payment_method_options_card = { capture_method?: "manual" @@ -5544,7 +6392,12 @@ export type t_payment_intent_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | "challenge_only" | null + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" | null + require_cvc_recollection?: boolean setup_future_usage?: "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -5570,13 +6423,24 @@ export type t_payment_intent_payment_method_options_mandate_options_acss_debit = export type t_payment_intent_payment_method_options_mandate_options_sepa_debit = EmptyObject +export type t_payment_intent_payment_method_options_mobilepay = { + capture_method?: "manual" + setup_future_usage?: "none" +} + export type t_payment_intent_payment_method_options_sepa_debit = { mandate_options?: t_payment_intent_payment_method_options_mandate_options_sepa_debit setup_future_usage?: "none" | "off_session" | "on_session" } +export type t_payment_intent_payment_method_options_swish = { + reference?: string | null + setup_future_usage?: "none" +} + export type t_payment_intent_payment_method_options_us_bank_account = { financial_connections?: t_linked_account_options_us_bank_account + mandate_options?: t_payment_method_options_us_bank_account_mandate_options preferred_settlement_speed?: "fastest" | "standard" setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" | "microdeposits" @@ -5595,6 +6459,7 @@ export type t_payment_intent_processing_customer_notification = { export type t_payment_intent_type_specific_payment_method_options_client = { capture_method?: "manual" | "manual_preferred" installments?: t_payment_flows_installment_options + require_cvc_recollection?: boolean setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" | "microdeposits" } @@ -5614,6 +6479,7 @@ export type t_payment_link = { custom_text: t_payment_links_resource_custom_text customer_creation: "always" | "if_required" id: string + inactive_message?: string | null invoice_creation?: t_payment_links_resource_invoice_creation | null line_items?: { data: t_item[] @@ -5657,11 +6523,13 @@ export type t_payment_link = { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] | null phone_number_collection: t_payment_links_resource_phone_number_collection + restrictions?: t_payment_links_resource_restrictions | null shipping_address_collection?: t_payment_links_resource_shipping_address_collection | null shipping_options: t_payment_links_resource_shipping_option[] submit_type: "auto" | "book" | "donate" | "pay" @@ -5679,6 +6547,12 @@ export type t_payment_links_resource_after_completion = { export type t_payment_links_resource_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null +} + +export type t_payment_links_resource_completed_sessions = { + count: number + limit: number } export type t_payment_links_resource_completion_behavior_confirmation_page = { @@ -5690,17 +6564,18 @@ export type t_payment_links_resource_completion_behavior_redirect = { } export type t_payment_links_resource_consent_collection = { + payment_method_reuse_agreement?: t_payment_links_resource_payment_method_reuse_agreement | null promotions?: "auto" | "none" | null terms_of_service?: "none" | "required" | null } export type t_payment_links_resource_custom_fields = { - dropdown?: t_payment_links_resource_custom_fields_dropdown | null + dropdown?: t_payment_links_resource_custom_fields_dropdown key: string label: t_payment_links_resource_custom_fields_label - numeric?: t_payment_links_resource_custom_fields_numeric | null + numeric?: t_payment_links_resource_custom_fields_numeric optional: boolean - text?: t_payment_links_resource_custom_fields_text | null + text?: t_payment_links_resource_custom_fields_text type: "dropdown" | "numeric" | "text" } @@ -5729,6 +6604,7 @@ export type t_payment_links_resource_custom_fields_text = { } export type t_payment_links_resource_custom_text = { + after_submit?: t_payment_links_resource_custom_text_position | null shipping_address?: t_payment_links_resource_custom_text_position | null submit?: t_payment_links_resource_custom_text_position | null terms_of_service_acceptance?: t_payment_links_resource_custom_text_position | null @@ -5748,6 +6624,7 @@ export type t_payment_links_resource_invoice_settings = { custom_fields?: t_invoice_setting_custom_field[] | null description?: string | null footer?: string | null + issuer?: t_connect_account_reference | null metadata?: { [key: string]: string | undefined } | null @@ -5756,13 +6633,28 @@ export type t_payment_links_resource_invoice_settings = { export type t_payment_links_resource_payment_intent_data = { capture_method?: "automatic" | "automatic_async" | "manual" | null + description?: string | null + metadata: { + [key: string]: string | undefined + } setup_future_usage?: "off_session" | "on_session" | null + statement_descriptor?: string | null + statement_descriptor_suffix?: string | null + transfer_group?: string | null +} + +export type t_payment_links_resource_payment_method_reuse_agreement = { + position: "auto" | "hidden" } export type t_payment_links_resource_phone_number_collection = { enabled: boolean } +export type t_payment_links_resource_restrictions = { + completed_sessions: t_payment_links_resource_completed_sessions +} + export type t_payment_links_resource_shipping_address_collection = { allowed_countries: ( | "AC" @@ -6012,7 +6904,16 @@ export type t_payment_links_resource_shipping_option = { export type t_payment_links_resource_subscription_data = { description?: string | null + invoice_settings: t_payment_links_resource_subscription_data_invoice_settings + metadata: { + [key: string]: string | undefined + } trial_period_days?: number | null + trial_settings?: t_subscriptions_trials_resource_trial_settings | null +} + +export type t_payment_links_resource_subscription_data_invoice_settings = { + issuer: t_connect_account_reference } export type t_payment_links_resource_tax_id_collection = { @@ -6055,6 +6956,7 @@ export type t_payment_method = { metadata?: { [key: string]: string | undefined } | null + mobilepay?: t_payment_method_mobilepay object: "payment_method" oxxo?: t_payment_method_oxxo p24?: t_payment_method_p24 @@ -6063,8 +6965,10 @@ export type t_payment_method = { pix?: t_payment_method_pix promptpay?: t_payment_method_promptpay radar_options?: t_radar_radar_options + revolut_pay?: t_payment_method_revolut_pay sepa_debit?: t_payment_method_sepa_debit sofort?: t_payment_method_sofort + swish?: t_payment_method_swish type: | "acss_debit" | "affirm" @@ -6088,14 +6992,17 @@ export type t_payment_method = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -6140,6 +7047,7 @@ export type t_payment_method_card = { brand: string checks?: t_payment_method_card_checks | null country?: string | null + display_brand?: string | null exp_month: number exp_year: number fingerprint?: string | null @@ -6267,13 +7175,13 @@ export type t_payment_method_configuration = { card?: t_payment_method_config_resource_payment_method_properties cartes_bancaires?: t_payment_method_config_resource_payment_method_properties cashapp?: t_payment_method_config_resource_payment_method_properties + customer_balance?: t_payment_method_config_resource_payment_method_properties eps?: t_payment_method_config_resource_payment_method_properties fpx?: t_payment_method_config_resource_payment_method_properties giropay?: t_payment_method_config_resource_payment_method_properties google_pay?: t_payment_method_config_resource_payment_method_properties grabpay?: t_payment_method_config_resource_payment_method_properties id: string - id_bank_transfer?: t_payment_method_config_resource_payment_method_properties ideal?: t_payment_method_config_resource_payment_method_properties is_default: boolean jcb?: t_payment_method_config_resource_payment_method_properties @@ -6281,22 +7189,20 @@ export type t_payment_method_configuration = { konbini?: t_payment_method_config_resource_payment_method_properties link?: t_payment_method_config_resource_payment_method_properties livemode: boolean - multibanco?: t_payment_method_config_resource_payment_method_properties name: string - netbanking?: t_payment_method_config_resource_payment_method_properties object: "payment_method_configuration" oxxo?: t_payment_method_config_resource_payment_method_properties p24?: t_payment_method_config_resource_payment_method_properties parent?: string | null - pay_by_bank?: t_payment_method_config_resource_payment_method_properties paynow?: t_payment_method_config_resource_payment_method_properties paypal?: t_payment_method_config_resource_payment_method_properties promptpay?: t_payment_method_config_resource_payment_method_properties + revolut_pay?: t_payment_method_config_resource_payment_method_properties sepa_debit?: t_payment_method_config_resource_payment_method_properties sofort?: t_payment_method_config_resource_payment_method_properties - upi?: t_payment_method_config_resource_payment_method_properties us_bank_account?: t_payment_method_config_resource_payment_method_properties wechat_pay?: t_payment_method_config_resource_payment_method_properties + zip?: t_payment_method_config_resource_payment_method_properties } export type t_payment_method_customer_balance = EmptyObject @@ -6326,6 +7232,7 @@ export type t_payment_method_details = { klarna?: t_payment_method_details_klarna konbini?: t_payment_method_details_konbini link?: t_payment_method_details_link + mobilepay?: t_payment_method_details_mobilepay multibanco?: t_payment_method_details_multibanco oxxo?: t_payment_method_details_oxxo p24?: t_payment_method_details_p24 @@ -6333,9 +7240,11 @@ export type t_payment_method_details = { paypal?: t_payment_method_details_paypal pix?: t_payment_method_details_pix promptpay?: t_payment_method_details_promptpay + revolut_pay?: t_payment_method_details_revolut_pay sepa_debit?: t_payment_method_details_sepa_debit sofort?: t_payment_method_details_sofort stripe_account?: t_payment_method_details_stripe_account + swish?: t_payment_method_details_swish type: string us_bank_account?: t_payment_method_details_us_bank_account wechat?: t_payment_method_details_wechat @@ -6407,18 +7316,24 @@ export type t_payment_method_details_boleto = { } export type t_payment_method_details_card = { + amount_authorized?: number | null brand?: string | null + capture_before?: number checks?: t_payment_method_details_card_checks | null country?: string | null exp_month: number exp_year: number + extended_authorization?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization fingerprint?: string | null funding?: string | null + incremental_authorization?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization installments?: t_payment_method_details_card_installments | null last4?: string | null mandate?: string | null + multicapture?: t_payment_flows_private_payment_methods_card_details_api_resource_multicapture network?: string | null network_token?: t_payment_method_details_card_network_token | null + overcapture?: t_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture three_d_secure?: t_three_d_secure_details_charge | null wallet?: t_payment_method_details_card_wallet | null } @@ -6458,6 +7373,7 @@ export type t_payment_method_details_card_present = { incremental_authorization_supported: boolean last4?: string | null network?: string | null + offline?: t_payment_method_details_card_present_offline | null overcapture_supported: boolean read_method?: | "contact_emv" @@ -6469,6 +7385,10 @@ export type t_payment_method_details_card_present = { receipt?: t_payment_method_details_card_present_receipt | null } +export type t_payment_method_details_card_present_offline = { + stored_at?: number | null +} + export type t_payment_method_details_card_present_receipt = { account_type?: "checking" | "credit" | "prepaid" | "unknown" application_cryptogram?: string | null @@ -6614,6 +7534,7 @@ export type t_payment_method_details_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -6632,6 +7553,7 @@ export type t_payment_method_details_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -6698,6 +7620,10 @@ export type t_payment_method_details_link = { country?: string | null } +export type t_payment_method_details_mobilepay = { + card?: t_internal_card | null +} + export type t_payment_method_details_multibanco = { entity?: string | null reference?: string | null @@ -6733,6 +7659,7 @@ export type t_payment_method_details_p24 = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" | null reference?: string | null @@ -6759,6 +7686,8 @@ export type t_payment_method_details_promptpay = { reference?: string | null } +export type t_payment_method_details_revolut_pay = EmptyObject + export type t_payment_method_details_sepa_debit = { bank_code?: string | null branch_code?: string | null @@ -6782,12 +7711,20 @@ export type t_payment_method_details_sofort = { export type t_payment_method_details_stripe_account = EmptyObject +export type t_payment_method_details_swish = { + fingerprint?: string | null + payment_reference?: string | null + verified_phone_last4?: string | null +} + export type t_payment_method_details_us_bank_account = { account_holder_type?: "company" | "individual" | null account_type?: "checking" | "savings" | null bank_name?: string | null fingerprint?: string | null last4?: string | null + mandate?: string | t_mandate + payment_reference?: string | null routing_number?: string | null } @@ -6895,6 +7832,7 @@ export type t_payment_method_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -6913,6 +7851,7 @@ export type t_payment_method_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -6953,6 +7892,8 @@ export type t_payment_method_link = { email?: string | null } +export type t_payment_method_mobilepay = EmptyObject + export type t_payment_method_options_affirm = { capture_method?: "manual" preferred_locale?: string @@ -7103,11 +8044,17 @@ export type t_payment_method_options_promptpay = { setup_future_usage?: "none" } +export type t_payment_method_options_revolut_pay = EmptyObject + export type t_payment_method_options_sofort = { preferred_language?: "de" | "en" | "es" | "fr" | "it" | "nl" | "pl" | null setup_future_usage?: "none" | "off_session" } +export type t_payment_method_options_us_bank_account_mandate_options = { + collection_method?: "paper" +} + export type t_payment_method_options_wechat_pay = { app_id?: string | null client?: "android" | "ios" | "web" | null @@ -7146,6 +8093,7 @@ export type t_payment_method_p24 = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" | null } @@ -7161,6 +8109,8 @@ export type t_payment_method_pix = EmptyObject export type t_payment_method_promptpay = EmptyObject +export type t_payment_method_revolut_pay = EmptyObject + export type t_payment_method_sepa_debit = { bank_code?: string | null branch_code?: string | null @@ -7174,6 +8124,8 @@ export type t_payment_method_sofort = { country?: string | null } +export type t_payment_method_swish = EmptyObject + export type t_payment_method_us_bank_account = { account_holder_type?: "company" | "individual" | null account_type?: "checking" | "savings" | null @@ -7232,6 +8184,7 @@ export type t_payment_pages_checkout_session_after_expiration_recovery = { export type t_payment_pages_checkout_session_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } @@ -7241,6 +8194,7 @@ export type t_payment_pages_checkout_session_consent = { } export type t_payment_pages_checkout_session_consent_collection = { + payment_method_reuse_agreement?: t_payment_pages_checkout_session_payment_method_reuse_agreement | null promotions?: "auto" | "none" | null terms_of_service?: "none" | "required" | null } @@ -7253,12 +8207,12 @@ export type t_payment_pages_checkout_session_currency_conversion = { } export type t_payment_pages_checkout_session_custom_fields = { - dropdown?: t_payment_pages_checkout_session_custom_fields_dropdown | null + dropdown?: t_payment_pages_checkout_session_custom_fields_dropdown key: string label: t_payment_pages_checkout_session_custom_fields_label - numeric?: t_payment_pages_checkout_session_custom_fields_numeric | null + numeric?: t_payment_pages_checkout_session_custom_fields_numeric optional: boolean - text?: t_payment_pages_checkout_session_custom_fields_text | null + text?: t_payment_pages_checkout_session_custom_fields_text type: "dropdown" | "numeric" | "text" } @@ -7290,6 +8244,7 @@ export type t_payment_pages_checkout_session_custom_fields_text = { } export type t_payment_pages_checkout_session_custom_text = { + after_submit?: t_payment_pages_checkout_session_custom_text_position | null shipping_address?: t_payment_pages_checkout_session_custom_text_position | null submit?: t_payment_pages_checkout_session_custom_text_position | null terms_of_service_acceptance?: t_payment_pages_checkout_session_custom_text_position | null @@ -7318,12 +8273,17 @@ export type t_payment_pages_checkout_session_invoice_settings = { custom_fields?: t_invoice_setting_custom_field[] | null description?: string | null footer?: string | null + issuer?: t_connect_account_reference | null metadata?: { [key: string]: string | undefined } | null rendering_options?: t_invoice_setting_rendering_options | null } +export type t_payment_pages_checkout_session_payment_method_reuse_agreement = { + position: "auto" | "hidden" +} + export type t_payment_pages_checkout_session_phone_number_collection = { enabled: boolean } @@ -7630,6 +8590,7 @@ export type t_payment_pages_checkout_session_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -7720,6 +8681,7 @@ export type t_period = { export type t_person = { account: string + additional_tos_acceptances?: t_person_additional_tos_acceptances address?: t_address address_kana?: t_legal_entity_japan_address | null address_kanji?: t_legal_entity_japan_address | null @@ -7753,6 +8715,16 @@ export type t_person = { verification?: t_legal_entity_person_verification } +export type t_person_additional_tos_acceptance = { + date?: number | null + ip?: string | null + user_agent?: string | null +} + +export type t_person_additional_tos_acceptances = { + account: t_person_additional_tos_acceptance +} + export type t_person_future_requirements = { alternatives?: t_account_requirements_alternative[] | null currently_due: string[] @@ -7765,6 +8737,7 @@ export type t_person_future_requirements = { export type t_person_relationship = { director?: boolean | null executive?: boolean | null + legal_guardian?: boolean | null owner?: boolean | null percent_ownership?: number | null representative?: boolean | null @@ -7795,6 +8768,7 @@ export type t_plan = { metadata?: { [key: string]: string | undefined } | null + meter?: string | null nickname?: string | null object: "plan" product?: string | t_product | t_deleted_product | null @@ -7844,7 +8818,6 @@ export type t_portal_features = { invoice_history: t_portal_invoice_list payment_method_update: t_portal_payment_method_update subscription_cancel: t_portal_subscription_cancel - subscription_pause: t_portal_subscription_pause subscription_update: t_portal_subscription_update } @@ -7943,10 +8916,6 @@ export type t_portal_subscription_cancellation_reason = { )[] } -export type t_portal_subscription_pause = { - enabled: boolean -} - export type t_portal_subscription_update = { default_allowed_updates: ("price" | "promotion_code" | "quantity")[] enabled: boolean @@ -8000,7 +8969,7 @@ export type t_product = { created: number default_price?: string | t_price | null description?: string | null - features: t_product_feature[] + features: t_product_marketing_feature[] id: string images: string[] livemode: boolean @@ -8018,8 +8987,8 @@ export type t_product = { url?: string | null } -export type t_product_feature = { - name: string +export type t_product_marketing_feature = { + name?: string } export type t_promotion_code = { @@ -8074,7 +9043,7 @@ export type t_quote = { header?: string | null id: string invoice?: string | t_invoice | t_deleted_invoice | null - invoice_settings?: t_invoice_setting_quote_setting | null + invoice_settings: t_invoice_setting_quote_setting line_items?: { data: t_item[] has_more: boolean @@ -8100,6 +9069,7 @@ export type t_quote = { export type t_quotes_resource_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null status?: "complete" | "failed" | "requires_location_inputs" | null } @@ -8130,6 +9100,9 @@ export type t_quotes_resource_status_transitions = { export type t_quotes_resource_subscription_data_subscription_data = { description?: string | null effective_date?: number | null + metadata?: { + [key: string]: string | undefined + } | null trial_period_days?: number | null } @@ -8242,6 +9215,7 @@ export type t_recurring = { aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" | null interval: "day" | "month" | "week" | "year" interval_count: number + meter?: string | null usage_type: "licensed" | "metered" } @@ -8252,6 +9226,7 @@ export type t_refund = { created: number currency: string description?: string + destination_details?: t_refund_destination_details failure_balance_transaction?: string | t_balance_transaction failure_reason?: string id: string @@ -8274,6 +9249,50 @@ export type t_refund = { transfer_reversal?: string | t_transfer_reversal | null } +export type t_refund_destination_details = { + affirm?: t_destination_details_unimplemented + afterpay_clearpay?: t_destination_details_unimplemented + alipay?: t_destination_details_unimplemented + au_bank_transfer?: t_destination_details_unimplemented + blik?: t_refund_destination_details_generic + br_bank_transfer?: t_refund_destination_details_generic + card?: t_refund_destination_details_card + cashapp?: t_destination_details_unimplemented + customer_cash_balance?: t_destination_details_unimplemented + eps?: t_destination_details_unimplemented + eu_bank_transfer?: t_refund_destination_details_generic + gb_bank_transfer?: t_refund_destination_details_generic + giropay?: t_destination_details_unimplemented + grabpay?: t_destination_details_unimplemented + jp_bank_transfer?: t_refund_destination_details_generic + klarna?: t_destination_details_unimplemented + mx_bank_transfer?: t_refund_destination_details_generic + p24?: t_refund_destination_details_generic + paynow?: t_destination_details_unimplemented + paypal?: t_destination_details_unimplemented + pix?: t_destination_details_unimplemented + revolut?: t_destination_details_unimplemented + sofort?: t_destination_details_unimplemented + swish?: t_refund_destination_details_generic + th_bank_transfer?: t_refund_destination_details_generic + type: string + us_bank_transfer?: t_refund_destination_details_generic + wechat_pay?: t_destination_details_unimplemented + zip?: t_destination_details_unimplemented +} + +export type t_refund_destination_details_card = { + reference?: string + reference_status?: string + reference_type?: string + type: "pending" | "refund" | "reversal" +} + +export type t_refund_destination_details_generic = { + reference?: string | null + reference_status?: string | null +} + export type t_refund_next_action = { display_details?: t_refund_next_action_display_details | null type: string @@ -8362,6 +9381,7 @@ export type t_scheduled_query_run = { export type t_schedules_phase_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_secret_service_resource_scope = { @@ -8432,7 +9452,7 @@ export type t_setup_attempt_payment_method_details_boleto = EmptyObject export type t_setup_attempt_payment_method_details_card = { brand?: string | null - checks?: t_payment_method_details_card_checks | null + checks?: t_setup_attempt_payment_method_details_card_checks | null country?: string | null exp_month?: number | null exp_year?: number | null @@ -8444,8 +9464,15 @@ export type t_setup_attempt_payment_method_details_card = { wallet?: t_setup_attempt_payment_method_details_card_wallet | null } +export type t_setup_attempt_payment_method_details_card_checks = { + address_line1_check?: string | null + address_postal_code_check?: string | null + cvc_check?: string | null +} + export type t_setup_attempt_payment_method_details_card_present = { generated_card?: string | t_payment_method | null + offline?: t_payment_method_details_card_present_offline | null } export type t_setup_attempt_payment_method_details_card_wallet = { @@ -8466,6 +9493,7 @@ export type t_setup_attempt_payment_method_details_ideal = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -8484,6 +9512,7 @@ export type t_setup_attempt_payment_method_details_ideal = { | "INGBNL2A" | "KNABNL2H" | "MOYONL21" + | "NNBANL2G" | "NTSBDEB1" | "RABONL2U" | "RBRBNL21" @@ -8583,6 +9612,9 @@ export type t_setup_intent_payment_method_options = { | t_setup_intent_payment_method_options_acss_debit | t_setup_intent_type_specific_payment_method_options_client card?: t_setup_intent_payment_method_options_card + card_present?: + | t_setup_intent_payment_method_options_card_present + | t_setup_intent_type_specific_payment_method_options_client link?: | t_setup_intent_payment_method_options_link | t_setup_intent_type_specific_payment_method_options_client @@ -8618,7 +9650,7 @@ export type t_setup_intent_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | "challenge_only" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_setup_intent_payment_method_options_card_mandate_options = { @@ -8634,6 +9666,8 @@ export type t_setup_intent_payment_method_options_card_mandate_options = { supported_types?: "india"[] | null } +export type t_setup_intent_payment_method_options_card_present = EmptyObject + export type t_setup_intent_payment_method_options_link = EmptyObject export type t_setup_intent_payment_method_options_mandate_options_acss_debit = { @@ -8657,6 +9691,7 @@ export type t_setup_intent_payment_method_options_sepa_debit = { export type t_setup_intent_payment_method_options_us_bank_account = { financial_connections?: t_linked_account_options_us_bank_account + mandate_options?: t_payment_method_options_us_bank_account_mandate_options verification_method?: "automatic" | "instant" | "microdeposits" } @@ -9136,6 +10171,7 @@ export type t_subscription = { application_fee_percent?: number | null automatic_tax: t_subscription_automatic_tax billing_cycle_anchor: number + billing_cycle_anchor_config?: t_subscriptions_resource_billing_cycle_anchor_config | null billing_thresholds?: t_subscription_billing_thresholds | null cancel_at?: number | null cancel_at_period_end: boolean @@ -9153,6 +10189,7 @@ export type t_subscription = { default_tax_rates?: t_tax_rate[] | null description?: string | null discount?: t_discount | null + discounts: (string | t_discount)[] ended_at?: number | null id: string items: { @@ -9194,6 +10231,7 @@ export type t_subscription = { export type t_subscription_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_subscription_billing_thresholds = { @@ -9210,6 +10248,7 @@ export type t_subscription_details_data = { export type t_subscription_item = { billing_thresholds?: t_subscription_item_billing_thresholds | null created: number + discounts: (string | t_discount)[] id: string metadata: { [key: string]: string | undefined @@ -9240,7 +10279,7 @@ export type t_subscription_payment_method_options_card = { | "unknown" | "visa" | null - request_three_d_secure?: "any" | "automatic" | null + request_three_d_secure?: "any" | "automatic" | "challenge" | null } export type t_subscription_pending_invoice_item_interval = { @@ -9272,6 +10311,7 @@ export type t_subscription_schedule = { } export type t_subscription_schedule_add_invoice_item = { + discounts: t_discounts_resource_stackable_discount[] price: string | t_price | t_deleted_price quantity?: number | null tax_rates?: t_tax_rate[] | null @@ -9279,6 +10319,7 @@ export type t_subscription_schedule_add_invoice_item = { export type t_subscription_schedule_configuration_item = { billing_thresholds?: t_subscription_item_billing_thresholds | null + discounts: t_discounts_resource_stackable_discount[] metadata?: { [key: string]: string | undefined } | null @@ -9304,6 +10345,7 @@ export type t_subscription_schedule_phase_configuration = { default_payment_method?: string | t_payment_method | null default_tax_rates?: t_tax_rate[] | null description?: string | null + discounts: t_discounts_resource_stackable_discount[] end_date: number invoice_settings?: t_invoice_setting_subscription_schedule_phase_setting | null items: t_subscription_schedule_configuration_item[] @@ -9325,13 +10367,14 @@ export type t_subscription_schedules_resource_default_settings = { collection_method?: "charge_automatically" | "send_invoice" | null default_payment_method?: string | t_payment_method | null description?: string | null - invoice_settings?: t_invoice_setting_subscription_schedule_setting | null + invoice_settings: t_invoice_setting_subscription_schedule_setting on_behalf_of?: string | t_account | null transfer_data?: t_subscription_transfer_data | null } export type t_subscription_schedules_resource_default_settings_automatic_tax = { enabled: boolean + liability?: t_connect_account_reference | null } export type t_subscription_transfer_data = { @@ -9339,6 +10382,14 @@ export type t_subscription_transfer_data = { destination: string | t_account } +export type t_subscriptions_resource_billing_cycle_anchor_config = { + day_of_month: number + hour?: number | null + minute?: number | null + month?: number | null + second?: number | null +} + export type t_subscriptions_resource_pause_collection = { behavior: "keep_as_draft" | "mark_uncollectible" | "void" resumes_at?: number | null @@ -9350,6 +10401,7 @@ export type t_subscriptions_resource_payment_method_options = { card?: t_subscription_payment_method_options_card | null customer_balance?: t_invoice_payment_method_options_customer_balance | null konbini?: t_invoice_payment_method_options_konbini | null + sepa_debit?: t_invoice_payment_method_options_sepa_debit | null us_bank_account?: t_invoice_payment_method_options_us_bank_account | null } @@ -9367,12 +10419,14 @@ export type t_subscriptions_resource_payment_settings = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -9437,6 +10491,18 @@ export type t_tax_calculation_line_item = { tax_code: string } +export type t_tax_registration = { + active_from: number + country: string + country_options: t_tax_product_registrations_resource_country_options + created: number + expires_at?: number | null + id: string + livemode: boolean + object: "tax.registration" + status: "active" | "expired" | "scheduled" +} + export type t_tax_settings = { defaults: t_tax_product_resource_tax_settings_defaults head_office?: t_tax_product_resource_tax_settings_head_office | null @@ -9503,6 +10569,13 @@ export type t_tax_deducted_at_source = { tax_deduction_account_number: string } +export type t_tax_i_ds_owner = { + account?: string | t_account + application?: string | t_application + customer?: string | t_customer + type: "account" | "application" | "customer" | "self" +} + export type t_tax_id = { country?: string | null created: number @@ -9510,6 +10583,7 @@ export type t_tax_id = { id: string livemode: boolean object: "tax_id" + owner?: t_tax_i_ds_owner | null type: | "ad_nrt" | "ae_trn" @@ -9556,6 +10630,7 @@ export type t_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -9588,6 +10663,107 @@ export type t_tax_id_verification = { verified_name?: string | null } +export type t_tax_product_registrations_resource_country_options = { + ae?: t_tax_product_registrations_resource_country_options_default + at?: t_tax_product_registrations_resource_country_options_europe + au?: t_tax_product_registrations_resource_country_options_default + be?: t_tax_product_registrations_resource_country_options_europe + bg?: t_tax_product_registrations_resource_country_options_europe + ca?: t_tax_product_registrations_resource_country_options_canada + ch?: t_tax_product_registrations_resource_country_options_default + cl?: t_tax_product_registrations_resource_country_options_simplified + co?: t_tax_product_registrations_resource_country_options_simplified + cy?: t_tax_product_registrations_resource_country_options_europe + cz?: t_tax_product_registrations_resource_country_options_europe + de?: t_tax_product_registrations_resource_country_options_europe + dk?: t_tax_product_registrations_resource_country_options_europe + ee?: t_tax_product_registrations_resource_country_options_europe + es?: t_tax_product_registrations_resource_country_options_europe + fi?: t_tax_product_registrations_resource_country_options_europe + fr?: t_tax_product_registrations_resource_country_options_europe + gb?: t_tax_product_registrations_resource_country_options_default + gr?: t_tax_product_registrations_resource_country_options_europe + hr?: t_tax_product_registrations_resource_country_options_europe + hu?: t_tax_product_registrations_resource_country_options_europe + id?: t_tax_product_registrations_resource_country_options_simplified + ie?: t_tax_product_registrations_resource_country_options_europe + is?: t_tax_product_registrations_resource_country_options_default + it?: t_tax_product_registrations_resource_country_options_europe + jp?: t_tax_product_registrations_resource_country_options_default + kr?: t_tax_product_registrations_resource_country_options_simplified + lt?: t_tax_product_registrations_resource_country_options_europe + lu?: t_tax_product_registrations_resource_country_options_europe + lv?: t_tax_product_registrations_resource_country_options_europe + mt?: t_tax_product_registrations_resource_country_options_europe + mx?: t_tax_product_registrations_resource_country_options_simplified + my?: t_tax_product_registrations_resource_country_options_simplified + nl?: t_tax_product_registrations_resource_country_options_europe + no?: t_tax_product_registrations_resource_country_options_default + nz?: t_tax_product_registrations_resource_country_options_default + pl?: t_tax_product_registrations_resource_country_options_europe + pt?: t_tax_product_registrations_resource_country_options_europe + ro?: t_tax_product_registrations_resource_country_options_europe + sa?: t_tax_product_registrations_resource_country_options_simplified + se?: t_tax_product_registrations_resource_country_options_europe + sg?: t_tax_product_registrations_resource_country_options_default + si?: t_tax_product_registrations_resource_country_options_europe + sk?: t_tax_product_registrations_resource_country_options_europe + th?: t_tax_product_registrations_resource_country_options_simplified + tr?: t_tax_product_registrations_resource_country_options_simplified + us?: t_tax_product_registrations_resource_country_options_united_states + vn?: t_tax_product_registrations_resource_country_options_simplified + za?: t_tax_product_registrations_resource_country_options_default +} + +export type t_tax_product_registrations_resource_country_options_ca_province_standard = + { + province: string + } + +export type t_tax_product_registrations_resource_country_options_canada = { + province_standard?: t_tax_product_registrations_resource_country_options_ca_province_standard + type: "province_standard" | "simplified" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_default = { + type: "standard" +} + +export type t_tax_product_registrations_resource_country_options_eu_standard = { + place_of_supply_scheme: "small_seller" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_europe = { + standard?: t_tax_product_registrations_resource_country_options_eu_standard + type: "ioss" | "oss_non_union" | "oss_union" | "standard" +} + +export type t_tax_product_registrations_resource_country_options_simplified = { + type: "simplified" +} + +export type t_tax_product_registrations_resource_country_options_united_states = + { + local_amusement_tax?: t_tax_product_registrations_resource_country_options_us_local_amusement_tax + local_lease_tax?: t_tax_product_registrations_resource_country_options_us_local_lease_tax + state: string + type: + | "local_amusement_tax" + | "local_lease_tax" + | "state_communications_tax" + | "state_sales_tax" + } + +export type t_tax_product_registrations_resource_country_options_us_local_amusement_tax = + { + jurisdiction: string + } + +export type t_tax_product_registrations_resource_country_options_us_local_lease_tax = + { + jurisdiction: string + } + export type t_tax_product_resource_customer_details = { address?: t_tax_product_resource_postal_address | null address_source?: "billing" | "shipping" | null @@ -9643,6 +10819,7 @@ export type t_tax_product_resource_customer_details_resource_tax_id = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -9827,6 +11004,14 @@ export type t_tax_rate = { id: string inclusive: boolean jurisdiction?: string | null + jurisdiction_level?: + | "city" + | "country" + | "county" + | "district" + | "multiple" + | "state" + | null livemode: boolean metadata?: { [key: string]: string | undefined @@ -9846,7 +11031,6 @@ export type t_tax_rate = { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" | null } @@ -9856,7 +11040,9 @@ export type t_terminal_configuration = { id: string is_account_default?: boolean | null livemode: boolean + name?: string | null object: "terminal.configuration" + offline?: t_terminal_configuration_configuration_resource_offline_config tipping?: t_terminal_configuration_configuration_resource_tipping verifone_p400?: t_terminal_configuration_configuration_resource_device_type_specific_config } @@ -9886,6 +11072,7 @@ export type t_terminal_reader = { | "bbpos_chipper2x" | "bbpos_wisepad3" | "bbpos_wisepos_e" + | "mobile_phone_reader" | "simulated_wisepos_e" | "stripe_m2" | "verifone_P400" @@ -9899,7 +11086,7 @@ export type t_terminal_reader = { } object: "terminal.reader" serial_number: string - status?: string | null + status?: "offline" | "online" | null } export type t_terminal_configuration_configuration_resource_currency_specific_config = @@ -9914,6 +11101,10 @@ export type t_terminal_configuration_configuration_resource_device_type_specific splashscreen?: string | t_file } +export type t_terminal_configuration_configuration_resource_offline_config = { + enabled?: boolean | null +} + export type t_terminal_configuration_configuration_resource_tipping = { aud?: t_terminal_configuration_configuration_resource_currency_specific_config cad?: t_terminal_configuration_configuration_resource_currency_specific_config @@ -9945,6 +11136,7 @@ export type t_terminal_reader_reader_resource_line_item = { } export type t_terminal_reader_reader_resource_process_config = { + enable_customer_cancellation?: boolean skip_tipping?: boolean tipping?: t_terminal_reader_reader_resource_tipping_config } @@ -9954,7 +11146,9 @@ export type t_terminal_reader_reader_resource_process_payment_intent_action = { process_config?: t_terminal_reader_reader_resource_process_config } -export type t_terminal_reader_reader_resource_process_setup_config = EmptyObject +export type t_terminal_reader_reader_resource_process_setup_config = { + enable_customer_cancellation?: boolean +} export type t_terminal_reader_reader_resource_process_setup_intent_action = { generated_card?: string @@ -9987,9 +11181,14 @@ export type t_terminal_reader_reader_resource_refund_payment_action = { reason?: "duplicate" | "fraudulent" | "requested_by_customer" refund?: string | t_refund refund_application_fee?: boolean + refund_payment_config?: t_terminal_reader_reader_resource_refund_payment_config reverse_transfer?: boolean } +export type t_terminal_reader_reader_resource_refund_payment_config = { + enable_customer_cancellation?: boolean +} + export type t_terminal_reader_reader_resource_set_reader_display_action = { cart?: t_terminal_reader_reader_resource_cart | null type: "cart" @@ -10012,6 +11211,7 @@ export type t_test_helpers_test_clock = { export type t_three_d_secure_details = { authentication_flow?: "challenge" | "frictionless" | null + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" | null result?: | "attempt_acknowledged" | "authenticated" @@ -10029,11 +11229,15 @@ export type t_three_d_secure_details = { | "protocol_error" | "rejected" | null + transaction_id?: string | null version?: "1.0.2" | "2.1.0" | "2.2.0" | null } export type t_three_d_secure_details_charge = { authentication_flow?: "challenge" | "frictionless" | null + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" | null + exemption_indicator?: "low_risk" | "none" | null + exemption_indicator_applied?: boolean result?: | "attempt_acknowledged" | "authenticated" @@ -10051,6 +11255,7 @@ export type t_three_d_secure_details_charge = { | "protocol_error" | "rejected" | null + transaction_id?: string | null version?: "1.0.2" | "2.1.0" | "2.2.0" | null } @@ -10070,6 +11275,10 @@ export type t_token = { used: boolean } +export type t_token_card_networks = { + preferred?: string | null +} + export type t_topup = { amount: number balance_transaction?: string | t_balance_transaction | null @@ -10670,6 +11879,7 @@ export type t_treasury_received_debits_resource_linked_flows = { inbound_transfer?: string | null issuing_authorization?: string | null issuing_transaction?: string | null + payout?: string | null } export type t_treasury_received_debits_resource_reversal_details = { @@ -10991,6 +12201,12 @@ export type t_DeleteSubscriptionsSubscriptionExposedIdDiscountParamSchema = { subscription_exposed_id: string } +export type t_DeleteTaxIdsIdBodySchema = EmptyObject + +export type t_DeleteTaxIdsIdParamSchema = { + id: string +} + export type t_DeleteTerminalConfigurationsConfigurationBodySchema = EmptyObject export type t_DeleteTerminalConfigurationsConfigurationParamSchema = { @@ -11096,6 +12312,7 @@ export type t_GetAccountsAccountExternalAccountsQuerySchema = { ending_before?: string expand?: string[] limit?: number + object?: "bank_account" | "card" starting_after?: string } @@ -11123,6 +12340,7 @@ export type t_GetAccountsAccountPeopleQuerySchema = { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean representative?: boolean } @@ -11153,6 +12371,7 @@ export type t_GetAccountsAccountPersonsQuerySchema = { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean representative?: boolean } @@ -11334,6 +12553,43 @@ export type t_GetBalanceTransactionsIdQuerySchema = { expand?: string[] } +export type t_GetBillingMetersBodySchema = EmptyObject + +export type t_GetBillingMetersQuerySchema = { + ending_before?: string + expand?: string[] + limit?: number + starting_after?: string + status?: "active" | "inactive" +} + +export type t_GetBillingMetersIdBodySchema = EmptyObject + +export type t_GetBillingMetersIdParamSchema = { + id: string +} + +export type t_GetBillingMetersIdQuerySchema = { + expand?: string[] +} + +export type t_GetBillingMetersIdEventSummariesBodySchema = EmptyObject + +export type t_GetBillingMetersIdEventSummariesParamSchema = { + id: string +} + +export type t_GetBillingMetersIdEventSummariesQuerySchema = { + customer: string + end_time: number + ending_before?: string + expand?: string[] + limit?: number + start_time: number + starting_after?: string + value_grouping_window?: "hour" +} + export type t_GetBillingPortalConfigurationsBodySchema = EmptyObject export type t_GetBillingPortalConfigurationsQuerySchema = { @@ -11432,6 +12688,14 @@ export type t_GetChargesSearchQuerySchema = { export type t_GetCheckoutSessionsBodySchema = EmptyObject export type t_GetCheckoutSessionsQuerySchema = { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string customer_details?: { email: string @@ -11442,6 +12706,7 @@ export type t_GetCheckoutSessionsQuerySchema = { payment_intent?: string payment_link?: string starting_after?: string + status?: "complete" | "expired" | "open" subscription?: string } @@ -11468,6 +12733,73 @@ export type t_GetCheckoutSessionsSessionLineItemsQuerySchema = { starting_after?: string } +export type t_GetClimateOrdersBodySchema = EmptyObject + +export type t_GetClimateOrdersQuerySchema = { + ending_before?: string + expand?: string[] + limit?: number + starting_after?: string +} + +export type t_GetClimateOrdersOrderBodySchema = EmptyObject + +export type t_GetClimateOrdersOrderParamSchema = { + order: string +} + +export type t_GetClimateOrdersOrderQuerySchema = { + expand?: string[] +} + +export type t_GetClimateProductsBodySchema = EmptyObject + +export type t_GetClimateProductsQuerySchema = { + ending_before?: string + expand?: string[] + limit?: number + starting_after?: string +} + +export type t_GetClimateProductsProductBodySchema = EmptyObject + +export type t_GetClimateProductsProductParamSchema = { + product: string +} + +export type t_GetClimateProductsProductQuerySchema = { + expand?: string[] +} + +export type t_GetClimateSuppliersBodySchema = EmptyObject + +export type t_GetClimateSuppliersQuerySchema = { + ending_before?: string + expand?: string[] + limit?: number + starting_after?: string +} + +export type t_GetClimateSuppliersSupplierBodySchema = EmptyObject + +export type t_GetClimateSuppliersSupplierParamSchema = { + supplier: string +} + +export type t_GetClimateSuppliersSupplierQuerySchema = { + expand?: string[] +} + +export type t_GetConfirmationTokensConfirmationTokenBodySchema = EmptyObject + +export type t_GetConfirmationTokensConfirmationTokenParamSchema = { + confirmation_token: string +} + +export type t_GetConfirmationTokensConfirmationTokenQuerySchema = { + expand?: string[] +} + export type t_GetCountrySpecsBodySchema = EmptyObject export type t_GetCountrySpecsQuerySchema = { @@ -11517,6 +12849,14 @@ export type t_GetCouponsCouponQuerySchema = { export type t_GetCreditNotesBodySchema = EmptyObject export type t_GetCreditNotesQuerySchema = { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string ending_before?: string expand?: string[] @@ -11561,6 +12901,13 @@ export type t_GetCreditNotesPreviewQuerySchema = { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -11598,6 +12945,13 @@ export type t_GetCreditNotesPreviewLinesQuerySchema = { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -11803,14 +13157,17 @@ export type t_GetCustomersCustomerPaymentMethodsQuerySchema = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -12126,9 +13483,67 @@ export type t_GetFinancialConnectionsSessionsSessionQuerySchema = { expand?: string[] } +export type t_GetFinancialConnectionsTransactionsBodySchema = EmptyObject + +export type t_GetFinancialConnectionsTransactionsQuerySchema = { + account: string + ending_before?: string + expand?: string[] + limit?: number + starting_after?: string + transacted_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + transaction_refresh?: { + after: string + } +} + +export type t_GetFinancialConnectionsTransactionsTransactionBodySchema = + EmptyObject + +export type t_GetFinancialConnectionsTransactionsTransactionParamSchema = { + transaction: string +} + +export type t_GetFinancialConnectionsTransactionsTransactionQuerySchema = { + expand?: string[] +} + +export type t_GetForwardingRequestsBodySchema = EmptyObject + +export type t_GetForwardingRequestsQuerySchema = { + created?: { + gt?: number + gte?: number + lt?: number + lte?: number + } + ending_before?: string + expand?: string[] + limit?: number + starting_after?: string +} + +export type t_GetForwardingRequestsIdBodySchema = EmptyObject + +export type t_GetForwardingRequestsIdParamSchema = { + id: string +} + +export type t_GetForwardingRequestsIdQuerySchema = { + expand?: string[] +} + export type t_GetIdentityVerificationReportsBodySchema = EmptyObject export type t_GetIdentityVerificationReportsQuerySchema = { + client_reference_id?: string created?: | { gt?: number @@ -12158,6 +13573,7 @@ export type t_GetIdentityVerificationReportsReportQuerySchema = { export type t_GetIdentityVerificationSessionsBodySchema = EmptyObject export type t_GetIdentityVerificationSessionsQuerySchema = { + client_reference_id?: string created?: | { gt?: number @@ -12279,6 +13695,10 @@ export type t_GetInvoicesUpcomingBodySchema = EmptyObject export type t_GetInvoicesUpcomingQuerySchema = { automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } coupon?: string currency?: string @@ -12359,6 +13779,7 @@ export type t_GetInvoicesUpcomingQuerySchema = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -12387,6 +13808,7 @@ export type t_GetInvoicesUpcomingQuerySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -12399,6 +13821,7 @@ export type t_GetInvoicesUpcomingQuerySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" invoiceitem?: string @@ -12426,6 +13849,11 @@ export type t_GetInvoicesUpcomingQuerySchema = { unit_amount?: number unit_amount_decimal?: string }[] + issuer?: { + account?: string + type: "account" | "self" + } + on_behalf_of?: string | "" schedule?: string subscription?: string subscription_billing_cycle_anchor?: "now" | "unchanged" | number @@ -12441,6 +13869,13 @@ export type t_GetInvoicesUpcomingQuerySchema = { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -12478,6 +13913,10 @@ export type t_GetInvoicesUpcomingLinesBodySchema = EmptyObject export type t_GetInvoicesUpcomingLinesQuerySchema = { automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } coupon?: string currency?: string @@ -12558,6 +13997,7 @@ export type t_GetInvoicesUpcomingLinesQuerySchema = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -12586,6 +14026,7 @@ export type t_GetInvoicesUpcomingLinesQuerySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" ending_before?: string @@ -12599,6 +14040,7 @@ export type t_GetInvoicesUpcomingLinesQuerySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" invoiceitem?: string @@ -12626,7 +14068,12 @@ export type t_GetInvoicesUpcomingLinesQuerySchema = { unit_amount?: number unit_amount_decimal?: string }[] + issuer?: { + account?: string + type: "account" | "self" + } limit?: number + on_behalf_of?: string | "" schedule?: string starting_after?: string subscription?: string @@ -12643,6 +14090,13 @@ export type t_GetInvoicesUpcomingLinesQuerySchema = { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -12754,6 +14208,7 @@ export type t_GetIssuingCardsQuerySchema = { expand?: string[] last4?: string limit?: number + personalization_design?: string starting_after?: string status?: "active" | "canceled" | "inactive" type?: "physical" | "virtual" @@ -12798,6 +14253,55 @@ export type t_GetIssuingDisputesDisputeQuerySchema = { expand?: string[] } +export type t_GetIssuingPersonalizationDesignsBodySchema = EmptyObject + +export type t_GetIssuingPersonalizationDesignsQuerySchema = { + ending_before?: string + expand?: string[] + limit?: number + lookup_keys?: string[] + preferences?: { + is_default?: boolean + is_platform_default?: boolean + } + starting_after?: string + status?: "active" | "inactive" | "rejected" | "review" +} + +export type t_GetIssuingPersonalizationDesignsPersonalizationDesignBodySchema = + EmptyObject + +export type t_GetIssuingPersonalizationDesignsPersonalizationDesignParamSchema = + { + personalization_design: string + } + +export type t_GetIssuingPersonalizationDesignsPersonalizationDesignQuerySchema = + { + expand?: string[] + } + +export type t_GetIssuingPhysicalBundlesBodySchema = EmptyObject + +export type t_GetIssuingPhysicalBundlesQuerySchema = { + ending_before?: string + expand?: string[] + limit?: number + starting_after?: string + status?: "active" | "inactive" | "review" + type?: "custom" | "standard" +} + +export type t_GetIssuingPhysicalBundlesPhysicalBundleBodySchema = EmptyObject + +export type t_GetIssuingPhysicalBundlesPhysicalBundleParamSchema = { + physical_bundle: string +} + +export type t_GetIssuingPhysicalBundlesPhysicalBundleQuerySchema = { + expand?: string[] +} + export type t_GetIssuingSettlementsBodySchema = EmptyObject export type t_GetIssuingSettlementsQuerySchema = { @@ -12825,6 +14329,35 @@ export type t_GetIssuingSettlementsSettlementQuerySchema = { expand?: string[] } +export type t_GetIssuingTokensBodySchema = EmptyObject + +export type t_GetIssuingTokensQuerySchema = { + card: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + ending_before?: string + expand?: string[] + limit?: number + starting_after?: string + status?: "active" | "deleted" | "requested" | "suspended" +} + +export type t_GetIssuingTokensTokenBodySchema = EmptyObject + +export type t_GetIssuingTokensTokenParamSchema = { + token: string +} + +export type t_GetIssuingTokensTokenQuerySchema = { + expand?: string[] +} + export type t_GetIssuingTransactionsBodySchema = EmptyObject export type t_GetIssuingTransactionsQuerySchema = { @@ -13052,14 +14585,17 @@ export type t_GetPaymentMethodsQuerySchema = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -13161,6 +14697,7 @@ export type t_GetPricesQuerySchema = { product?: string recurring?: { interval?: "day" | "month" | "week" | "year" + meter?: string usage_type?: "licensed" | "metered" } starting_after?: string @@ -13319,6 +14856,14 @@ export type t_GetRadarEarlyFraudWarningsBodySchema = EmptyObject export type t_GetRadarEarlyFraudWarningsQuerySchema = { charge?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number ending_before?: string expand?: string[] limit?: number @@ -13833,6 +15378,30 @@ export type t_GetTaxCodesIdQuerySchema = { expand?: string[] } +export type t_GetTaxIdsBodySchema = EmptyObject + +export type t_GetTaxIdsQuerySchema = { + ending_before?: string + expand?: string[] + limit?: number + owner?: { + account?: string + customer?: string + type: "account" | "application" | "customer" | "self" + } + starting_after?: string +} + +export type t_GetTaxIdsIdBodySchema = EmptyObject + +export type t_GetTaxIdsIdParamSchema = { + id: string +} + +export type t_GetTaxIdsIdQuerySchema = { + expand?: string[] +} + export type t_GetTaxRatesBodySchema = EmptyObject export type t_GetTaxRatesQuerySchema = { @@ -13862,6 +15431,26 @@ export type t_GetTaxRatesTaxRateQuerySchema = { expand?: string[] } +export type t_GetTaxRegistrationsBodySchema = EmptyObject + +export type t_GetTaxRegistrationsQuerySchema = { + ending_before?: string + expand?: string[] + limit?: number + starting_after?: string + status?: "active" | "all" | "expired" | "scheduled" +} + +export type t_GetTaxRegistrationsIdBodySchema = EmptyObject + +export type t_GetTaxRegistrationsIdParamSchema = { + id: string +} + +export type t_GetTaxRegistrationsIdQuerySchema = { + expand?: string[] +} + export type t_GetTaxSettingsBodySchema = EmptyObject export type t_GetTaxSettingsQuerySchema = { @@ -13937,6 +15526,7 @@ export type t_GetTerminalReadersQuerySchema = { | "bbpos_chipper2x" | "bbpos_wisepad3" | "bbpos_wisepos_e" + | "mobile_phone_reader" | "simulated_wisepos_e" | "stripe_m2" | "verifone_P400" @@ -14187,6 +15777,14 @@ export type t_GetTreasuryInboundTransfersIdQuerySchema = { export type t_GetTreasuryOutboundPaymentsBodySchema = EmptyObject export type t_GetTreasuryOutboundPaymentsQuerySchema = { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number customer?: string ending_before?: string expand?: string[] @@ -14377,6 +15975,10 @@ export type t_GetWebhookEndpointsWebhookEndpointQuerySchema = { export type t_PostAccountLinksBodySchema = { account: string collect?: "currently_due" | "eventually_due" + collection_options?: { + fields: "currently_due" | "eventually_due" + future_requirements?: "include" | "omit" + } expand?: string[] refresh_url?: string return_url?: string @@ -14388,6 +15990,37 @@ export type t_PostAccountSessionsBodySchema = { components: { account_onboarding?: { enabled: boolean + features?: EmptyObject + } + documents?: { + enabled: boolean + features?: EmptyObject + } + payment_details?: { + enabled: boolean + features?: { + capture_payments?: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management?: boolean + refund_management?: boolean + } + } + payments?: { + enabled: boolean + features?: { + capture_payments?: boolean + destination_on_behalf_of_charge_management?: boolean + dispute_management?: boolean + refund_management?: boolean + } + } + payouts?: { + enabled: boolean + features?: { + edit_payout_schedule?: boolean + instant_payouts?: boolean + standard_payouts?: boolean + } } } expand?: string[] @@ -14413,6 +16046,12 @@ export type t_PostAccountsBodySchema = { } | string business_profile?: { + annual_revenue?: { + amount: number + currency: string + fiscal_year_end: string + } + estimated_worker_count?: number mcc?: string monthly_estimated_revenue?: { amount: number @@ -14444,6 +16083,9 @@ export type t_PostAccountsBodySchema = { afterpay_clearpay_payments?: { requested?: boolean } + amazon_pay_payments?: { + requested?: boolean + } au_becs_debit_payments?: { requested?: boolean } @@ -14507,6 +16149,9 @@ export type t_PostAccountsBodySchema = { link_payments?: { requested?: boolean } + mobilepay_payments?: { + requested?: boolean + } oxxo_payments?: { requested?: boolean } @@ -14519,12 +16164,18 @@ export type t_PostAccountsBodySchema = { promptpay_payments?: { requested?: boolean } + revolut_pay_payments?: { + requested?: boolean + } sepa_debit_payments?: { requested?: boolean } sofort_payments?: { requested?: boolean } + swish_payments?: { + requested?: boolean + } tax_reporting_us_1099_k?: { requested?: boolean } @@ -14603,6 +16254,7 @@ export type t_PostAccountsBodySchema = { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -14709,6 +16361,13 @@ export type t_PostAccountsBodySchema = { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -14727,6 +16386,9 @@ export type t_PostAccountsBodySchema = { } | "" settings?: { + bacs_debit_payments?: { + display_name?: string + } branding?: { icon?: string logo?: string @@ -14791,6 +16453,12 @@ export type t_PostAccountsBodySchema = { export type t_PostAccountsAccountBodySchema = { account_token?: string business_profile?: { + annual_revenue?: { + amount: number + currency: string + fiscal_year_end: string + } + estimated_worker_count?: number mcc?: string monthly_estimated_revenue?: { amount: number @@ -14822,6 +16490,9 @@ export type t_PostAccountsAccountBodySchema = { afterpay_clearpay_payments?: { requested?: boolean } + amazon_pay_payments?: { + requested?: boolean + } au_becs_debit_payments?: { requested?: boolean } @@ -14885,6 +16556,9 @@ export type t_PostAccountsAccountBodySchema = { link_payments?: { requested?: boolean } + mobilepay_payments?: { + requested?: boolean + } oxxo_payments?: { requested?: boolean } @@ -14897,12 +16571,18 @@ export type t_PostAccountsAccountBodySchema = { promptpay_payments?: { requested?: boolean } + revolut_pay_payments?: { + requested?: boolean + } sepa_debit_payments?: { requested?: boolean } sofort_payments?: { requested?: boolean } + swish_payments?: { + requested?: boolean + } tax_reporting_us_1099_k?: { requested?: boolean } @@ -14981,6 +16661,7 @@ export type t_PostAccountsAccountBodySchema = { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -15086,6 +16767,13 @@ export type t_PostAccountsAccountBodySchema = { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -15104,6 +16792,9 @@ export type t_PostAccountsAccountBodySchema = { } | "" settings?: { + bacs_debit_payments?: { + display_name?: string + } branding?: { icon?: string logo?: string @@ -15126,6 +16817,9 @@ export type t_PostAccountsAccountBodySchema = { statement_descriptor_prefix_kana?: string | "" statement_descriptor_prefix_kanji?: string | "" } + invoices?: { + default_account_tax_ids?: string[] | "" + } payments?: { statement_descriptor?: string statement_descriptor_kana?: string @@ -15311,6 +17005,13 @@ export type t_PostAccountsAccountLoginLinksParamSchema = { } export type t_PostAccountsAccountPeopleBodySchema = { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -15388,6 +17089,7 @@ export type t_PostAccountsAccountPeopleBodySchema = { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -15411,6 +17113,13 @@ export type t_PostAccountsAccountPeopleParamSchema = { } export type t_PostAccountsAccountPeoplePersonBodySchema = { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -15488,6 +17197,7 @@ export type t_PostAccountsAccountPeoplePersonBodySchema = { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -15512,6 +17222,13 @@ export type t_PostAccountsAccountPeoplePersonParamSchema = { } export type t_PostAccountsAccountPersonsBodySchema = { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -15589,6 +17306,7 @@ export type t_PostAccountsAccountPersonsBodySchema = { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -15612,6 +17330,13 @@ export type t_PostAccountsAccountPersonsParamSchema = { } export type t_PostAccountsAccountPersonsPersonBodySchema = { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -15689,6 +17414,7 @@ export type t_PostAccountsAccountPersonsPersonBodySchema = { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -15782,6 +17508,67 @@ export type t_PostAppsSecretsDeleteBodySchema = { } } +export type t_PostBillingMeterEventAdjustmentsBodySchema = { + cancel: { + identifier: string + } + event_name: string + expand?: string[] + type?: "cancel" +} + +export type t_PostBillingMeterEventsBodySchema = { + event_name: string + expand?: string[] + identifier?: string + payload: { + [key: string]: string | undefined + } + timestamp: number +} + +export type t_PostBillingMetersBodySchema = { + customer_mapping?: { + event_payload_key: string + type: "by_id" + } + default_aggregation: { + formula: "count" | "sum" + } + display_name: string + event_name: string + event_time_window?: "day" | "hour" + expand?: string[] + value_settings?: { + event_payload_key: string + } +} + +export type t_PostBillingMetersIdBodySchema = { + display_name?: string + expand?: string[] +} + +export type t_PostBillingMetersIdParamSchema = { + id: string +} + +export type t_PostBillingMetersIdDeactivateBodySchema = { + expand?: string[] +} + +export type t_PostBillingMetersIdDeactivateParamSchema = { + id: string +} + +export type t_PostBillingMetersIdReactivateBodySchema = { + expand?: string[] +} + +export type t_PostBillingMetersIdReactivateParamSchema = { + id: string +} + export type t_PostBillingPortalConfigurationsBodySchema = { business_profile: { headline?: string | "" @@ -15823,9 +17610,6 @@ export type t_PostBillingPortalConfigurationsBodySchema = { mode?: "at_period_end" | "immediately" proration_behavior?: "always_invoice" | "create_prorations" | "none" } - subscription_pause?: { - enabled?: boolean - } subscription_update?: { default_allowed_updates: ("price" | "promotion_code" | "quantity")[] | "" enabled: boolean @@ -15888,9 +17672,6 @@ export type t_PostBillingPortalConfigurationsConfigurationBodySchema = { mode?: "at_period_end" | "immediately" proration_behavior?: "always_invoice" | "create_prorations" | "none" } - subscription_pause?: { - enabled?: boolean - } subscription_update?: { default_allowed_updates?: ("price" | "promotion_code" | "quantity")[] | "" enabled?: boolean @@ -16249,11 +18030,18 @@ export type t_PostCheckoutSessionsBodySchema = { allow_promotion_codes?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" cancel_url?: string client_reference_id?: string consent_collection?: { + payment_method_reuse_agreement?: { + position: "auto" | "hidden" + } promotions?: "auto" | "none" terms_of_service?: "none" | "required" } @@ -16282,6 +18070,11 @@ export type t_PostCheckoutSessionsBodySchema = { type: "dropdown" | "numeric" | "text" }[] custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -16324,6 +18117,10 @@ export type t_PostCheckoutSessionsBodySchema = { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: { [key: string]: string | undefined } @@ -16484,6 +18281,7 @@ export type t_PostCheckoutSessionsBodySchema = { installments?: { enabled?: boolean } + request_three_d_secure?: "any" | "automatic" | "challenge" setup_future_usage?: "off_session" | "on_session" statement_descriptor_suffix_kana?: string statement_descriptor_suffix_kanji?: string @@ -16582,12 +18380,18 @@ export type t_PostCheckoutSessionsBodySchema = { pix?: { expires_after_seconds?: number } + revolut_pay?: { + setup_future_usage?: "none" | "off_session" + } sepa_debit?: { setup_future_usage?: "none" | "off_session" | "on_session" } sofort?: { setup_future_usage?: "none" } + swish?: { + reference?: string + } us_bank_account?: { financial_connections?: { permissions?: ( @@ -16596,7 +18400,7 @@ export type t_PostCheckoutSessionsBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } setup_future_usage?: "none" | "off_session" | "on_session" verification_method?: "automatic" | "instant" @@ -16634,8 +18438,10 @@ export type t_PostCheckoutSessionsBodySchema = { | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -16643,6 +18449,8 @@ export type t_PostCheckoutSessionsBodySchema = { phone_number_collection?: { enabled: boolean } + redirect_on_completion?: "always" | "if_required" | "never" + return_url?: string setup_intent_data?: { description?: string metadata?: { @@ -16931,6 +18739,12 @@ export type t_PostCheckoutSessionsBodySchema = { billing_cycle_anchor?: number default_tax_rates?: string[] description?: string + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } metadata?: { [key: string]: string | undefined } @@ -16948,10 +18762,11 @@ export type t_PostCheckoutSessionsBodySchema = { } } } - success_url: string + success_url?: string tax_id_collection?: { enabled: boolean } + ui_mode?: "embedded" | "hosted" } export type t_PostCheckoutSessionsSessionExpireBodySchema = { @@ -16962,6 +18777,44 @@ export type t_PostCheckoutSessionsSessionExpireParamSchema = { session: string } +export type t_PostClimateOrdersBodySchema = { + amount?: number + beneficiary?: { + public_name: string + } + currency?: string + expand?: string[] + metadata?: { + [key: string]: string | undefined + } + metric_tons?: string + product: string +} + +export type t_PostClimateOrdersOrderBodySchema = { + beneficiary?: + | { + public_name: string | "" + } + | "" + expand?: string[] + metadata?: { + [key: string]: string | undefined + } +} + +export type t_PostClimateOrdersOrderParamSchema = { + order: string +} + +export type t_PostClimateOrdersOrderCancelBodySchema = { + expand?: string[] +} + +export type t_PostClimateOrdersOrderCancelParamSchema = { + order: string +} + export type t_PostCouponsBodySchema = { amount_off?: number applies_to?: { @@ -17022,6 +18875,13 @@ export type t_PostCreditNotesBodySchema = { description?: string invoice_line_item?: string quantity?: number + tax_amounts?: + | { + amount: number + tax_rate: string + taxable_amount: number + }[] + | "" tax_rates?: string[] | "" type: "custom_line_item" | "invoice_line_item" unit_amount?: number @@ -17064,6 +18924,19 @@ export type t_PostCreditNotesIdVoidParamSchema = { id: string } +export type t_PostCustomerSessionsBodySchema = { + components: { + buy_button?: { + enabled: boolean + } + pricing_table?: { + enabled: boolean + } + } + customer: string + expand?: string[] +} + export type t_PostCustomersBodySchema = { address?: | { @@ -17129,6 +19002,7 @@ export type t_PostCustomersBodySchema = { source?: string tax?: { ip_address?: string | "" + validate_location?: "deferred" | "immediately" } tax_exempt?: "" | "exempt" | "none" | "reverse" tax_id_data?: { @@ -17178,6 +19052,7 @@ export type t_PostCustomersBodySchema = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -17302,6 +19177,7 @@ export type t_PostCustomersCustomerBodySchema = { source?: string tax?: { ip_address?: string | "" + validate_location?: "deferred" | "immediately" } tax_exempt?: "" | "exempt" | "none" | "reverse" } @@ -17639,6 +19515,11 @@ export type t_PostCustomersCustomerSourcesIdVerifyParamSchema = { export type t_PostCustomersCustomerSubscriptionsBodySchema = { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -17650,9 +19531,13 @@ export type t_PostCustomersCustomerSubscriptionsBodySchema = { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } backdate_start_date?: number billing_cycle_anchor?: number @@ -17671,13 +19556,34 @@ export type t_PostCustomersCustomerSubscriptionsBodySchema = { default_payment_method?: string default_source?: string default_tax_rates?: string[] | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -17741,7 +19647,7 @@ export type t_PostCustomersCustomerSubscriptionsBodySchema = { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -17756,6 +19662,7 @@ export type t_PostCustomersCustomerSubscriptionsBodySchema = { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -17765,7 +19672,7 @@ export type t_PostCustomersCustomerSubscriptionsBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -17783,12 +19690,14 @@ export type t_PostCustomersCustomerSubscriptionsBodySchema = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -17829,6 +19738,11 @@ export type t_PostCustomersCustomerSubscriptionsParamSchema = { export type t_PostCustomersCustomerSubscriptionsSubscriptionExposedIdBodySchema = { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -17840,9 +19754,13 @@ export type t_PostCustomersCustomerSubscriptionsSubscriptionExposedIdBodySchema quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "now" | "unchanged" billing_thresholds?: @@ -17872,7 +19790,21 @@ export type t_PostCustomersCustomerSubscriptionsSubscriptionExposedIdBodySchema default_payment_method?: string default_source?: string | "" default_tax_rates?: string[] | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { @@ -17881,6 +19813,13 @@ export type t_PostCustomersCustomerSubscriptionsSubscriptionExposedIdBodySchema | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -17953,7 +19892,7 @@ export type t_PostCustomersCustomerSubscriptionsSubscriptionExposedIdBodySchema | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -17968,6 +19907,7 @@ export type t_PostCustomersCustomerSubscriptionsSubscriptionExposedIdBodySchema } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -17977,7 +19917,7 @@ export type t_PostCustomersCustomerSubscriptionsSubscriptionExposedIdBodySchema | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -17995,12 +19935,14 @@ export type t_PostCustomersCustomerSubscriptionsSubscriptionExposedIdBodySchema | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -18090,6 +20032,7 @@ export type t_PostCustomersCustomerTaxIdsBodySchema = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -18237,13 +20180,31 @@ export type t_PostFinancialConnectionsAccountsAccountDisconnectParamSchema = { export type t_PostFinancialConnectionsAccountsAccountRefreshBodySchema = { expand?: string[] - features: ("balance" | "ownership")[] + features: ("balance" | "ownership" | "transactions")[] } export type t_PostFinancialConnectionsAccountsAccountRefreshParamSchema = { account: string } +export type t_PostFinancialConnectionsAccountsAccountSubscribeBodySchema = { + expand?: string[] + features: "transactions"[] +} + +export type t_PostFinancialConnectionsAccountsAccountSubscribeParamSchema = { + account: string +} + +export type t_PostFinancialConnectionsAccountsAccountUnsubscribeBodySchema = { + expand?: string[] + features: "transactions"[] +} + +export type t_PostFinancialConnectionsAccountsAccountUnsubscribeParamSchema = { + account: string +} + export type t_PostFinancialConnectionsSessionsBodySchema = { account_holder: { account?: string @@ -18255,11 +20216,32 @@ export type t_PostFinancialConnectionsSessionsBodySchema = { countries: string[] } permissions: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: ("balances" | "ownership")[] + prefetch?: ("balances" | "ownership" | "transactions")[] return_url?: string } +export type t_PostForwardingRequestsBodySchema = { + config: string + expand?: string[] + payment_method: string + replacements: ( + | "card_cvc" + | "card_expiry" + | "card_number" + | "cardholder_name" + )[] + request?: { + body?: string + headers?: { + name: string + value: string + }[] + } + url: string +} + export type t_PostIdentityVerificationSessionsBodySchema = { + client_reference_id?: string expand?: string[] metadata?: { [key: string]: string | undefined @@ -18273,9 +20255,24 @@ export type t_PostIdentityVerificationSessionsBodySchema = { require_matching_selfie?: boolean } | "" + email?: + | { + require_verification?: boolean + } + | "" + phone?: + | { + require_verification?: boolean + } + | "" + } + provided_details?: { + email?: string + phone?: string } return_url?: string - type: "document" | "id_number" + type?: "document" | "id_number" + verification_flow?: string } export type t_PostIdentityVerificationSessionsSessionBodySchema = { @@ -18292,6 +20289,20 @@ export type t_PostIdentityVerificationSessionsSessionBodySchema = { require_matching_selfie?: boolean } | "" + email?: + | { + require_verification?: boolean + } + | "" + phone?: + | { + require_verification?: boolean + } + | "" + } + provided_details?: { + email?: string + phone?: string } type?: "document" | "id_number" } @@ -18326,6 +20337,7 @@ export type t_PostInvoiceitemsBodySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -18364,6 +20376,7 @@ export type t_PostInvoiceitemsInvoiceitemBodySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -18402,6 +20415,10 @@ export type t_PostInvoicesBodySchema = { auto_advance?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" currency?: string @@ -18421,6 +20438,7 @@ export type t_PostInvoicesBodySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" due_date?: number @@ -18431,11 +20449,16 @@ export type t_PostInvoicesBodySchema = { action: "revision" invoice: string } + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined } | "" + number?: string on_behalf_of?: string payment_settings?: { default_mandate?: string | "" @@ -18465,7 +20488,7 @@ export type t_PostInvoicesBodySchema = { } | "" } - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -18480,6 +20503,7 @@ export type t_PostInvoicesBodySchema = { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -18489,7 +20513,7 @@ export type t_PostInvoicesBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -18507,12 +20531,14 @@ export type t_PostInvoicesBodySchema = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -18523,18 +20549,13 @@ export type t_PostInvoicesBodySchema = { )[] | "" } - pending_invoice_items_behavior?: "exclude" | "include" | "include_and_require" + pending_invoice_items_behavior?: "exclude" | "include" rendering?: { amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" pdf?: { page_size?: "a4" | "auto" | "letter" } } - rendering_options?: - | { - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" - } - | "" shipping_cost?: { shipping_rate?: string shipping_rate_data?: { @@ -18595,6 +20616,10 @@ export type t_PostInvoicesInvoiceBodySchema = { auto_advance?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" custom_fields?: @@ -18612,17 +20637,23 @@ export type t_PostInvoicesInvoiceBodySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" due_date?: number effective_at?: number | "" expand?: string[] footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined } | "" + number?: string | "" on_behalf_of?: string | "" payment_settings?: { default_mandate?: string | "" @@ -18652,7 +20683,7 @@ export type t_PostInvoicesInvoiceBodySchema = { } | "" } - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -18667,6 +20698,7 @@ export type t_PostInvoicesInvoiceBodySchema = { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -18676,7 +20708,7 @@ export type t_PostInvoicesInvoiceBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -18694,12 +20726,14 @@ export type t_PostInvoicesInvoiceBodySchema = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -18716,11 +20750,6 @@ export type t_PostInvoicesInvoiceBodySchema = { page_size?: "a4" | "auto" | "letter" } } - rendering_options?: - | { - amount_tax_display?: "" | "exclude_tax" | "include_inclusive_tax" - } - | "" shipping_cost?: | { shipping_rate?: string @@ -18793,6 +20822,81 @@ export type t_PostInvoicesInvoiceFinalizeParamSchema = { invoice: string } +export type t_PostInvoicesInvoiceLinesLineItemIdBodySchema = { + amount?: number + description?: string + discountable?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" + expand?: string[] + metadata?: + | { + [key: string]: string | undefined + } + | "" + period?: { + end: number + start: number + } + price?: string + price_data?: { + currency: string + product?: string + product_data?: { + description?: string + images?: string[] + metadata?: { + [key: string]: string | undefined + } + name: string + tax_code?: string + } + tax_behavior?: "exclusive" | "inclusive" | "unspecified" + unit_amount?: number + unit_amount_decimal?: string + } + quantity?: number + tax_amounts?: + | { + amount: number + tax_rate_data: { + country?: string + description?: string + display_name: string + inclusive: boolean + jurisdiction?: string + percentage: number + state?: string + tax_type?: + | "amusement_tax" + | "communications_tax" + | "gst" + | "hst" + | "igst" + | "jct" + | "lease_tax" + | "pst" + | "qst" + | "rst" + | "sales_tax" + | "vat" + } + taxable_amount: number + }[] + | "" + tax_rates?: string[] | "" +} + +export type t_PostInvoicesInvoiceLinesLineItemIdParamSchema = { + invoice: string + line_item_id: string +} + export type t_PostInvoicesInvoiceMarkUncollectibleBodySchema = { expand?: string[] } @@ -19213,6 +21317,7 @@ export type t_PostIssuingCardholdersBodySchema = { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -19510,6 +21615,7 @@ export type t_PostIssuingCardholdersBodySchema = { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -20164,6 +22270,7 @@ export type t_PostIssuingCardholdersCardholderBodySchema = { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -20461,6 +22568,7 @@ export type t_PostIssuingCardholdersCardholderBodySchema = { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -20785,8 +22893,13 @@ export type t_PostIssuingCardsBodySchema = { metadata?: { [key: string]: string | undefined } + personalization_design?: string + pin?: { + encrypted_number?: string + } replacement_for?: string replacement_reason?: "damaged" | "expired" | "lost" | "stolen" + second_line?: string | "" shipping?: { address: { city: string @@ -21103,6 +23216,7 @@ export type t_PostIssuingCardsBodySchema = { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -21400,6 +23514,7 @@ export type t_PostIssuingCardsBodySchema = { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -21720,6 +23835,7 @@ export type t_PostIssuingCardsCardBodySchema = { [key: string]: string | undefined } | "" + personalization_design?: string pin?: { encrypted_number?: string } @@ -22021,6 +24137,7 @@ export type t_PostIssuingCardsCardBodySchema = { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + allowed_merchant_countries?: string[] blocked_categories?: ( | "ac_refrigeration_repair" | "accounting_bookkeeping_services" @@ -22318,6 +24435,7 @@ export type t_PostIssuingCardsCardBodySchema = { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[] + blocked_merchant_countries?: string[] spending_limits?: { amount: number categories?: ( @@ -22824,6 +24942,56 @@ export type t_PostIssuingDisputesDisputeSubmitParamSchema = { dispute: string } +export type t_PostIssuingPersonalizationDesignsBodySchema = { + card_logo?: string + carrier_text?: { + footer_body?: string | "" + footer_title?: string | "" + header_body?: string | "" + header_title?: string | "" + } + expand?: string[] + lookup_key?: string + metadata?: { + [key: string]: string | undefined + } + name?: string + physical_bundle: string + preferences?: { + is_default: boolean + } + transfer_lookup_key?: boolean +} + +export type t_PostIssuingPersonalizationDesignsPersonalizationDesignBodySchema = + { + card_logo?: string | "" + carrier_text?: + | { + footer_body?: string | "" + footer_title?: string | "" + header_body?: string | "" + header_title?: string | "" + } + | "" + expand?: string[] + lookup_key?: string | "" + metadata?: { + [key: string]: string | undefined + } + name?: string | "" + physical_bundle?: string + preferences?: { + is_default: boolean + } + transfer_lookup_key?: boolean + } + +export type t_PostIssuingPersonalizationDesignsPersonalizationDesignParamSchema = + { + personalization_design: string + } + export type t_PostIssuingSettlementsSettlementBodySchema = { expand?: string[] metadata?: { @@ -22835,6 +25003,15 @@ export type t_PostIssuingSettlementsSettlementParamSchema = { settlement: string } +export type t_PostIssuingTokensTokenBodySchema = { + expand?: string[] + status: "active" | "deleted" | "suspended" +} + +export type t_PostIssuingTokensTokenParamSchema = { + token: string +} + export type t_PostIssuingTransactionsTransactionBodySchema = { expand?: string[] metadata?: @@ -22859,7 +25036,7 @@ export type t_PostLinkAccountSessionsBodySchema = { countries: string[] } permissions: ("balances" | "ownership" | "payment_method" | "transactions")[] - prefetch?: ("balances" | "ownership")[] + prefetch?: ("balances" | "ownership" | "transactions")[] return_url?: string } @@ -22873,7 +25050,7 @@ export type t_PostLinkedAccountsAccountDisconnectParamSchema = { export type t_PostLinkedAccountsAccountRefreshBodySchema = { expand?: string[] - features: ("balance" | "ownership")[] + features: ("balance" | "ownership" | "transactions")[] } export type t_PostLinkedAccountsAccountRefreshParamSchema = { @@ -22890,6 +25067,7 @@ export type t_PostPaymentIntentsBodySchema = { capture_method?: "automatic" | "automatic_async" | "manual" confirm?: boolean confirmation_method?: "automatic" | "manual" + confirmation_token?: string currency: string customer?: string description?: string @@ -23023,6 +25201,7 @@ export type t_PostPaymentIntentsBodySchema = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23044,6 +25223,7 @@ export type t_PostPaymentIntentsBodySchema = { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -23071,6 +25251,7 @@ export type t_PostPaymentIntentsBodySchema = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -23080,12 +25261,14 @@ export type t_PostPaymentIntentsBodySchema = { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -23106,14 +25289,17 @@ export type t_PostPaymentIntentsBodySchema = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -23178,6 +25364,7 @@ export type t_PostPaymentIntentsBodySchema = { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -23223,10 +25410,31 @@ export type t_PostPaymentIntentsBodySchema = { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -23359,6 +25567,12 @@ export type t_PostPaymentIntentsBodySchema = { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -23418,6 +25632,11 @@ export type t_PostPaymentIntentsBodySchema = { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -23438,6 +25657,12 @@ export type t_PostPaymentIntentsBodySchema = { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -23447,9 +25672,12 @@ export type t_PostPaymentIntentsBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -23624,6 +25852,7 @@ export type t_PostPaymentIntentsIntentBodySchema = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -23645,6 +25874,7 @@ export type t_PostPaymentIntentsIntentBodySchema = { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -23672,6 +25902,7 @@ export type t_PostPaymentIntentsIntentBodySchema = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -23681,12 +25912,14 @@ export type t_PostPaymentIntentsIntentBodySchema = { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -23707,14 +25940,17 @@ export type t_PostPaymentIntentsIntentBodySchema = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -23779,6 +26015,7 @@ export type t_PostPaymentIntentsIntentBodySchema = { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -23824,10 +26061,31 @@ export type t_PostPaymentIntentsIntentBodySchema = { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -23960,6 +26218,12 @@ export type t_PostPaymentIntentsIntentBodySchema = { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -24019,6 +26283,11 @@ export type t_PostPaymentIntentsIntentBodySchema = { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -24039,6 +26308,12 @@ export type t_PostPaymentIntentsIntentBodySchema = { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -24048,9 +26323,12 @@ export type t_PostPaymentIntentsIntentBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -24130,6 +26408,7 @@ export type t_PostPaymentIntentsIntentCaptureBodySchema = { amount_to_capture?: number application_fee_amount?: number expand?: string[] + final_capture?: boolean metadata?: | { [key: string]: string | undefined @@ -24149,6 +26428,7 @@ export type t_PostPaymentIntentsIntentCaptureParamSchema = { export type t_PostPaymentIntentsIntentConfirmBodySchema = { capture_method?: "automatic" | "automatic_async" | "manual" client_secret?: string + confirmation_token?: string error_on_requires_action?: boolean expand?: string[] mandate?: string @@ -24283,6 +26563,7 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -24304,6 +26585,7 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -24331,6 +26613,7 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -24340,12 +26623,14 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -24366,14 +26651,17 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -24438,6 +26726,7 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { blik?: | { code?: string + setup_future_usage?: "" | "none" } | "" boleto?: @@ -24483,10 +26772,31 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_extended_authorization?: "if_available" | "never" + request_incremental_authorization?: "if_available" | "never" + request_multicapture?: "if_available" | "never" + request_overcapture?: "if_available" | "never" + request_three_d_secure?: "any" | "automatic" | "challenge" + require_cvc_recollection?: boolean setup_future_usage?: "" | "none" | "off_session" | "on_session" statement_descriptor_suffix_kana?: string | "" statement_descriptor_suffix_kanji?: string | "" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + exemption_indicator?: "low_risk" | "none" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id: string + version: "1.0.2" | "2.1.0" | "2.2.0" + } } | "" card_present?: @@ -24619,6 +26929,12 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { setup_future_usage?: "" | "none" | "off_session" } | "" + mobilepay?: + | { + capture_method?: "" | "manual" + setup_future_usage?: "none" + } + | "" oxxo?: | { expires_after_days?: number @@ -24678,6 +26994,11 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { setup_future_usage?: "none" } | "" + revolut_pay?: + | { + setup_future_usage?: "" | "none" | "off_session" + } + | "" sepa_debit?: | { mandate_options?: EmptyObject @@ -24698,6 +27019,12 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { setup_future_usage?: "" | "none" | "off_session" } | "" + swish?: + | { + reference?: string | "" + setup_future_usage?: "none" + } + | "" us_bank_account?: | { financial_connections?: { @@ -24707,9 +27034,12 @@ export type t_PostPaymentIntentsIntentConfirmBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -24805,9 +27135,16 @@ export type t_PostPaymentLinksBodySchema = { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" consent_collection?: { + payment_method_reuse_agreement?: { + position: "auto" | "hidden" + } promotions?: "auto" | "none" terms_of_service?: "none" | "required" } @@ -24836,6 +27173,11 @@ export type t_PostPaymentLinksBodySchema = { type: "dropdown" | "numeric" | "text" }[] custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -24854,6 +27196,7 @@ export type t_PostPaymentLinksBodySchema = { } customer_creation?: "always" | "if_required" expand?: string[] + inactive_message?: string invoice_creation?: { enabled: boolean invoice_data?: { @@ -24866,6 +27209,10 @@ export type t_PostPaymentLinksBodySchema = { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined @@ -24893,7 +27240,14 @@ export type t_PostPaymentLinksBodySchema = { on_behalf_of?: string payment_intent_data?: { capture_method?: "automatic" | "automatic_async" | "manual" + description?: string + metadata?: { + [key: string]: string | undefined + } setup_future_usage?: "off_session" | "on_session" + statement_descriptor?: string + statement_descriptor_suffix?: string + transfer_group?: string } payment_method_collection?: "always" | "if_required" payment_method_types?: ( @@ -24923,12 +27277,18 @@ export type t_PostPaymentLinksBodySchema = { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] phone_number_collection?: { enabled: boolean } + restrictions?: { + completed_sessions: { + limit: number + } + } shipping_address_collection?: { allowed_countries: ( | "AC" @@ -25176,7 +27536,21 @@ export type t_PostPaymentLinksBodySchema = { submit_type?: "auto" | "book" | "donate" | "pay" subscription_data?: { description?: string + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number + trial_settings?: { + end_behavior: { + missing_payment_method: "cancel" | "create_invoice" | "pause" + } + } } tax_id_collection?: { enabled: boolean @@ -25201,6 +27575,10 @@ export type t_PostPaymentLinksPaymentLinkBodySchema = { allow_promotion_codes?: boolean automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_address_collection?: "auto" | "required" custom_fields?: @@ -25229,6 +27607,11 @@ export type t_PostPaymentLinksPaymentLinkBodySchema = { }[] | "" custom_text?: { + after_submit?: + | { + message: string + } + | "" shipping_address?: | { message: string @@ -25247,6 +27630,7 @@ export type t_PostPaymentLinksPaymentLinkBodySchema = { } customer_creation?: "always" | "if_required" expand?: string[] + inactive_message?: string | "" invoice_creation?: { enabled: boolean invoice_data?: { @@ -25259,6 +27643,10 @@ export type t_PostPaymentLinksPaymentLinkBodySchema = { | "" description?: string footer?: string + issuer?: { + account?: string + type: "account" | "self" + } metadata?: | { [key: string]: string | undefined @@ -25283,6 +27671,17 @@ export type t_PostPaymentLinksPaymentLinkBodySchema = { metadata?: { [key: string]: string | undefined } + payment_intent_data?: { + description?: string | "" + metadata?: + | { + [key: string]: string | undefined + } + | "" + statement_descriptor?: string | "" + statement_descriptor_suffix?: string | "" + transfer_group?: string | "" + } payment_method_collection?: "always" | "if_required" payment_method_types?: | ( @@ -25312,10 +27711,18 @@ export type t_PostPaymentLinksPaymentLinkBodySchema = { | "promptpay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" )[] | "" + restrictions?: + | { + completed_sessions: { + limit: number + } + } + | "" shipping_address_collection?: | { allowed_countries: ( @@ -25559,6 +27966,26 @@ export type t_PostPaymentLinksPaymentLinkBodySchema = { )[] } | "" + subscription_data?: { + invoice_settings?: { + issuer?: { + account?: string + type: "account" | "self" + } + } + metadata?: + | { + [key: string]: string | undefined + } + | "" + trial_settings?: + | { + end_behavior: { + missing_payment_method: "cancel" | "create_invoice" | "pause" + } + } + | "" + } } export type t_PostPaymentLinksPaymentLinkParamSchema = { @@ -25636,6 +28063,11 @@ export type t_PostPaymentMethodConfigurationsBodySchema = { preference?: "none" | "off" | "on" } } + customer_balance?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } eps?: { display_preference?: { preference?: "none" | "off" | "on" @@ -25714,6 +28146,11 @@ export type t_PostPaymentMethodConfigurationsBodySchema = { preference?: "none" | "off" | "on" } } + revolut_pay?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } sepa_debit?: { display_preference?: { preference?: "none" | "off" | "on" @@ -25734,6 +28171,11 @@ export type t_PostPaymentMethodConfigurationsBodySchema = { preference?: "none" | "off" | "on" } } + zip?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } } export type t_PostPaymentMethodConfigurationsConfigurationBodySchema = { @@ -25808,6 +28250,11 @@ export type t_PostPaymentMethodConfigurationsConfigurationBodySchema = { preference?: "none" | "off" | "on" } } + customer_balance?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } eps?: { display_preference?: { preference?: "none" | "off" | "on" @@ -25885,6 +28332,11 @@ export type t_PostPaymentMethodConfigurationsConfigurationBodySchema = { preference?: "none" | "off" | "on" } } + revolut_pay?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } sepa_debit?: { display_preference?: { preference?: "none" | "off" | "on" @@ -25905,6 +28357,11 @@ export type t_PostPaymentMethodConfigurationsConfigurationBodySchema = { preference?: "none" | "off" | "on" } } + zip?: { + display_preference?: { + preference?: "none" | "off" | "on" + } + } } export type t_PostPaymentMethodConfigurationsConfigurationParamSchema = { @@ -25976,6 +28433,9 @@ export type t_PostPaymentMethodsBodySchema = { cvc?: string exp_month: number exp_year: number + networks?: { + preferred?: "cartes_bancaires" | "mastercard" | "visa" + } number: string } | { @@ -26053,6 +28513,7 @@ export type t_PostPaymentMethodsBodySchema = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -26074,6 +28535,7 @@ export type t_PostPaymentMethodsBodySchema = { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -26101,6 +28563,7 @@ export type t_PostPaymentMethodsBodySchema = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } payment_method?: string @@ -26111,12 +28574,14 @@ export type t_PostPaymentMethodsBodySchema = { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type?: | "acss_debit" | "affirm" @@ -26138,14 +28603,17 @@ export type t_PostPaymentMethodsBodySchema = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -26179,6 +28647,9 @@ export type t_PostPaymentMethodsPaymentMethodBodySchema = { card?: { exp_month?: number exp_year?: number + networks?: { + preferred?: "" | "cartes_bancaires" | "mastercard" | "visa" + } } expand?: string[] link?: EmptyObject @@ -26189,6 +28660,7 @@ export type t_PostPaymentMethodsPaymentMethodBodySchema = { | "" us_bank_account?: { account_holder_type?: "company" | "individual" + account_type?: "checking" | "savings" } } @@ -26275,6 +28747,7 @@ export type t_PostPlansBodySchema = { [key: string]: string | undefined } | "" + meter?: string nickname?: string product?: | { @@ -26376,6 +28849,7 @@ export type t_PostPricesBodySchema = { aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum" interval: "day" | "month" | "week" | "year" interval_count?: number + meter?: string usage_type?: "licensed" | "metered" } tax_behavior?: "exclusive" | "inclusive" | "unspecified" @@ -26585,6 +29059,10 @@ export type t_PostQuotesBodySchema = { application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" customer?: string @@ -26594,6 +29072,7 @@ export type t_PostQuotesBodySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -26606,8 +29085,19 @@ export type t_PostQuotesBodySchema = { header?: string | "" invoice_settings?: { days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } line_items?: { + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" price?: string price_data?: { currency: string @@ -26630,6 +29120,9 @@ export type t_PostQuotesBodySchema = { subscription_data?: { description?: string effective_date?: "current_period_end" | number | "" + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number | "" } test_clock?: string @@ -26647,6 +29140,10 @@ export type t_PostQuotesQuoteBodySchema = { application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } collection_method?: "charge_automatically" | "send_invoice" customer?: string @@ -26656,6 +29153,7 @@ export type t_PostQuotesQuoteBodySchema = { | { coupon?: string discount?: string + promotion_code?: string }[] | "" expand?: string[] @@ -26664,8 +29162,19 @@ export type t_PostQuotesQuoteBodySchema = { header?: string | "" invoice_settings?: { days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } line_items?: { + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string price?: string price_data?: { @@ -26689,6 +29198,9 @@ export type t_PostQuotesQuoteBodySchema = { subscription_data?: { description?: string | "" effective_date?: "current_period_end" | number | "" + metadata?: { + [key: string]: string | undefined + } trial_period_days?: number | "" } transfer_data?: @@ -26823,6 +29335,8 @@ export type t_PostReportingReportRunsBodySchema = { | "anticipation_repayment" | "charge" | "charge_failure" + | "climate_order_purchase" + | "climate_order_refund" | "connect_collection_transfer" | "connect_reserved_funds" | "contribution" @@ -26838,7 +29352,6 @@ export type t_PostReportingReportRunsBodySchema = { | "issuing_dispute" | "issuing_transaction" | "network_cost" - | "obligation" | "other_adjustment" | "partial_capture_reversal" | "payout" @@ -26853,6 +29366,7 @@ export type t_PostReportingReportRunsBodySchema = { | "topup_reversal" | "transfer" | "transfer_reversal" + | "unreconciled_customer_funds" timezone?: | "Africa/Abidjan" | "Africa/Accra" @@ -27471,6 +29985,7 @@ export type t_PostSetupIntentsBodySchema = { enabled: boolean } confirm?: boolean + confirmation_token?: string customer?: string description?: string expand?: string[] @@ -27601,6 +30116,7 @@ export type t_PostSetupIntentsBodySchema = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -27622,6 +30138,7 @@ export type t_PostSetupIntentsBodySchema = { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -27649,6 +30166,7 @@ export type t_PostSetupIntentsBodySchema = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -27658,12 +30176,14 @@ export type t_PostSetupIntentsBodySchema = { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -27684,14 +30204,17 @@ export type t_PostSetupIntentsBodySchema = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -27742,8 +30265,24 @@ export type t_PostSetupIntentsBodySchema = { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -27759,9 +30298,12 @@ export type t_PostSetupIntentsBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -27898,6 +30440,7 @@ export type t_PostSetupIntentsIntentBodySchema = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -27919,6 +30462,7 @@ export type t_PostSetupIntentsIntentBodySchema = { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -27946,6 +30490,7 @@ export type t_PostSetupIntentsIntentBodySchema = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -27955,12 +30500,14 @@ export type t_PostSetupIntentsIntentBodySchema = { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -27981,14 +30528,17 @@ export type t_PostSetupIntentsIntentBodySchema = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -28039,8 +30589,24 @@ export type t_PostSetupIntentsIntentBodySchema = { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -28056,9 +30622,12 @@ export type t_PostSetupIntentsIntentBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -28083,6 +30652,7 @@ export type t_PostSetupIntentsIntentCancelParamSchema = { export type t_PostSetupIntentsIntentConfirmBodySchema = { client_secret?: string + confirmation_token?: string expand?: string[] mandate_data?: | { @@ -28214,6 +30784,7 @@ export type t_PostSetupIntentsIntentConfirmBodySchema = { | "knab" | "moneyou" | "n26" + | "nn" | "rabobank" | "regiobank" | "revolut" @@ -28235,6 +30806,7 @@ export type t_PostSetupIntentsIntentConfirmBodySchema = { metadata?: { [key: string]: string | undefined } + mobilepay?: EmptyObject oxxo?: EmptyObject p24?: { bank?: @@ -28262,6 +30834,7 @@ export type t_PostSetupIntentsIntentConfirmBodySchema = { | "santander_przelew24" | "tmobile_usbugi_bankowe" | "toyota_bank" + | "velobank" | "volkswagen_bank" } paynow?: EmptyObject @@ -28271,12 +30844,14 @@ export type t_PostSetupIntentsIntentConfirmBodySchema = { radar_options?: { session?: string } + revolut_pay?: EmptyObject sepa_debit?: { iban: string } sofort?: { country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" } + swish?: EmptyObject type: | "acss_debit" | "affirm" @@ -28297,14 +30872,17 @@ export type t_PostSetupIntentsIntentConfirmBodySchema = { | "klarna" | "konbini" | "link" + | "mobilepay" | "oxxo" | "p24" | "paynow" | "paypal" | "pix" | "promptpay" + | "revolut_pay" | "sepa_debit" | "sofort" + | "swish" | "us_bank_account" | "wechat_pay" | "zip" @@ -28355,8 +30933,24 @@ export type t_PostSetupIntentsIntentConfirmBodySchema = { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" + three_d_secure?: { + ares_trans_status?: "A" | "C" | "I" | "N" | "R" | "U" | "Y" + cryptogram?: string + electronic_commerce_indicator?: "01" | "02" | "05" | "06" | "07" + network_options?: { + cartes_bancaires?: { + cb_avalgo: "0" | "1" | "2" | "3" | "4" | "A" + cb_exemption?: string + cb_score?: number + } + } + requestor_challenge_indicator?: string + transaction_id?: string + version?: "1.0.2" | "2.1.0" | "2.2.0" + } } + card_present?: EmptyObject link?: EmptyObject paypal?: { billing_agreement_id?: string @@ -28372,9 +30966,12 @@ export type t_PostSetupIntentsIntentConfirmBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] return_url?: string } + mandate_options?: { + collection_method?: "" | "paper" + } networks?: { requested?: ("ach" | "us_domestic_wire")[] } @@ -28635,6 +31232,13 @@ export type t_PostSubscriptionItemsBodySchema = { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] metadata?: { [key: string]: string | undefined @@ -28669,6 +31273,13 @@ export type t_PostSubscriptionItemsItemBodySchema = { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] metadata?: | { @@ -28720,6 +31331,10 @@ export type t_PostSubscriptionSchedulesBodySchema = { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -28732,7 +31347,12 @@ export type t_PostSubscriptionSchedulesBodySchema = { default_payment_method?: string description?: string | "" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } on_behalf_of?: string | "" transfer_data?: @@ -28752,6 +31372,11 @@ export type t_PostSubscriptionSchedulesBodySchema = { | "" phases?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -28766,6 +31391,10 @@ export type t_PostSubscriptionSchedulesBodySchema = { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -28780,9 +31409,21 @@ export type t_PostSubscriptionSchedulesBodySchema = { default_payment_method?: string default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" end_date?: number invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } items: { billing_thresholds?: @@ -28790,6 +31431,13 @@ export type t_PostSubscriptionSchedulesBodySchema = { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -28829,6 +31477,10 @@ export type t_PostSubscriptionSchedulesScheduleBodySchema = { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -28841,7 +31493,12 @@ export type t_PostSubscriptionSchedulesScheduleBodySchema = { default_payment_method?: string description?: string | "" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } on_behalf_of?: string | "" transfer_data?: @@ -28860,6 +31517,11 @@ export type t_PostSubscriptionSchedulesScheduleBodySchema = { | "" phases?: { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -28874,6 +31536,10 @@ export type t_PostSubscriptionSchedulesScheduleBodySchema = { application_fee_percent?: number automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "automatic" | "phase_start" billing_thresholds?: @@ -28887,9 +31553,21 @@ export type t_PostSubscriptionSchedulesScheduleBodySchema = { default_payment_method?: string default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" end_date?: number | "now" invoice_settings?: { + account_tax_ids?: string[] | "" days_until_due?: number + issuer?: { + account?: string + type: "account" | "self" + } } items: { billing_thresholds?: @@ -28897,6 +31575,13 @@ export type t_PostSubscriptionSchedulesScheduleBodySchema = { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -28957,6 +31642,11 @@ export type t_PostSubscriptionSchedulesScheduleReleaseParamSchema = { export type t_PostSubscriptionsBodySchema = { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -28968,12 +31658,23 @@ export type t_PostSubscriptionsBodySchema = { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } backdate_start_date?: number billing_cycle_anchor?: number + billing_cycle_anchor_config?: { + day_of_month: number + hour?: number + minute?: number + month?: number + second?: number + } billing_thresholds?: | { amount_gte?: number @@ -28991,13 +31692,34 @@ export type t_PostSubscriptionsBodySchema = { default_source?: string default_tax_rates?: string[] | "" description?: string + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { usage_gte: number } | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" metadata?: { [key: string]: string | undefined } @@ -29062,7 +31784,7 @@ export type t_PostSubscriptionsBodySchema = { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -29077,6 +31799,7 @@ export type t_PostSubscriptionsBodySchema = { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -29086,7 +31809,7 @@ export type t_PostSubscriptionsBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -29104,12 +31827,14 @@ export type t_PostSubscriptionsBodySchema = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -29145,6 +31870,11 @@ export type t_PostSubscriptionsBodySchema = { export type t_PostSubscriptionsSubscriptionExposedIdBodySchema = { add_invoice_items?: { + discounts?: { + coupon?: string + discount?: string + promotion_code?: string + }[] price?: string price_data?: { currency: string @@ -29156,9 +31886,13 @@ export type t_PostSubscriptionsSubscriptionExposedIdBodySchema = { quantity?: number tax_rates?: string[] | "" }[] - application_fee_percent?: number + application_fee_percent?: number | "" automatic_tax?: { enabled: boolean + liability?: { + account?: string + type: "account" | "self" + } } billing_cycle_anchor?: "now" | "unchanged" billing_thresholds?: @@ -29189,7 +31923,21 @@ export type t_PostSubscriptionsSubscriptionExposedIdBodySchema = { default_source?: string | "" default_tax_rates?: string[] | "" description?: string | "" + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" expand?: string[] + invoice_settings?: { + account_tax_ids?: string[] | "" + issuer?: { + account?: string + type: "account" | "self" + } + } items?: { billing_thresholds?: | { @@ -29198,6 +31946,13 @@ export type t_PostSubscriptionsSubscriptionExposedIdBodySchema = { | "" clear_usage?: boolean deleted?: boolean + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | "" id?: string metadata?: | { @@ -29271,7 +32026,7 @@ export type t_PostSubscriptionsSubscriptionExposedIdBodySchema = { | "unionpay" | "unknown" | "visa" - request_three_d_secure?: "any" | "automatic" + request_three_d_secure?: "any" | "automatic" | "challenge" } | "" customer_balance?: @@ -29286,6 +32041,7 @@ export type t_PostSubscriptionsSubscriptionExposedIdBodySchema = { } | "" konbini?: EmptyObject | "" + sepa_debit?: EmptyObject | "" us_bank_account?: | { financial_connections?: { @@ -29295,7 +32051,7 @@ export type t_PostSubscriptionsSubscriptionExposedIdBodySchema = { | "payment_method" | "transactions" )[] - prefetch?: "balances"[] + prefetch?: ("balances" | "transactions")[] } verification_method?: "automatic" | "instant" | "microdeposits" } @@ -29313,12 +32069,14 @@ export type t_PostSubscriptionsSubscriptionExposedIdBodySchema = { | "card" | "cashapp" | "customer_balance" + | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "konbini" | "link" + | "p24" | "paynow" | "paypal" | "promptpay" @@ -29430,6 +32188,7 @@ export type t_PostTaxCalculationsBodySchema = { | "my_itn" | "my_sst" | "no_vat" + | "no_voec" | "nz_gst" | "pe_ruc" | "ph_tin" @@ -29473,6 +32232,84 @@ export type t_PostTaxCalculationsBodySchema = { tax_date?: number } +export type t_PostTaxIdsBodySchema = { + expand?: string[] + owner?: { + account?: string + customer?: string + type: "account" | "application" | "customer" | "self" + } + type: + | "ad_nrt" + | "ae_trn" + | "ar_cuit" + | "au_abn" + | "au_arn" + | "bg_uic" + | "bo_tin" + | "br_cnpj" + | "br_cpf" + | "ca_bn" + | "ca_gst_hst" + | "ca_pst_bc" + | "ca_pst_mb" + | "ca_pst_sk" + | "ca_qst" + | "ch_vat" + | "cl_tin" + | "cn_tin" + | "co_nit" + | "cr_tin" + | "do_rcn" + | "ec_ruc" + | "eg_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" + | "jp_trn" + | "ke_pin" + | "kr_brn" + | "li_uid" + | "mx_rfc" + | "my_frp" + | "my_itn" + | "my_sst" + | "no_vat" + | "no_voec" + | "nz_gst" + | "pe_ruc" + | "ph_tin" + | "ro_tin" + | "rs_pib" + | "ru_inn" + | "ru_kpp" + | "sa_vat" + | "sg_gst" + | "sg_uen" + | "si_tin" + | "sv_nit" + | "th_vat" + | "tr_tin" + | "tw_vat" + | "ua_vat" + | "us_ein" + | "uy_ruc" + | "ve_rif" + | "vn_tin" + | "za_vat" + value: string +} + export type t_PostTaxRatesBodySchema = { active?: boolean country?: string @@ -29498,7 +32335,6 @@ export type t_PostTaxRatesBodySchema = { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" } @@ -29527,7 +32363,6 @@ export type t_PostTaxRatesTaxRateBodySchema = { | "qst" | "rst" | "sales_tax" - | "service_tax" | "vat" } @@ -29535,6 +32370,267 @@ export type t_PostTaxRatesTaxRateParamSchema = { tax_rate: string } +export type t_PostTaxRegistrationsBodySchema = { + active_from: "now" | number + country: string + country_options: { + ae?: { + type: "standard" + } + at?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + au?: { + type: "standard" + } + be?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + bg?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ca?: { + province_standard?: { + province: string + } + type: "province_standard" | "simplified" | "standard" + } + ch?: { + type: "standard" + } + cl?: { + type: "simplified" + } + co?: { + type: "simplified" + } + cy?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + cz?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + de?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + dk?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ee?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + es?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + fi?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + fr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + gb?: { + type: "standard" + } + gr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + hr?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + hu?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + id?: { + type: "simplified" + } + ie?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + is?: { + type: "standard" + } + it?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + jp?: { + type: "standard" + } + kr?: { + type: "simplified" + } + lt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + lu?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + lv?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + mt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + mx?: { + type: "simplified" + } + my?: { + type: "simplified" + } + nl?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + no?: { + type: "standard" + } + nz?: { + type: "standard" + } + pl?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + pt?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + ro?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sa?: { + type: "simplified" + } + se?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sg?: { + type: "standard" + } + si?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + sk?: { + standard?: { + place_of_supply_scheme: "small_seller" | "standard" + } + type: "ioss" | "oss_non_union" | "oss_union" | "standard" + } + th?: { + type: "simplified" + } + tr?: { + type: "simplified" + } + us?: { + local_amusement_tax?: { + jurisdiction: string + } + local_lease_tax?: { + jurisdiction: string + } + state: string + type: + | "local_amusement_tax" + | "local_lease_tax" + | "state_communications_tax" + | "state_sales_tax" + } + vn?: { + type: "simplified" + } + za?: { + type: "standard" + } + } + expand?: string[] + expires_at?: number +} + +export type t_PostTaxRegistrationsIdBodySchema = { + active_from?: "now" | number + expand?: string[] + expires_at?: "now" | number | "" +} + +export type t_PostTaxRegistrationsIdParamSchema = { + id: string +} + export type t_PostTaxSettingsBodySchema = { defaults?: { tax_behavior?: "exclusive" | "inclusive" | "inferred_by_currency" @@ -29592,6 +32688,12 @@ export type t_PostTerminalConfigurationsBodySchema = { splashscreen?: string | "" } expand?: string[] + name?: string + offline?: + | { + enabled: boolean + } + | "" tipping?: | { aud?: { @@ -29678,6 +32780,12 @@ export type t_PostTerminalConfigurationsConfigurationBodySchema = { } | "" expand?: string[] + name?: string + offline?: + | { + enabled: boolean + } + | "" tipping?: | { aud?: { @@ -29848,6 +32956,7 @@ export type t_PostTerminalReadersReaderProcessPaymentIntentBodySchema = { expand?: string[] payment_intent: string process_config?: { + enable_customer_cancellation?: boolean skip_tipping?: boolean tipping?: { amount_eligible?: number @@ -29862,7 +32971,9 @@ export type t_PostTerminalReadersReaderProcessPaymentIntentParamSchema = { export type t_PostTerminalReadersReaderProcessSetupIntentBodySchema = { customer_consent_collected: boolean expand?: string[] - process_config?: EmptyObject + process_config?: { + enable_customer_cancellation?: boolean + } setup_intent: string } @@ -29879,6 +32990,9 @@ export type t_PostTerminalReadersReaderRefundPaymentBodySchema = { } payment_intent?: string refund_application_fee?: boolean + refund_payment_config?: { + enable_customer_cancellation?: boolean + } reverse_transfer?: boolean } @@ -29905,6 +33019,244 @@ export type t_PostTerminalReadersReaderSetReaderDisplayParamSchema = { reader: string } +export type t_PostTestHelpersConfirmationTokensBodySchema = { + expand?: string[] + payment_method?: string + payment_method_data?: { + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + affirm?: EmptyObject + afterpay_clearpay?: EmptyObject + alipay?: EmptyObject + au_becs_debit?: { + account_number: string + bsb_number: string + } + bacs_debit?: { + account_number?: string + sort_code?: string + } + bancontact?: EmptyObject + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | "" + email?: string | "" + name?: string | "" + phone?: string | "" + } + blik?: EmptyObject + boleto?: { + tax_id: string + } + cashapp?: EmptyObject + customer_balance?: EmptyObject + eps?: { + 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" + } + fpx?: { + bank: + | "affin_bank" + | "agrobank" + | "alliance_bank" + | "ambank" + | "bank_islam" + | "bank_muamalat" + | "bank_of_china" + | "bank_rakyat" + | "bsn" + | "cimb" + | "deutsche_bank" + | "hong_leong_bank" + | "hsbc" + | "kfh" + | "maybank2e" + | "maybank2u" + | "ocbc" + | "pb_enterprise" + | "public_bank" + | "rhb" + | "standard_chartered" + | "uob" + } + giropay?: EmptyObject + grabpay?: EmptyObject + ideal?: { + bank?: + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "n26" + | "nn" + | "rabobank" + | "regiobank" + | "revolut" + | "sns_bank" + | "triodos_bank" + | "van_lanschot" + | "yoursafe" + } + interac_present?: EmptyObject + klarna?: { + dob?: { + day: number + month: number + year: number + } + } + konbini?: EmptyObject + link?: EmptyObject + metadata?: { + [key: string]: string | undefined + } + mobilepay?: EmptyObject + oxxo?: EmptyObject + p24?: { + 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" + | "velobank" + | "volkswagen_bank" + } + paynow?: EmptyObject + paypal?: EmptyObject + pix?: EmptyObject + promptpay?: EmptyObject + radar_options?: { + session?: string + } + revolut_pay?: EmptyObject + sepa_debit?: { + iban: string + } + sofort?: { + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL" + } + swish?: EmptyObject + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "cashapp" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "link" + | "mobilepay" + | "oxxo" + | "p24" + | "paynow" + | "paypal" + | "pix" + | "promptpay" + | "revolut_pay" + | "sepa_debit" + | "sofort" + | "swish" + | "us_bank_account" + | "wechat_pay" + | "zip" + us_bank_account?: { + account_holder_type?: "company" | "individual" + account_number?: string + account_type?: "checking" | "savings" + financial_connections_account?: string + routing_number?: string + } + wechat_pay?: EmptyObject + zip?: EmptyObject + } + return_url?: string + setup_future_usage?: "off_session" | "on_session" + shipping?: { + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string | "" + } +} + export type t_PostTestHelpersCustomersCustomerFundCashBalanceBodySchema = { amount: number currency: string @@ -30235,6 +33587,7 @@ export type t_PostTestHelpersIssuingAuthorizationsBodySchema = { postal_code?: string state?: string terminal_id?: string + url?: string } network_data?: { acquiring_institution_id?: string @@ -30242,8 +33595,15 @@ export type t_PostTestHelpersIssuingAuthorizationsBodySchema = { verification_data?: { address_line1_check?: "match" | "mismatch" | "not_provided" address_postal_code_check?: "match" | "mismatch" | "not_provided" + authentication_exemption?: { + claimed_by: "acquirer" | "issuer" + type: "low_value_transaction" | "transaction_risk_analysis" | "unknown" + } cvc_check?: "match" | "mismatch" | "not_provided" expiry_check?: "match" | "mismatch" | "not_provided" + three_d_secure?: { + result: "attempt_acknowledged" | "authenticated" | "failed" | "required" + } } wallet?: "apple_pay" | "google_pay" | "samsung_pay" } @@ -30363,6 +33723,57 @@ export type t_PostTestHelpersIssuingCardsCardShippingShipParamSchema = { card: string } +export type t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateBodySchema = + { + expand?: string[] + } + +export type t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignActivateParamSchema = + { + personalization_design: string + } + +export type t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateBodySchema = + { + expand?: string[] + } + +export type t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignDeactivateParamSchema = + { + personalization_design: string + } + +export type t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectBodySchema = + { + expand?: string[] + rejection_reasons: { + card_logo?: ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_binary_image" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + carrier_text?: ( + | "geographic_location" + | "inappropriate" + | "network_name" + | "non_fiat_currency" + | "other" + | "other_entity" + | "promotional_material" + )[] + } + } + +export type t_PostTestHelpersIssuingPersonalizationDesignsPersonalizationDesignRejectParamSchema = + { + personalization_design: string + } + export type t_PostTestHelpersIssuingTransactionsCreateForceCaptureBodySchema = { amount: number card: string @@ -30671,6 +34082,7 @@ export type t_PostTestHelpersIssuingTransactionsCreateForceCaptureBodySchema = { postal_code?: string state?: string terminal_id?: string + url?: string } purchase_details?: { flight?: { @@ -31021,6 +34433,7 @@ export type t_PostTestHelpersIssuingTransactionsCreateUnlinkedRefundBodySchema = postal_code?: string state?: string terminal_id?: string + url?: string } purchase_details?: { flight?: { @@ -31333,6 +34746,7 @@ export type t_PostTokensBodySchema = { | "public_company" | "public_corporation" | "public_partnership" + | "registered_charity" | "single_member_llc" | "sole_establishment" | "sole_proprietorship" @@ -31411,6 +34825,13 @@ export type t_PostTokensBodySchema = { postal_code?: string state?: string } + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | "" + title?: string + } ssn_last_4?: string verification?: { additional_document?: { @@ -31432,6 +34853,7 @@ export type t_PostTokensBodySchema = { account_type?: "checking" | "futsu" | "savings" | "toza" country: string currency?: string + payment_method?: string routing_number?: string } card?: @@ -31447,6 +34869,9 @@ export type t_PostTokensBodySchema = { exp_month: string exp_year: string name?: string + networks?: { + preferred?: "cartes_bancaires" | "mastercard" | "visa" + } number: string } | string @@ -31456,6 +34881,13 @@ export type t_PostTokensBodySchema = { } expand?: string[] person?: { + additional_tos_acceptances?: { + account?: { + date?: number + ip?: string + user_agent?: string | "" + } + } address?: { city?: string country?: string @@ -31531,6 +34963,7 @@ export type t_PostTokensBodySchema = { relationship?: { director?: boolean executive?: boolean + legal_guardian?: boolean owner?: boolean percent_ownership?: number | "" representative?: boolean @@ -32022,6 +35455,8 @@ export type t_PostWebhookEndpointsBodySchema = { | "2022-08-01" | "2022-11-15" | "2023-08-16" + | "2023-10-16" + | "2024-04-10" connect?: boolean description?: string | "" enabled_events: ( @@ -32058,6 +35493,13 @@ export type t_PostWebhookEndpointsBodySchema = { | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" + | "climate.order.canceled" + | "climate.order.created" + | "climate.order.delayed" + | "climate.order.delivered" + | "climate.order.product_substituted" + | "climate.product.created" + | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" @@ -32092,6 +35534,8 @@ export type t_PostWebhookEndpointsBodySchema = { | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" + | "financial_connections.account.refreshed_ownership" + | "financial_connections.account.refreshed_transactions" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -32125,6 +35569,8 @@ export type t_PostWebhookEndpointsBodySchema = { | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" + | "issuing_token.created" + | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" @@ -32288,6 +35734,13 @@ export type t_PostWebhookEndpointsWebhookEndpointBodySchema = { | "checkout.session.async_payment_succeeded" | "checkout.session.completed" | "checkout.session.expired" + | "climate.order.canceled" + | "climate.order.created" + | "climate.order.delayed" + | "climate.order.delivered" + | "climate.order.product_substituted" + | "climate.product.created" + | "climate.product.pricing_updated" | "coupon.created" | "coupon.deleted" | "coupon.updated" @@ -32322,6 +35775,8 @@ export type t_PostWebhookEndpointsWebhookEndpointBodySchema = { | "financial_connections.account.disconnected" | "financial_connections.account.reactivated" | "financial_connections.account.refreshed_balance" + | "financial_connections.account.refreshed_ownership" + | "financial_connections.account.refreshed_transactions" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -32355,6 +35810,8 @@ export type t_PostWebhookEndpointsWebhookEndpointBodySchema = { | "issuing_dispute.funds_reinstated" | "issuing_dispute.submitted" | "issuing_dispute.updated" + | "issuing_token.created" + | "issuing_token.updated" | "issuing_transaction.created" | "issuing_transaction.updated" | "mandate.updated" diff --git a/integration-tests/typescript-koa/src/generated/stripe.yaml/schemas.ts b/integration-tests/typescript-koa/src/generated/stripe.yaml/schemas.ts index 6bffcf5c..e0db33df 100644 --- a/integration-tests/typescript-koa/src/generated/stripe.yaml/schemas.ts +++ b/integration-tests/typescript-koa/src/generated/stripe.yaml/schemas.ts @@ -5,9 +5,11 @@ import { t_account, t_account_branding_settings, + t_account_invoices_settings, t_account_settings, t_api_errors, t_application_fee, + t_automatic_tax, t_balance_transaction, t_bank_account, t_bank_connections_resource_accountholder, @@ -16,6 +18,9 @@ import { t_charge, t_charge_transfer_data, t_checkout_session, + t_confirmation_token, + t_confirmation_tokens_resource_payment_method_preview, + t_connect_account_reference, t_connect_collection_transfer, t_credit_note, t_credit_note_line_item, @@ -23,12 +28,15 @@ import { t_customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft, t_customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction, t_customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction, + t_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance, t_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction, t_customer_balance_transaction, t_customer_cash_balance_transaction, + t_customer_session, t_deleted_discount, t_discount, t_discounts_resource_discount_amount, + t_discounts_resource_stackable_discount, t_dispute, t_dispute_evidence, t_error, @@ -38,11 +46,16 @@ import { t_file_link, t_financial_connections_account, t_financial_connections_session, + t_inbound_transfers, + t_inbound_transfers_payment_method_details_us_bank_account, t_invoice, t_invoice_setting_customer_setting, + t_invoice_setting_quote_setting, + t_invoice_setting_subscription_schedule_phase_setting, + t_invoice_setting_subscription_schedule_setting, t_invoice_transfer_data, t_invoiceitem, - t_invoices_from_invoice, + t_invoices_resource_from_invoice, t_issuing_authorization, t_issuing_card, t_issuing_cardholder, @@ -58,6 +71,8 @@ import { t_issuing_dispute_not_received_evidence, t_issuing_dispute_other_evidence, t_issuing_dispute_service_not_as_described_evidence, + t_issuing_personalization_design, + t_issuing_token, t_issuing_transaction, t_item, t_legal_entity_company, @@ -68,10 +83,17 @@ import { t_line_item, t_line_items_discount_amount, t_mandate, + t_outbound_payments_payment_method_details, + t_outbound_payments_payment_method_details_us_bank_account, + t_outbound_transfers_payment_method_details, + t_outbound_transfers_payment_method_details_us_bank_account, t_payment_intent, t_payment_link, + t_payment_links_resource_automatic_tax, t_payment_links_resource_invoice_creation, t_payment_links_resource_invoice_settings, + t_payment_links_resource_subscription_data, + t_payment_links_resource_subscription_data_invoice_settings, t_payment_links_resource_transfer_data, t_payment_method, t_payment_method_card, @@ -80,7 +102,9 @@ import { t_payment_method_details_bancontact, t_payment_method_details_ideal, t_payment_method_details_sofort, + t_payment_method_details_us_bank_account, t_payment_method_sepa_debit, + t_payment_pages_checkout_session_automatic_tax, t_payment_pages_checkout_session_invoice_creation, t_payment_pages_checkout_session_invoice_settings, t_payment_pages_checkout_session_total_details, @@ -93,6 +117,7 @@ import { t_product, t_promotion_code, t_quote, + t_quotes_resource_automatic_tax, t_quotes_resource_computed, t_quotes_resource_from_quote, t_quotes_resource_recurring, @@ -105,6 +130,7 @@ import { t_reporting_report_run, t_review, t_scheduled_query_run, + t_schedules_phase_automatic_tax, t_sepa_debit_generated_from, t_setup_attempt, t_setup_attempt_payment_method_details, @@ -114,14 +140,17 @@ import { t_setup_attempt_payment_method_details_sofort, t_setup_intent, t_subscription, + t_subscription_automatic_tax, t_subscription_item, t_subscription_schedule, t_subscription_schedule_add_invoice_item, t_subscription_schedule_configuration_item, t_subscription_schedule_phase_configuration, t_subscription_schedules_resource_default_settings, + t_subscription_schedules_resource_default_settings_automatic_tax, t_subscription_transfer_data, t_subscriptions_resource_pending_update, + t_tax_i_ds_owner, t_tax_id, t_terminal_configuration, t_terminal_configuration_configuration_resource_device_type_specific_config, @@ -152,8 +181,15 @@ import { } from "./models" import { z } from "zod" +export const s_account_annual_revenue = z.object({ + amount: z.coerce.number().nullable().optional(), + currency: z.string().nullable().optional(), + fiscal_year_end: z.string().nullable().optional(), +}) + export const s_account_bacs_debit_payments_settings = z.object({ - display_name: z.string().optional(), + display_name: z.string().nullable().optional(), + service_user_number: z.string().nullable().optional(), }) export const s_account_capabilities = z.object({ @@ -162,6 +198,7 @@ export const s_account_capabilities = z.object({ afterpay_clearpay_payments: z .enum(["active", "inactive", "pending"]) .optional(), + amazon_pay_payments: z.enum(["active", "inactive", "pending"]).optional(), au_becs_debit_payments: z.enum(["active", "inactive", "pending"]).optional(), bacs_debit_payments: z.enum(["active", "inactive", "pending"]).optional(), bancontact_payments: z.enum(["active", "inactive", "pending"]).optional(), @@ -187,12 +224,15 @@ export const s_account_capabilities = z.object({ konbini_payments: z.enum(["active", "inactive", "pending"]).optional(), legacy_payments: z.enum(["active", "inactive", "pending"]).optional(), link_payments: z.enum(["active", "inactive", "pending"]).optional(), + mobilepay_payments: z.enum(["active", "inactive", "pending"]).optional(), oxxo_payments: z.enum(["active", "inactive", "pending"]).optional(), p24_payments: z.enum(["active", "inactive", "pending"]).optional(), paynow_payments: z.enum(["active", "inactive", "pending"]).optional(), promptpay_payments: z.enum(["active", "inactive", "pending"]).optional(), + revolut_pay_payments: z.enum(["active", "inactive", "pending"]).optional(), sepa_debit_payments: z.enum(["active", "inactive", "pending"]).optional(), sofort_payments: z.enum(["active", "inactive", "pending"]).optional(), + swish_payments: z.enum(["active", "inactive", "pending"]).optional(), tax_reporting_us_1099_k: z.enum(["active", "inactive", "pending"]).optional(), tax_reporting_us_1099_misc: z .enum(["active", "inactive", "pending"]) @@ -243,10 +283,43 @@ export const s_account_requirements_alternative = z.object({ export const s_account_requirements_error = z.object({ code: z.enum([ "invalid_address_city_state_postal_code", + "invalid_address_highway_contract_box", + "invalid_address_private_mailbox", + "invalid_business_profile_name", + "invalid_business_profile_name_denylisted", + "invalid_company_name_denylisted", + "invalid_dob_age_over_maximum", "invalid_dob_age_under_18", + "invalid_dob_age_under_minimum", + "invalid_product_description_length", + "invalid_product_description_url_match", "invalid_representative_country", + "invalid_statement_descriptor_business_mismatch", + "invalid_statement_descriptor_denylisted", + "invalid_statement_descriptor_length", + "invalid_statement_descriptor_prefix_denylisted", + "invalid_statement_descriptor_prefix_mismatch", "invalid_street_address", + "invalid_tax_id", + "invalid_tax_id_format", "invalid_tos_acceptance", + "invalid_url_denylisted", + "invalid_url_format", + "invalid_url_web_presence_detected", + "invalid_url_website_business_information_mismatch", + "invalid_url_website_empty", + "invalid_url_website_inaccessible", + "invalid_url_website_inaccessible_geoblocked", + "invalid_url_website_inaccessible_password_protected", + "invalid_url_website_incomplete", + "invalid_url_website_incomplete_cancellation_policy", + "invalid_url_website_incomplete_customer_service_details", + "invalid_url_website_incomplete_legal_restrictions", + "invalid_url_website_incomplete_refund_policy", + "invalid_url_website_incomplete_return_policy", + "invalid_url_website_incomplete_terms_and_conditions", + "invalid_url_website_incomplete_under_construction", + "invalid_url_website_other", "invalid_value_other", "verification_directors_mismatch", "verification_document_address_mismatch", @@ -288,6 +361,7 @@ export const s_account_requirements_error = z.object({ "verification_failed_keyed_match", "verification_failed_name_match", "verification_failed_other", + "verification_failed_representative_authority", "verification_failed_residential_address", "verification_failed_tax_id_match", "verification_failed_tax_id_not_issued", @@ -345,14 +419,6 @@ export const s_application = z.object({ object: z.enum(["application"]), }) -export const s_automatic_tax = z.object({ - enabled: z.coerce.boolean(), - status: z - .enum(["complete", "failed", "requires_location_inputs"]) - .nullable() - .optional(), -}) - export const s_balance_amount_by_source_type = z.object({ bank_account: z.coerce.number().optional(), card: z.coerce.number().optional(), @@ -367,6 +433,7 @@ export const s_bank_connections_resource_balance_api_resource_credit_balance = export const s_bank_connections_resource_balance_refresh = z.object({ last_attempted_at: z.coerce.number(), + next_refresh_available_at: z.coerce.number().nullable().optional(), status: z.enum(["failed", "pending", "succeeded"]), }) @@ -378,6 +445,58 @@ export const s_bank_connections_resource_ownership_refresh = z.object({ status: z.enum(["failed", "pending", "succeeded"]), }) +export const s_bank_connections_resource_transaction_refresh = z.object({ + id: z.string(), + last_attempted_at: z.coerce.number(), + next_refresh_available_at: z.coerce.number().nullable().optional(), + status: z.enum(["failed", "pending", "succeeded"]), +}) + +export const s_bank_connections_resource_transaction_resource_status_transitions = + z.object({ + posted_at: z.coerce.number().nullable().optional(), + void_at: z.coerce.number().nullable().optional(), + }) + +export const s_billing_meter_event = z.object({ + created: z.coerce.number(), + event_name: z.string(), + identifier: z.string(), + livemode: z.coerce.boolean(), + object: z.enum(["billing.meter_event"]), + payload: z.record(z.string()), + timestamp: z.coerce.number(), +}) + +export const s_billing_meter_event_summary = z.object({ + aggregated_value: z.coerce.number(), + end_time: z.coerce.number(), + id: z.string(), + livemode: z.coerce.boolean(), + meter: z.string(), + object: z.enum(["billing.meter_event_summary"]), + start_time: z.coerce.number(), +}) + +export const s_billing_meter_resource_aggregation_settings = z.object({ + formula: z.enum(["count", "sum"]), +}) + +export const s_billing_meter_resource_billing_meter_event_adjustment_cancel = + z.object({ identifier: z.string() }) + +export const s_billing_meter_resource_billing_meter_status_transitions = + z.object({ deactivated_at: z.coerce.number().nullable().optional() }) + +export const s_billing_meter_resource_billing_meter_value = z.object({ + event_payload_key: z.string(), +}) + +export const s_billing_meter_resource_customer_mapping_settings = z.object({ + event_payload_key: z.string(), + type: z.enum(["by_id"]), +}) + export const s_cancellation_details = z.object({ comment: z.string().nullable().optional(), feedback: z @@ -506,10 +625,19 @@ export const s_checkout_paynow_payment_method_options = z.object({ setup_future_usage: z.enum(["none"]).optional(), }) +export const s_checkout_paypal_payment_method_options = z.object({ + capture_method: z.enum(["manual"]).optional(), + preferred_locale: z.string().nullable().optional(), + reference: z.string().nullable().optional(), + setup_future_usage: z.enum(["none", "off_session"]).optional(), +}) + export const s_checkout_pix_payment_method_options = z.object({ expires_after_seconds: z.coerce.number().nullable().optional(), }) +export const s_checkout_revolut_pay_payment_method_options = z.object({}) + export const s_checkout_sepa_debit_payment_method_options = z.object({ setup_future_usage: z.enum(["none", "off_session", "on_session"]).optional(), }) @@ -518,8 +646,49 @@ export const s_checkout_sofort_payment_method_options = z.object({ setup_future_usage: z.enum(["none"]).optional(), }) -export const s_connect_embedded_base_config_claim = z.object({ - enabled: z.coerce.boolean(), +export const s_checkout_swish_payment_method_options = z.object({ + reference: z.string().nullable().optional(), +}) + +export const s_climate_removals_beneficiary = z.object({ + public_name: z.string(), +}) + +export const s_climate_removals_location = z.object({ + city: z.string().nullable().optional(), + country: z.string(), + latitude: z.coerce.number().nullable().optional(), + longitude: z.coerce.number().nullable().optional(), + region: z.string().nullable().optional(), +}) + +export const s_climate_removals_products_price = z.object({ + amount_fees: z.coerce.number(), + amount_subtotal: z.coerce.number(), + amount_total: z.coerce.number(), +}) + +export const s_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online = + z.object({ + ip_address: z.string().nullable().optional(), + user_agent: z.string().nullable().optional(), + }) + +export const s_connect_embedded_account_features = z.object({}) + +export const s_connect_embedded_base_features = z.object({}) + +export const s_connect_embedded_payments_features = z.object({ + capture_payments: z.coerce.boolean(), + destination_on_behalf_of_charge_management: z.coerce.boolean().optional(), + dispute_management: z.coerce.boolean(), + refund_management: z.coerce.boolean(), +}) + +export const s_connect_embedded_payouts_features = z.object({ + edit_payout_schedule: z.coerce.boolean(), + instant_payouts: z.coerce.boolean(), + standard_payouts: z.coerce.boolean(), }) export const s_country_spec_verification_field_details = z.object({ @@ -571,6 +740,12 @@ export const s_customer_balance_resource_cash_balance_transaction_resource_funde sender_name: z.string().nullable().optional(), }) +export const s_customer_session_resource_components_resource_buy_button = + z.object({ enabled: z.coerce.boolean() }) + +export const s_customer_session_resource_components_resource_pricing_table = + z.object({ enabled: z.coerce.boolean() }) + export const s_customer_tax_location = z.object({ country: z.string(), source: z.enum([ @@ -717,6 +892,8 @@ export const s_deleted_webhook_endpoint = z.object({ object: z.enum(["webhook_endpoint"]), }) +export const s_destination_details_unimplemented = z.object({}) + export const s_dispute_evidence_details = z.object({ due_by: z.coerce.number().nullable().optional(), has_evidence: z.coerce.boolean(), @@ -781,6 +958,22 @@ export const s_financial_reporting_finance_report_run_run_parameters = z.object( }, ) +export const s_forwarded_request_context = z.object({ + destination_duration: z.coerce.number(), + destination_ip_address: z.string(), +}) + +export const s_forwarded_request_header = z.object({ + name: z.string(), + value: z.string(), +}) + +export const s_funding_instructions_bank_transfer_aba_record = z.object({ + account_number: z.string(), + bank_name: z.string(), + routing_number: z.string(), +}) + export const s_funding_instructions_bank_transfer_iban_record = z.object({ account_holder_name: z.string(), bic: z.string(), @@ -800,6 +993,12 @@ export const s_funding_instructions_bank_transfer_spei_record = z.object({ clabe: z.string(), }) +export const s_funding_instructions_bank_transfer_swift_record = z.object({ + account_number: z.string(), + bank_name: z.string(), + swift_code: z.string(), +}) + export const s_funding_instructions_bank_transfer_zengin_record = z.object({ account_holder_name: z.string().nullable().optional(), account_number: z.string().nullable().optional(), @@ -852,6 +1051,14 @@ export const s_gelato_document_report_error = z.object({ reason: z.string().nullable().optional(), }) +export const s_gelato_email_report_error = z.object({ + code: z + .enum(["email_unverified_other", "email_verification_declined"]) + .nullable() + .optional(), + reason: z.string().nullable().optional(), +}) + export const s_gelato_id_number_report_error = z.object({ code: z .enum([ @@ -864,6 +1071,19 @@ export const s_gelato_id_number_report_error = z.object({ reason: z.string().nullable().optional(), }) +export const s_gelato_phone_report_error = z.object({ + code: z + .enum(["phone_unverified_other", "phone_verification_declined"]) + .nullable() + .optional(), + reason: z.string().nullable().optional(), +}) + +export const s_gelato_provided_details = z.object({ + email: z.string().optional(), + phone: z.string().optional(), +}) + export const s_gelato_report_document_options = z.object({ allowed_types: z .array(z.enum(["driving_license", "id_card", "passport"])) @@ -897,6 +1117,10 @@ export const s_gelato_session_document_options = z.object({ require_matching_selfie: z.coerce.boolean().optional(), }) +export const s_gelato_session_email_options = z.object({ + require_verification: z.coerce.boolean().optional(), +}) + export const s_gelato_session_id_number_options = z.object({}) export const s_gelato_session_last_error = z.object({ @@ -909,9 +1133,13 @@ export const s_gelato_session_last_error = z.object({ "document_expired", "document_type_not_supported", "document_unverified_other", + "email_unverified_other", + "email_verification_declined", "id_number_insufficient_document_data", "id_number_mismatch", "id_number_unverified_other", + "phone_unverified_other", + "phone_verification_declined", "selfie_document_missing_photo", "selfie_face_mismatch", "selfie_manipulated", @@ -923,19 +1151,17 @@ export const s_gelato_session_last_error = z.object({ reason: z.string().nullable().optional(), }) -export const s_inbound_transfers_payment_method_details_us_bank_account = - z.object({ - account_holder_type: z - .enum(["company", "individual"]) - .nullable() - .optional(), - account_type: z.enum(["checking", "savings"]).nullable().optional(), - bank_name: z.string().nullable().optional(), - fingerprint: z.string().nullable().optional(), - last4: z.string().nullable().optional(), - network: z.enum(["ach"]), - routing_number: z.string().nullable().optional(), - }) +export const s_gelato_session_phone_options = z.object({ + require_verification: z.coerce.boolean().optional(), +}) + +export const s_internal_card = z.object({ + brand: z.string().nullable().optional(), + country: z.string().nullable().optional(), + exp_month: z.coerce.number().nullable().optional(), + exp_year: z.coerce.number().nullable().optional(), + last4: z.string().nullable().optional(), +}) export const s_invoice_installments_card = z.object({ enabled: z.coerce.boolean().nullable().optional(), @@ -971,13 +1197,15 @@ export const s_invoice_payment_method_options_customer_balance_bank_transfer_eu_ export const s_invoice_payment_method_options_konbini = z.object({}) +export const s_invoice_payment_method_options_sepa_debit = z.object({}) + export const s_invoice_payment_method_options_us_bank_account_linked_account_options = z.object({ permissions: z .array(z.enum(["balances", "payment_method", "transactions"])) .optional(), prefetch: z - .array(z.enum(["balances"])) + .array(z.enum(["balances", "transactions"])) .nullable() .optional(), }) @@ -991,22 +1219,10 @@ export const s_invoice_setting_custom_field = z.object({ value: z.string(), }) -export const s_invoice_setting_quote_setting = z.object({ - days_until_due: z.coerce.number().nullable().optional(), -}) - export const s_invoice_setting_rendering_options = z.object({ amount_tax_display: z.string().nullable().optional(), }) -export const s_invoice_setting_subscription_schedule_phase_setting = z.object({ - days_until_due: z.coerce.number().nullable().optional(), -}) - -export const s_invoice_setting_subscription_schedule_setting = z.object({ - days_until_due: z.coerce.number().nullable().optional(), -}) - export const s_invoices_resource_invoice_tax_id = z.object({ type: z.enum([ "ad_nrt", @@ -1054,6 +1270,7 @@ export const s_invoices_resource_invoice_tax_id = z.object({ "my_itn", "my_sst", "no_vat", + "no_voec", "nz_gst", "pe_ruc", "ph_tin", @@ -1085,7 +1302,7 @@ export const s_invoices_resource_line_items_credited_items = z.object({ invoice_line_items: z.array(z.string()), }) -export const s_invoices_status_transitions = z.object({ +export const s_invoices_resource_status_transitions = z.object({ finalized_at: z.coerce.number().nullable().optional(), marked_uncollectible_at: z.coerce.number().nullable().optional(), paid_at: z.coerce.number().nullable().optional(), @@ -1097,6 +1314,15 @@ export const s_issuing_authorization_amount_details = z.object({ cashback_amount: z.coerce.number().nullable().optional(), }) +export const s_issuing_authorization_authentication_exemption = z.object({ + claimed_by: z.enum(["acquirer", "issuer"]), + type: z.enum([ + "low_value_transaction", + "transaction_risk_analysis", + "unknown", + ]), +}) + export const s_issuing_authorization_merchant_data = z.object({ category: z.string(), category_code: z.string(), @@ -1107,10 +1333,22 @@ export const s_issuing_authorization_merchant_data = z.object({ postal_code: z.string().nullable().optional(), state: z.string().nullable().optional(), terminal_id: z.string().nullable().optional(), + url: z.string().nullable().optional(), }) export const s_issuing_authorization_network_data = z.object({ acquiring_institution_id: z.string().nullable().optional(), + system_trace_audit_number: z.string().nullable().optional(), + transaction_id: z.string().nullable().optional(), +}) + +export const s_issuing_authorization_three_d_secure = z.object({ + result: z.enum([ + "attempt_acknowledged", + "authenticated", + "failed", + "required", + ]), }) export const s_issuing_authorization_treasury = z.object({ @@ -1119,13 +1357,6 @@ export const s_issuing_authorization_treasury = z.object({ transaction: z.string().nullable().optional(), }) -export const s_issuing_authorization_verification_data = z.object({ - address_line1_check: z.enum(["match", "mismatch", "not_provided"]), - address_postal_code_check: z.enum(["match", "mismatch", "not_provided"]), - cvc_check: z.enum(["match", "mismatch", "not_provided"]), - expiry_check: z.enum(["match", "mismatch", "not_provided"]), -}) - export const s_issuing_card_apple_pay = z.object({ eligible: z.coerce.boolean(), ineligible_reason: z @@ -1831,6 +2062,84 @@ export const s_issuing_dispute_treasury = z.object({ received_debit: z.string(), }) +export const s_issuing_network_token_address = z.object({ + line1: z.string(), + postal_code: z.string(), +}) + +export const s_issuing_network_token_device = z.object({ + device_fingerprint: z.string().optional(), + ip_address: z.string().optional(), + location: z.string().optional(), + name: z.string().optional(), + phone_number: z.string().optional(), + type: z.enum(["other", "phone", "watch"]).optional(), +}) + +export const s_issuing_network_token_mastercard = z.object({ + card_reference_id: z.string().optional(), + token_reference_id: z.string(), + token_requestor_id: z.string(), + token_requestor_name: z.string().optional(), +}) + +export const s_issuing_network_token_visa = z.object({ + card_reference_id: z.string(), + token_reference_id: z.string(), + token_requestor_id: z.string(), + token_risk_score: z.string().optional(), +}) + +export const s_issuing_personalization_design_carrier_text = z.object({ + footer_body: z.string().nullable().optional(), + footer_title: z.string().nullable().optional(), + header_body: z.string().nullable().optional(), + header_title: z.string().nullable().optional(), +}) + +export const s_issuing_personalization_design_preferences = z.object({ + is_default: z.coerce.boolean(), + is_platform_default: z.coerce.boolean().nullable().optional(), +}) + +export const s_issuing_personalization_design_rejection_reasons = z.object({ + card_logo: z + .array( + z.enum([ + "geographic_location", + "inappropriate", + "network_name", + "non_binary_image", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ]), + ) + .nullable() + .optional(), + carrier_text: z + .array( + z.enum([ + "geographic_location", + "inappropriate", + "network_name", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ]), + ) + .nullable() + .optional(), +}) + +export const s_issuing_physical_bundle_features = z.object({ + card_logo: z.enum(["optional", "required", "unsupported"]), + carrier_text: z.enum(["optional", "required", "unsupported"]), + second_line: z.enum(["optional", "required", "unsupported"]), +}) + export const s_issuing_settlement = z.object({ bin: z.string(), clearing_date: z.coerce.number(), @@ -1876,6 +2185,12 @@ export const s_issuing_transaction_lodging_data = z.object({ nights: z.coerce.number().nullable().optional(), }) +export const s_issuing_transaction_network_data = z.object({ + authorization_code: z.string().nullable().optional(), + processing_date: z.string().nullable().optional(), + transaction_id: z.string().nullable().optional(), +}) + export const s_issuing_transaction_receipt_data = z.object({ description: z.string().nullable().optional(), quantity: z.coerce.number().nullable().optional(), @@ -1915,7 +2230,7 @@ export const s_linked_account_options_us_bank_account = z.object({ .array(z.enum(["balances", "ownership", "payment_method", "transactions"])) .optional(), prefetch: z - .array(z.enum(["balances"])) + .array(z.enum(["balances", "transactions"])) .nullable() .optional(), return_url: z.string().optional(), @@ -1939,6 +2254,16 @@ export const s_mandate_au_becs_debit = z.object({ url: z.string() }) export const s_mandate_bacs_debit = z.object({ network_status: z.enum(["accepted", "pending", "refused", "revoked"]), reference: z.string(), + revocation_reason: z + .enum([ + "account_closed", + "bank_account_restricted", + "bank_ownership_changed", + "could_not_process", + "debit_not_authorized", + ]) + .nullable() + .optional(), url: z.string(), }) @@ -1963,7 +2288,9 @@ export const s_mandate_single_use = z.object({ currency: z.string(), }) -export const s_mandate_us_bank_account = z.object({}) +export const s_mandate_us_bank_account = z.object({ + collection_method: z.enum(["paper"]).optional(), +}) export const s_networks = z.object({ available: z.array(z.string()), @@ -1990,34 +2317,6 @@ export const s_online_acceptance = z.object({ export const s_outbound_payments_payment_method_details_financial_account = z.object({ id: z.string(), network: z.enum(["stripe"]) }) -export const s_outbound_payments_payment_method_details_us_bank_account = - z.object({ - account_holder_type: z - .enum(["company", "individual"]) - .nullable() - .optional(), - account_type: z.enum(["checking", "savings"]).nullable().optional(), - bank_name: z.string().nullable().optional(), - fingerprint: z.string().nullable().optional(), - last4: z.string().nullable().optional(), - network: z.enum(["ach", "us_domestic_wire"]), - routing_number: z.string().nullable().optional(), - }) - -export const s_outbound_transfers_payment_method_details_us_bank_account = - z.object({ - account_holder_type: z - .enum(["company", "individual"]) - .nullable() - .optional(), - account_type: z.enum(["checking", "savings"]).nullable().optional(), - bank_name: z.string().nullable().optional(), - fingerprint: z.string().nullable().optional(), - last4: z.string().nullable().optional(), - network: z.enum(["ach", "us_domestic_wire"]), - routing_number: z.string().nullable().optional(), - }) - export const s_package_dimensions = z.object({ height: z.coerce.number(), length: z.coerce.number(), @@ -2048,6 +2347,21 @@ export const s_payment_flows_private_payment_methods_alipay_details = z.object({ transaction_id: z.string().nullable().optional(), }) +export const s_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization = + z.object({ status: z.enum(["disabled", "enabled"]) }) + +export const s_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization = + z.object({ status: z.enum(["available", "unavailable"]) }) + +export const s_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture = + z.object({ + maximum_amount_capturable: z.coerce.number(), + status: z.enum(["available", "unavailable"]), + }) + +export const s_payment_flows_private_payment_methods_card_details_api_resource_multicapture = + z.object({ status: z.enum(["available", "unavailable"]) }) + export const s_payment_flows_private_payment_methods_klarna_dob = z.object({ day: z.coerce.number().nullable().optional(), month: z.coerce.number().nullable().optional(), @@ -2132,6 +2446,12 @@ export const s_payment_intent_next_action_redirect_to_url = z.object({ url: z.string().nullable().optional(), }) +export const s_payment_intent_next_action_swish_qr_code = z.object({ + data: z.string(), + image_url_png: z.string(), + image_url_svg: z.string(), +}) + export const s_payment_intent_next_action_verify_with_microdeposits = z.object({ arrival_date: z.coerce.number(), hosted_verification_url: z.string(), @@ -2169,7 +2489,9 @@ export const s_payment_intent_payment_method_options_au_becs_debit = z.object({ setup_future_usage: z.enum(["none", "off_session", "on_session"]).optional(), }) -export const s_payment_intent_payment_method_options_blik = z.object({}) +export const s_payment_intent_payment_method_options_blik = z.object({ + setup_future_usage: z.enum(["none"]).optional(), +}) export const s_payment_intent_payment_method_options_eps = z.object({ setup_future_usage: z.enum(["none"]).optional(), @@ -2194,13 +2516,24 @@ export const s_payment_intent_payment_method_options_mandate_options_acss_debit export const s_payment_intent_payment_method_options_mandate_options_sepa_debit = z.object({}) +export const s_payment_intent_payment_method_options_mobilepay = z.object({ + capture_method: z.enum(["manual"]).optional(), + setup_future_usage: z.enum(["none"]).optional(), +}) + +export const s_payment_intent_payment_method_options_swish = z.object({ + reference: z.string().nullable().optional(), + setup_future_usage: z.enum(["none"]).optional(), +}) + export const s_payment_intent_processing_customer_notification = z.object({ approval_requested: z.coerce.boolean().nullable().optional(), completes_at: z.coerce.number().nullable().optional(), }) -export const s_payment_links_resource_automatic_tax = z.object({ - enabled: z.coerce.boolean(), +export const s_payment_links_resource_completed_sessions = z.object({ + count: z.coerce.number(), + limit: z.coerce.number(), }) export const s_payment_links_resource_completion_behavior_confirmation_page = @@ -2210,11 +2543,6 @@ export const s_payment_links_resource_completion_behavior_redirect = z.object({ url: z.string(), }) -export const s_payment_links_resource_consent_collection = z.object({ - promotions: z.enum(["auto", "none"]).nullable().optional(), - terms_of_service: z.enum(["none", "required"]).nullable().optional(), -}) - export const s_payment_links_resource_custom_fields_dropdown_option = z.object({ label: z.string(), value: z.string(), @@ -2244,12 +2572,21 @@ export const s_payment_links_resource_payment_intent_data = z.object({ .enum(["automatic", "automatic_async", "manual"]) .nullable() .optional(), + description: z.string().nullable().optional(), + metadata: z.record(z.string()), setup_future_usage: z .enum(["off_session", "on_session"]) .nullable() .optional(), + statement_descriptor: z.string().nullable().optional(), + statement_descriptor_suffix: z.string().nullable().optional(), + transfer_group: z.string().nullable().optional(), }) +export const s_payment_links_resource_payment_method_reuse_agreement = z.object( + { position: z.enum(["auto", "hidden"]) }, +) + export const s_payment_links_resource_phone_number_collection = z.object({ enabled: z.coerce.boolean(), }) @@ -2498,11 +2835,6 @@ export const s_payment_links_resource_shipping_address_collection = z.object({ ), }) -export const s_payment_links_resource_subscription_data = z.object({ - description: z.string().nullable().optional(), - trial_period_days: z.coerce.number().nullable().optional(), -}) - export const s_payment_links_resource_tax_id_collection = z.object({ enabled: z.coerce.boolean(), }) @@ -2640,6 +2972,10 @@ export const s_payment_method_details_card_network_token = z.object({ used: z.coerce.boolean(), }) +export const s_payment_method_details_card_present_offline = z.object({ + stored_at: z.coerce.number().nullable().optional(), +}) + export const s_payment_method_details_card_present_receipt = z.object({ account_type: z.enum(["checking", "credit", "prepaid", "unknown"]).optional(), application_cryptogram: z.string().nullable().optional(), @@ -2810,6 +3146,7 @@ export const s_payment_method_details_p24 = z.object({ "santander_przelew24", "tmobile_usbugi_bankowe", "toyota_bank", + "velobank", "volkswagen_bank", ]) .nullable() @@ -2830,6 +3167,8 @@ export const s_payment_method_details_promptpay = z.object({ reference: z.string().nullable().optional(), }) +export const s_payment_method_details_revolut_pay = z.object({}) + export const s_payment_method_details_sepa_debit = z.object({ bank_code: z.string().nullable().optional(), branch_code: z.string().nullable().optional(), @@ -2841,13 +3180,10 @@ export const s_payment_method_details_sepa_debit = z.object({ export const s_payment_method_details_stripe_account = z.object({}) -export const s_payment_method_details_us_bank_account = z.object({ - account_holder_type: z.enum(["company", "individual"]).nullable().optional(), - account_type: z.enum(["checking", "savings"]).nullable().optional(), - bank_name: z.string().nullable().optional(), +export const s_payment_method_details_swish = z.object({ fingerprint: z.string().nullable().optional(), - last4: z.string().nullable().optional(), - routing_number: z.string().nullable().optional(), + payment_reference: z.string().nullable().optional(), + verified_phone_last4: z.string().nullable().optional(), }) export const s_payment_method_details_wechat = z.object({}) @@ -2940,6 +3276,7 @@ export const s_payment_method_ideal = z.object({ "knab", "moneyou", "n26", + "nn", "rabobank", "regiobank", "revolut", @@ -2961,6 +3298,7 @@ export const s_payment_method_ideal = z.object({ "INGBNL2A", "KNABNL2H", "MOYONL21", + "NNBANL2G", "NTSBDEB1", "RABONL2U", "RBRBNL21", @@ -2979,6 +3317,8 @@ export const s_payment_method_link = z.object({ email: z.string().nullable().optional(), }) +export const s_payment_method_mobilepay = z.object({}) + export const s_payment_method_options_affirm = z.object({ capture_method: z.enum(["manual"]).optional(), preferred_locale: z.string().optional(), @@ -3102,6 +3442,8 @@ export const s_payment_method_options_promptpay = z.object({ setup_future_usage: z.enum(["none"]).optional(), }) +export const s_payment_method_options_revolut_pay = z.object({}) + export const s_payment_method_options_sofort = z.object({ preferred_language: z .enum(["de", "en", "es", "fr", "it", "nl", "pl"]) @@ -3110,6 +3452,9 @@ export const s_payment_method_options_sofort = z.object({ setup_future_usage: z.enum(["none", "off_session"]).optional(), }) +export const s_payment_method_options_us_bank_account_mandate_options = + z.object({ collection_method: z.enum(["paper"]).optional() }) + export const s_payment_method_options_wechat_pay = z.object({ app_id: z.string().nullable().optional(), client: z.enum(["android", "ios", "web"]).nullable().optional(), @@ -3149,6 +3494,7 @@ export const s_payment_method_p24 = z.object({ "santander_przelew24", "tmobile_usbugi_bankowe", "toyota_bank", + "velobank", "volkswagen_bank", ]) .nullable() @@ -3166,10 +3512,14 @@ export const s_payment_method_pix = z.object({}) export const s_payment_method_promptpay = z.object({}) +export const s_payment_method_revolut_pay = z.object({}) + export const s_payment_method_sofort = z.object({ country: z.string().nullable().optional(), }) +export const s_payment_method_swish = z.object({}) + export const s_payment_method_us_bank_account_blocked = z.object({ network_code: z .enum([ @@ -3213,24 +3563,11 @@ export const s_payment_pages_checkout_session_after_expiration_recovery = url: z.string().nullable().optional(), }) -export const s_payment_pages_checkout_session_automatic_tax = z.object({ - enabled: z.coerce.boolean(), - status: z - .enum(["complete", "failed", "requires_location_inputs"]) - .nullable() - .optional(), -}) - export const s_payment_pages_checkout_session_consent = z.object({ promotions: z.enum(["opt_in", "opt_out"]).nullable().optional(), terms_of_service: z.enum(["accepted"]).nullable().optional(), }) -export const s_payment_pages_checkout_session_consent_collection = z.object({ - promotions: z.enum(["auto", "none"]).nullable().optional(), - terms_of_service: z.enum(["none", "required"]).nullable().optional(), -}) - export const s_payment_pages_checkout_session_currency_conversion = z.object({ amount_subtotal: z.coerce.number(), amount_total: z.coerce.number(), @@ -3264,6 +3601,9 @@ export const s_payment_pages_checkout_session_custom_text_position = z.object({ message: z.string(), }) +export const s_payment_pages_checkout_session_payment_method_reuse_agreement = + z.object({ position: z.enum(["auto", "hidden"]) }) + export const s_payment_pages_checkout_session_phone_number_collection = z.object({ enabled: z.coerce.boolean() }) @@ -3559,6 +3899,7 @@ export const s_payment_pages_checkout_session_tax_id = z.object({ "my_itn", "my_sst", "no_vat", + "no_voec", "nz_gst", "pe_ruc", "ph_tin", @@ -3602,9 +3943,16 @@ export const s_period = z.object({ start: z.coerce.number().nullable().optional(), }) +export const s_person_additional_tos_acceptance = z.object({ + date: z.coerce.number().nullable().optional(), + ip: z.string().nullable().optional(), + user_agent: z.string().nullable().optional(), +}) + export const s_person_relationship = z.object({ director: z.coerce.boolean().nullable().optional(), executive: z.coerce.boolean().nullable().optional(), + legal_guardian: z.coerce.boolean().nullable().optional(), owner: z.coerce.boolean().nullable().optional(), percent_ownership: z.coerce.number().nullable().optional(), representative: z.coerce.boolean().nullable().optional(), @@ -3692,10 +4040,6 @@ export const s_portal_subscription_cancellation_reason = z.object({ ), }) -export const s_portal_subscription_pause = z.object({ - enabled: z.coerce.boolean(), -}) - export const s_portal_subscription_update_product = z.object({ prices: z.array(z.string()), product: z.string(), @@ -3709,20 +4053,14 @@ export const s_price_tier = z.object({ up_to: z.coerce.number().nullable().optional(), }) -export const s_product_feature = z.object({ name: z.string() }) +export const s_product_marketing_feature = z.object({ + name: z.string().optional(), +}) export const s_promotion_code_currency_option = z.object({ minimum_amount: z.coerce.number(), }) -export const s_quotes_resource_automatic_tax = z.object({ - enabled: z.coerce.boolean(), - status: z - .enum(["complete", "failed", "requires_location_inputs"]) - .nullable() - .optional(), -}) - export const s_quotes_resource_status_transitions = z.object({ accepted_at: z.coerce.number().nullable().optional(), canceled_at: z.coerce.number().nullable().optional(), @@ -3732,6 +4070,7 @@ export const s_quotes_resource_status_transitions = z.object({ export const s_quotes_resource_subscription_data_subscription_data = z.object({ description: z.string().nullable().optional(), effective_date: z.coerce.number().nullable().optional(), + metadata: z.record(z.string()).nullable().optional(), trial_period_days: z.coerce.number().nullable().optional(), }) @@ -3776,9 +4115,22 @@ export const s_recurring = z.object({ .optional(), interval: z.enum(["day", "month", "week", "year"]), interval_count: z.coerce.number(), + meter: z.string().nullable().optional(), usage_type: z.enum(["licensed", "metered"]), }) +export const s_refund_destination_details_card = z.object({ + reference: z.string().optional(), + reference_status: z.string().optional(), + reference_type: z.string().optional(), + type: z.enum(["pending", "refund", "reversal"]), +}) + +export const s_refund_destination_details_generic = z.object({ + reference: z.string().nullable().optional(), + reference_status: z.string().nullable().optional(), +}) + export const s_reporting_report_type = z.object({ data_available_end: z.coerce.number(), data_available_start: z.coerce.number(), @@ -3805,10 +4157,6 @@ export const s_rule = z.object({ predicate: z.string(), }) -export const s_schedules_phase_automatic_tax = z.object({ - enabled: z.coerce.boolean(), -}) - export const s_secret_service_resource_scope = z.object({ type: z.enum(["account", "user"]), user: z.string().optional(), @@ -3822,6 +4170,12 @@ export const s_setup_attempt_payment_method_details_bacs_debit = z.object({}) export const s_setup_attempt_payment_method_details_boleto = z.object({}) +export const s_setup_attempt_payment_method_details_card_checks = z.object({ + address_line1_check: z.string().nullable().optional(), + address_postal_code_check: z.string().nullable().optional(), + cvc_check: z.string().nullable().optional(), +}) + export const s_setup_attempt_payment_method_details_cashapp = z.object({}) export const s_setup_attempt_payment_method_details_klarna = z.object({}) @@ -3867,6 +4221,8 @@ export const s_setup_intent_payment_method_options_card_mandate_options = .optional(), }) +export const s_setup_intent_payment_method_options_card_present = z.object({}) + export const s_setup_intent_payment_method_options_link = z.object({}) export const s_setup_intent_payment_method_options_mandate_options_acss_debit = @@ -4197,10 +4553,6 @@ export const s_source_type_wechat = z.object({ statement_descriptor: z.string().optional(), }) -export const s_subscription_automatic_tax = z.object({ - enabled: z.coerce.boolean(), -}) - export const s_subscription_billing_thresholds = z.object({ amount_gte: z.coerce.number().nullable().optional(), reset_billing_cycle_anchor: z.coerce.boolean().nullable().optional(), @@ -4224,8 +4576,13 @@ export const s_subscription_schedule_current_phase = z.object({ start_date: z.coerce.number(), }) -export const s_subscription_schedules_resource_default_settings_automatic_tax = - z.object({ enabled: z.coerce.boolean() }) +export const s_subscriptions_resource_billing_cycle_anchor_config = z.object({ + day_of_month: z.coerce.number(), + hour: z.coerce.number().nullable().optional(), + minute: z.coerce.number().nullable().optional(), + month: z.coerce.number().nullable().optional(), + second: z.coerce.number().nullable().optional(), +}) export const s_subscriptions_resource_pause_collection = z.object({ behavior: z.enum(["keep_as_draft", "mark_uncollectible", "void"]), @@ -4257,6 +4614,24 @@ export const s_tax_id_verification = z.object({ verified_name: z.string().nullable().optional(), }) +export const s_tax_product_registrations_resource_country_options_ca_province_standard = + z.object({ province: z.string() }) + +export const s_tax_product_registrations_resource_country_options_default = + z.object({ type: z.enum(["standard"]) }) + +export const s_tax_product_registrations_resource_country_options_eu_standard = + z.object({ place_of_supply_scheme: z.enum(["small_seller", "standard"]) }) + +export const s_tax_product_registrations_resource_country_options_simplified = + z.object({ type: z.enum(["simplified"]) }) + +export const s_tax_product_registrations_resource_country_options_us_local_amusement_tax = + z.object({ jurisdiction: z.string() }) + +export const s_tax_product_registrations_resource_country_options_us_local_lease_tax = + z.object({ jurisdiction: z.string() }) + export const s_tax_product_resource_customer_details_resource_tax_id = z.object( { type: z.enum([ @@ -4305,6 +4680,7 @@ export const s_tax_product_resource_customer_details_resource_tax_id = z.object( "my_itn", "my_sst", "no_vat", + "no_voec", "nz_gst", "pe_ruc", "ph_tin", @@ -4428,6 +4804,10 @@ export const s_tax_rate = z.object({ id: z.string(), inclusive: z.coerce.boolean(), jurisdiction: z.string().nullable().optional(), + jurisdiction_level: z + .enum(["city", "country", "county", "district", "multiple", "state"]) + .nullable() + .optional(), livemode: z.coerce.boolean(), metadata: z.record(z.string()).nullable().optional(), object: z.enum(["tax_rate"]), @@ -4446,7 +4826,6 @@ export const s_tax_rate = z.object({ "qst", "rst", "sales_tax", - "service_tax", "vat", ]) .nullable() @@ -4460,6 +4839,9 @@ export const s_terminal_configuration_configuration_resource_currency_specific_c smart_tip_threshold: z.coerce.number().optional(), }) +export const s_terminal_configuration_configuration_resource_offline_config = + z.object({ enabled: z.coerce.boolean().nullable().optional() }) + export const s_terminal_connection_token = z.object({ location: z.string().optional(), object: z.enum(["terminal.connection_token"]), @@ -4472,8 +4854,12 @@ export const s_terminal_reader_reader_resource_line_item = z.object({ quantity: z.coerce.number(), }) -export const s_terminal_reader_reader_resource_process_setup_config = z.object( - {}, +export const s_terminal_reader_reader_resource_process_setup_config = z.object({ + enable_customer_cancellation: z.coerce.boolean().optional(), +}) + +export const s_terminal_reader_reader_resource_refund_payment_config = z.object( + { enable_customer_cancellation: z.coerce.boolean().optional() }, ) export const s_terminal_reader_reader_resource_tipping_config = z.object({ @@ -4496,6 +4882,10 @@ export const s_three_d_secure_details = z.object({ .enum(["challenge", "frictionless"]) .nullable() .optional(), + electronic_commerce_indicator: z + .enum(["01", "02", "05", "06", "07"]) + .nullable() + .optional(), result: z .enum([ "attempt_acknowledged", @@ -4519,6 +4909,7 @@ export const s_three_d_secure_details = z.object({ ]) .nullable() .optional(), + transaction_id: z.string().nullable().optional(), version: z.enum(["1.0.2", "2.1.0", "2.2.0"]).nullable().optional(), }) @@ -4527,6 +4918,12 @@ export const s_three_d_secure_details_charge = z.object({ .enum(["challenge", "frictionless"]) .nullable() .optional(), + electronic_commerce_indicator: z + .enum(["01", "02", "05", "06", "07"]) + .nullable() + .optional(), + exemption_indicator: z.enum(["low_risk", "none"]).nullable().optional(), + exemption_indicator_applied: z.coerce.boolean().optional(), result: z .enum([ "attempt_acknowledged", @@ -4550,6 +4947,7 @@ export const s_three_d_secure_details_charge = z.object({ ]) .nullable() .optional(), + transaction_id: z.string().nullable().optional(), version: z.enum(["1.0.2", "2.1.0", "2.2.0"]).nullable().optional(), }) @@ -4557,6 +4955,10 @@ export const s_three_d_secure_usage = z.object({ supported: z.coerce.boolean(), }) +export const s_token_card_networks = z.object({ + preferred: z.string().nullable().optional(), +}) + export const s_transfer_schedule = z.object({ delay_days: z.coerce.number(), interval: z.string(), @@ -4700,6 +5102,7 @@ export const s_treasury_received_debits_resource_linked_flows = z.object({ inbound_transfer: z.string().nullable().optional(), issuing_authorization: z.string().nullable().optional(), issuing_transaction: z.string().nullable().optional(), + payout: z.string().nullable().optional(), }) export const s_treasury_received_debits_resource_reversal_details = z.object({ @@ -4773,6 +5176,8 @@ export const s_webhook_endpoint = z.object({ }) export const s_account_business_profile = z.object({ + annual_revenue: s_account_annual_revenue.nullable().optional(), + estimated_worker_count: z.coerce.number().nullable().optional(), mcc: z.string().nullable().optional(), monthly_estimated_revenue: s_account_monthly_estimated_revenue.optional(), name: z.string().nullable().optional(), @@ -4879,6 +5284,12 @@ export const s_balance_amount = z.object({ source_types: s_balance_amount_by_source_type.optional(), }) +export const s_balance_amount_net = z.object({ + amount: z.coerce.number(), + currency: z.string(), + source_types: s_balance_amount_by_source_type.optional(), +}) + export const s_bank_connections_resource_balance = z.object({ as_of: z.coerce.number(), cash: s_bank_connections_resource_balance_api_resource_cash_balance.optional(), @@ -4895,6 +5306,31 @@ export const s_billing_details = z.object({ phone: z.string().nullable().optional(), }) +export const s_billing_meter = z.object({ + created: z.coerce.number(), + customer_mapping: s_billing_meter_resource_customer_mapping_settings, + default_aggregation: s_billing_meter_resource_aggregation_settings, + display_name: z.string(), + event_name: z.string(), + event_time_window: z.enum(["day", "hour"]).nullable().optional(), + id: z.string(), + livemode: z.coerce.boolean(), + object: z.enum(["billing.meter"]), + status: z.enum(["active", "inactive"]), + status_transitions: s_billing_meter_resource_billing_meter_status_transitions, + updated: z.coerce.number(), + value_settings: s_billing_meter_resource_billing_meter_value, +}) + +export const s_billing_meter_event_adjustment = z.object({ + cancel: s_billing_meter_resource_billing_meter_event_adjustment_cancel, + event_name: z.string(), + livemode: z.coerce.boolean(), + object: z.enum(["billing.meter_event_adjustment"]), + status: z.enum(["complete", "pending"]), + type: z.enum(["cancel"]), +}) + export const s_cash_balance = z.object({ available: z.record(z.coerce.number()).nullable().optional(), customer: z.string(), @@ -4924,6 +5360,7 @@ export const s_checkout_acss_debit_payment_method_options = z.object({ export const s_checkout_card_payment_method_options = z.object({ installments: s_checkout_card_installments_options.optional(), + request_three_d_secure: z.enum(["any", "automatic", "challenge"]), setup_future_usage: z.enum(["none", "off_session", "on_session"]).optional(), statement_descriptor_suffix_kana: z.string().optional(), statement_descriptor_suffix_kanji: z.string().optional(), @@ -4956,8 +5393,53 @@ export const s_checkout_us_bank_account_payment_method_options = z.object({ verification_method: z.enum(["automatic", "instant"]).optional(), }) -export const s_connect_embedded_account_session_create_components = z.object({ - account_onboarding: s_connect_embedded_base_config_claim, +export const s_climate_supplier = z.object({ + id: z.string(), + info_url: z.string(), + livemode: z.coerce.boolean(), + locations: z.array(s_climate_removals_location), + name: z.string(), + object: z.enum(["climate.supplier"]), + removal_pathway: z.enum([ + "biomass_carbon_removal_and_storage", + "direct_air_capture", + "enhanced_weathering", + ]), +}) + +export const s_confirmation_tokens_resource_mandate_data_resource_customer_acceptance = + z.object({ + online: + s_confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online + .nullable() + .optional(), + type: z.string(), + }) + +export const s_confirmation_tokens_resource_shipping = z.object({ + address: s_address, + name: z.string(), + phone: z.string().nullable().optional(), +}) + +export const s_connect_embedded_account_config = z.object({ + enabled: z.coerce.boolean(), + features: s_connect_embedded_account_features, +}) + +export const s_connect_embedded_base_config_claim = z.object({ + enabled: z.coerce.boolean(), + features: s_connect_embedded_base_features, +}) + +export const s_connect_embedded_payments_config = z.object({ + enabled: z.coerce.boolean(), + features: s_connect_embedded_payments_features, +}) + +export const s_connect_embedded_payouts_config = z.object({ + enabled: z.coerce.boolean(), + features: s_connect_embedded_payouts_features, }) export const s_country_spec_verification_fields = z.object({ @@ -5050,6 +5532,11 @@ export const s_customer_balance_resource_cash_balance_transaction_resource_funde s_customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer.optional(), }) +export const s_customer_session_resource_components = z.object({ + buy_button: s_customer_session_resource_components_resource_buy_button, + pricing_table: s_customer_session_resource_components_resource_pricing_table, +}) + export const s_customer_tax = z.object({ automatic_tax: z.enum([ "failed", @@ -5108,14 +5595,55 @@ export const s_financial_connections_account_ownership = z.object({ }), }) +export const s_financial_connections_transaction = z.object({ + account: z.string(), + amount: z.coerce.number(), + currency: z.string(), + description: z.string(), + id: z.string(), + livemode: z.coerce.boolean(), + object: z.enum(["financial_connections.transaction"]), + status: z.enum(["pending", "posted", "void"]), + status_transitions: + s_bank_connections_resource_transaction_resource_status_transitions, + transacted_at: z.coerce.number(), + transaction_refresh: z.string(), + updated: z.coerce.number(), +}) + +export const s_forwarded_request_details = z.object({ + body: z.string(), + headers: z.array(s_forwarded_request_header), + http_method: z.enum(["POST"]), +}) + +export const s_forwarded_response_details = z.object({ + body: z.string(), + headers: z.array(s_forwarded_request_header), + status: z.coerce.number(), +}) + export const s_funding_instructions_bank_transfer_financial_address = z.object({ + aba: s_funding_instructions_bank_transfer_aba_record.optional(), iban: s_funding_instructions_bank_transfer_iban_record.optional(), sort_code: s_funding_instructions_bank_transfer_sort_code_record.optional(), spei: s_funding_instructions_bank_transfer_spei_record.optional(), supported_networks: z - .array(z.enum(["bacs", "fps", "sepa", "spei", "zengin"])) + .array( + z.enum([ + "ach", + "bacs", + "domestic_wire_us", + "fps", + "sepa", + "spei", + "swift", + "zengin", + ]), + ) .optional(), - type: z.enum(["iban", "sort_code", "spei", "zengin"]), + swift: s_funding_instructions_bank_transfer_swift_record.optional(), + type: z.enum(["aba", "iban", "sort_code", "spei", "swift", "zengin"]), zengin: s_funding_instructions_bank_transfer_zengin_record.optional(), }) @@ -5139,6 +5667,12 @@ export const s_gelato_document_report = z.object({ .optional(), }) +export const s_gelato_email_report = z.object({ + email: z.string().nullable().optional(), + error: s_gelato_email_report_error.nullable().optional(), + status: z.enum(["unverified", "verified"]), +}) + export const s_gelato_id_number_report = z.object({ dob: s_gelato_data_id_number_report_date.nullable().optional(), error: s_gelato_id_number_report_error.nullable().optional(), @@ -5149,6 +5683,12 @@ export const s_gelato_id_number_report = z.object({ status: z.enum(["unverified", "verified"]), }) +export const s_gelato_phone_report = z.object({ + error: s_gelato_phone_report_error.nullable().optional(), + phone: z.string().nullable().optional(), + status: z.enum(["unverified", "verified"]), +}) + export const s_gelato_selfie_report = z.object({ document: z.string().nullable().optional(), error: s_gelato_selfie_report_error.nullable().optional(), @@ -5163,16 +5703,20 @@ export const s_gelato_verification_report_options = z.object({ export const s_gelato_verification_session_options = z.object({ document: s_gelato_session_document_options.optional(), + email: s_gelato_session_email_options.optional(), id_number: s_gelato_session_id_number_options.optional(), + phone: s_gelato_session_phone_options.optional(), }) export const s_gelato_verified_outputs = z.object({ address: s_address.nullable().optional(), dob: s_gelato_data_verified_outputs_date.nullable().optional(), + email: z.string().nullable().optional(), first_name: z.string().nullable().optional(), id_number: z.string().nullable().optional(), id_number_type: z.enum(["br_cpf", "sg_nric", "us_ssn"]).nullable().optional(), last_name: z.string().nullable().optional(), + phone: z.string().nullable().optional(), }) export const s_invoice_payment_method_options_acss_debit = z.object({ @@ -5185,7 +5729,10 @@ export const s_invoice_payment_method_options_acss_debit = z.object({ export const s_invoice_payment_method_options_card = z.object({ installments: s_invoice_installments_card.optional(), - request_three_d_secure: z.enum(["any", "automatic"]).nullable().optional(), + request_three_d_secure: z + .enum(["any", "automatic", "challenge"]) + .nullable() + .optional(), }) export const s_invoice_payment_method_options_customer_balance_bank_transfer = @@ -5235,7 +5782,7 @@ export const s_invoice_threshold_reason = z.object({ item_reasons: z.array(s_invoice_item_threshold_reason), }) -export const s_invoices_invoice_rendering = z.object({ +export const s_invoices_resource_invoice_rendering = z.object({ amount_tax_display: z.string().nullable().optional(), pdf: s_invoice_rendering_pdf.nullable().optional(), }) @@ -5253,16 +5800,19 @@ export const s_issuing_authorization_pending_request = z.object({ is_amount_controllable: z.coerce.boolean(), merchant_amount: z.coerce.number(), merchant_currency: z.string(), + network_risk_score: z.coerce.number().nullable().optional(), }) export const s_issuing_authorization_request = z.object({ amount: z.coerce.number(), amount_details: s_issuing_authorization_amount_details.nullable().optional(), approved: z.coerce.boolean(), + authorization_code: z.string().nullable().optional(), created: z.coerce.number(), currency: z.string(), merchant_amount: z.coerce.number(), merchant_currency: z.string(), + network_risk_score: z.coerce.number().nullable().optional(), reason: z.enum([ "account_disabled", "card_active", @@ -5280,6 +5830,19 @@ export const s_issuing_authorization_request = z.object({ "webhook_timeout", ]), reason_message: z.string().nullable().optional(), + requested_at: z.coerce.number().nullable().optional(), +}) + +export const s_issuing_authorization_verification_data = z.object({ + address_line1_check: z.enum(["match", "mismatch", "not_provided"]), + address_postal_code_check: z.enum(["match", "mismatch", "not_provided"]), + authentication_exemption: s_issuing_authorization_authentication_exemption + .nullable() + .optional(), + cvc_check: z.enum(["match", "mismatch", "not_provided"]), + expiry_check: z.enum(["match", "mismatch", "not_provided"]), + postal_code: z.string().nullable().optional(), + three_d_secure: s_issuing_authorization_three_d_secure.nullable().optional(), }) export const s_issuing_card_authorization_controls = z.object({ @@ -5585,6 +6148,7 @@ export const s_issuing_card_authorization_controls = z.object({ ) .nullable() .optional(), + allowed_merchant_countries: z.array(z.string()).nullable().optional(), blocked_categories: z .array( z.enum([ @@ -5887,6 +6451,7 @@ export const s_issuing_card_authorization_controls = z.object({ ) .nullable() .optional(), + blocked_merchant_countries: z.array(z.string()).nullable().optional(), spending_limits: z.array(s_issuing_card_spending_limit).nullable().optional(), spending_limits_currency: z.string().nullable().optional(), }) @@ -6227,6 +6792,7 @@ export const s_issuing_cardholder_authorization_controls = z.object({ ) .nullable() .optional(), + allowed_merchant_countries: z.array(z.string()).nullable().optional(), blocked_categories: z .array( z.enum([ @@ -6529,6 +7095,7 @@ export const s_issuing_cardholder_authorization_controls = z.object({ ) .nullable() .optional(), + blocked_merchant_countries: z.array(z.string()).nullable().optional(), spending_limits: z .array(s_issuing_cardholder_spending_limit) .nullable() @@ -6542,6 +7109,62 @@ export const s_issuing_cardholder_card_issuing = z.object({ .optional(), }) +export const s_issuing_network_token_wallet_provider = z.object({ + account_id: z.string().optional(), + account_trust_score: z.coerce.number().optional(), + card_number_source: z.enum(["app", "manual", "on_file", "other"]).optional(), + cardholder_address: s_issuing_network_token_address.optional(), + cardholder_name: z.string().optional(), + device_trust_score: z.coerce.number().optional(), + hashed_account_email_address: z.string().optional(), + reason_codes: z + .array( + z.enum([ + "account_card_too_new", + "account_recently_changed", + "account_too_new", + "account_too_new_since_launch", + "additional_device", + "data_expired", + "defer_id_v_decision", + "device_recently_lost", + "good_activity_history", + "has_suspended_tokens", + "high_risk", + "inactive_account", + "long_account_tenure", + "low_account_score", + "low_device_score", + "low_phone_number_score", + "network_service_error", + "outside_home_territory", + "provisioning_cardholder_mismatch", + "provisioning_device_and_cardholder_mismatch", + "provisioning_device_mismatch", + "same_device_no_prior_authentication", + "same_device_successful_prior_authentication", + "software_update", + "suspicious_activity", + "too_many_different_cardholders", + "too_many_recent_attempts", + "too_many_recent_tokens", + ]), + ) + .optional(), + suggested_decision: z.enum(["approve", "decline", "require_auth"]).optional(), + suggested_decision_version: z.string().optional(), +}) + +export const s_issuing_physical_bundle = z.object({ + features: s_issuing_physical_bundle_features.optional(), + id: z.string(), + livemode: z.coerce.boolean(), + name: z.string(), + object: z.enum(["issuing.physical_bundle"]), + status: z.enum(["active", "inactive", "review"]), + type: z.enum(["custom", "standard"]), +}) + export const s_issuing_transaction_flight_data = z.object({ departure_at: z.coerce.number().nullable().optional(), passenger_name: z.string().nullable().optional(), @@ -6624,6 +7247,12 @@ export const s_payment_intent_next_action_konbini_stores = z.object({ .optional(), }) +export const s_payment_intent_next_action_swish_handle_redirect_or_display_qr_code = + z.object({ + hosted_instructions_url: z.string(), + qr_code: s_payment_intent_next_action_swish_qr_code, + }) + export const s_payment_intent_payment_method_options_acss_debit = z.object({ mandate_options: s_payment_intent_payment_method_options_mandate_options_acss_debit.optional(), @@ -6642,6 +7271,8 @@ export const s_payment_intent_payment_method_options_sepa_debit = z.object({ export const s_payment_intent_payment_method_options_us_bank_account = z.object( { financial_connections: s_linked_account_options_us_bank_account.optional(), + mandate_options: + s_payment_method_options_us_bank_account_mandate_options.optional(), preferred_settlement_speed: z.enum(["fastest", "standard"]).optional(), setup_future_usage: z .enum(["none", "off_session", "on_session"]) @@ -6659,11 +7290,23 @@ export const s_payment_links_resource_after_completion = z.object({ type: z.enum(["hosted_confirmation", "redirect"]), }) +export const s_payment_links_resource_consent_collection = z.object({ + payment_method_reuse_agreement: + s_payment_links_resource_payment_method_reuse_agreement + .nullable() + .optional(), + promotions: z.enum(["auto", "none"]).nullable().optional(), + terms_of_service: z.enum(["none", "required"]).nullable().optional(), +}) + export const s_payment_links_resource_custom_fields_dropdown = z.object({ options: z.array(s_payment_links_resource_custom_fields_dropdown_option), }) export const s_payment_links_resource_custom_text = z.object({ + after_submit: s_payment_links_resource_custom_text_position + .nullable() + .optional(), shipping_address: s_payment_links_resource_custom_text_position .nullable() .optional(), @@ -6673,6 +7316,10 @@ export const s_payment_links_resource_custom_text = z.object({ .optional(), }) +export const s_payment_links_resource_restrictions = z.object({ + completed_sessions: s_payment_links_resource_completed_sessions, +}) + export const s_payment_method_card_present = z.object({ brand: z.string().nullable().optional(), cardholder_name: z.string().nullable().optional(), @@ -6734,6 +7381,7 @@ export const s_payment_method_details_card_present = z.object({ incremental_authorization_supported: z.coerce.boolean(), last4: z.string().nullable().optional(), network: z.string().nullable().optional(), + offline: s_payment_method_details_card_present_offline.nullable().optional(), overcapture_supported: z.coerce.boolean(), read_method: z .enum([ @@ -6794,6 +7442,10 @@ export const s_payment_method_details_konbini = z.object({ store: s_payment_method_details_konbini_store.nullable().optional(), }) +export const s_payment_method_details_mobilepay = z.object({ + card: s_internal_card.nullable().optional(), +}) + export const s_payment_method_details_paypal = z.object({ payer_email: z.string().nullable().optional(), payer_id: z.string().nullable().optional(), @@ -6876,6 +7528,15 @@ export const s_payment_pages_checkout_session_after_expiration = z.object({ .optional(), }) +export const s_payment_pages_checkout_session_consent_collection = z.object({ + payment_method_reuse_agreement: + s_payment_pages_checkout_session_payment_method_reuse_agreement + .nullable() + .optional(), + promotions: z.enum(["auto", "none"]).nullable().optional(), + terms_of_service: z.enum(["none", "required"]).nullable().optional(), +}) + export const s_payment_pages_checkout_session_custom_fields_dropdown = z.object( { options: z.array(s_payment_pages_checkout_session_custom_fields_option), @@ -6884,6 +7545,9 @@ export const s_payment_pages_checkout_session_custom_fields_dropdown = z.object( ) export const s_payment_pages_checkout_session_custom_text = z.object({ + after_submit: s_payment_pages_checkout_session_custom_text_position + .nullable() + .optional(), shipping_address: s_payment_pages_checkout_session_custom_text_position .nullable() .optional(), @@ -6906,6 +7570,10 @@ export const s_payment_pages_checkout_session_customer_details = z.object({ .optional(), }) +export const s_person_additional_tos_acceptances = z.object({ + account: s_person_additional_tos_acceptance, +}) + export const s_person_future_requirements = z.object({ alternatives: z .array(s_account_requirements_alternative) @@ -7004,6 +7672,38 @@ export const s_radar_value_list = z.object({ object: z.enum(["radar.value_list"]), }) +export const s_refund_destination_details = z.object({ + affirm: s_destination_details_unimplemented.optional(), + afterpay_clearpay: s_destination_details_unimplemented.optional(), + alipay: s_destination_details_unimplemented.optional(), + au_bank_transfer: s_destination_details_unimplemented.optional(), + blik: s_refund_destination_details_generic.optional(), + br_bank_transfer: s_refund_destination_details_generic.optional(), + card: s_refund_destination_details_card.optional(), + cashapp: s_destination_details_unimplemented.optional(), + customer_cash_balance: s_destination_details_unimplemented.optional(), + eps: s_destination_details_unimplemented.optional(), + eu_bank_transfer: s_refund_destination_details_generic.optional(), + gb_bank_transfer: s_refund_destination_details_generic.optional(), + giropay: s_destination_details_unimplemented.optional(), + grabpay: s_destination_details_unimplemented.optional(), + jp_bank_transfer: s_refund_destination_details_generic.optional(), + klarna: s_destination_details_unimplemented.optional(), + mx_bank_transfer: s_refund_destination_details_generic.optional(), + p24: s_refund_destination_details_generic.optional(), + paynow: s_destination_details_unimplemented.optional(), + paypal: s_destination_details_unimplemented.optional(), + pix: s_destination_details_unimplemented.optional(), + revolut: s_destination_details_unimplemented.optional(), + sofort: s_destination_details_unimplemented.optional(), + swish: s_refund_destination_details_generic.optional(), + th_bank_transfer: s_refund_destination_details_generic.optional(), + type: z.string(), + us_bank_transfer: s_refund_destination_details_generic.optional(), + wechat_pay: s_destination_details_unimplemented.optional(), + zip: s_destination_details_unimplemented.optional(), +}) + export const s_refund_next_action_display_details = z.object({ email_sent: s_email_sent, expires_at: z.coerce.number(), @@ -7045,7 +7745,7 @@ export const s_setup_intent_payment_method_options_card = z.object({ .nullable() .optional(), request_three_d_secure: z - .enum(["any", "automatic", "challenge_only"]) + .enum(["any", "automatic", "challenge"]) .nullable() .optional(), }) @@ -7057,6 +7757,8 @@ export const s_setup_intent_payment_method_options_sepa_debit = z.object({ export const s_setup_intent_payment_method_options_us_bank_account = z.object({ financial_connections: s_linked_account_options_us_bank_account.optional(), + mandate_options: + s_payment_method_options_us_bank_account_mandate_options.optional(), verification_method: z .enum(["automatic", "instant", "microdeposits"]) .optional(), @@ -7145,13 +7847,45 @@ export const s_subscription_payment_method_options_card = z.object({ ]) .nullable() .optional(), - request_three_d_secure: z.enum(["any", "automatic"]).nullable().optional(), + request_three_d_secure: z + .enum(["any", "automatic", "challenge"]) + .nullable() + .optional(), }) export const s_subscriptions_trials_resource_trial_settings = z.object({ end_behavior: s_subscriptions_trials_resource_end_behavior, }) +export const s_tax_product_registrations_resource_country_options_canada = + z.object({ + province_standard: + s_tax_product_registrations_resource_country_options_ca_province_standard.optional(), + type: z.enum(["province_standard", "simplified", "standard"]), + }) + +export const s_tax_product_registrations_resource_country_options_europe = + z.object({ + standard: + s_tax_product_registrations_resource_country_options_eu_standard.optional(), + type: z.enum(["ioss", "oss_non_union", "oss_union", "standard"]), + }) + +export const s_tax_product_registrations_resource_country_options_united_states = + z.object({ + local_amusement_tax: + s_tax_product_registrations_resource_country_options_us_local_amusement_tax.optional(), + local_lease_tax: + s_tax_product_registrations_resource_country_options_us_local_lease_tax.optional(), + state: z.string(), + type: z.enum([ + "local_amusement_tax", + "local_lease_tax", + "state_communications_tax", + "state_sales_tax", + ]), + }) + export const s_tax_product_resource_customer_details = z.object({ address: s_tax_product_resource_postal_address.nullable().optional(), address_source: z.enum(["billing", "shipping"]).nullable().optional(), @@ -7277,6 +8011,7 @@ export const s_terminal_reader_reader_resource_cart = z.object({ }) export const s_terminal_reader_reader_resource_process_config = z.object({ + enable_customer_cancellation: z.coerce.boolean().optional(), skip_tipping: z.coerce.boolean().optional(), tipping: s_terminal_reader_reader_resource_tipping_config.optional(), }) @@ -7336,15 +8071,6 @@ export const s_usage_record_summary = z.object({ total_usage: z.coerce.number(), }) -export const s_account_session = z.object({ - account: z.string(), - client_secret: z.string(), - components: s_connect_embedded_account_session_create_components, - expires_at: z.coerce.number(), - livemode: z.coerce.boolean(), - object: z.enum(["account_session"]), -}) - export const s_balance_detail = z.object({ available: z.array(s_balance_amount), }) @@ -7361,6 +8087,39 @@ export const s_checkout_customer_balance_payment_method_options = z.object({ setup_future_usage: z.enum(["none"]).optional(), }) +export const s_climate_product = z.object({ + created: z.coerce.number(), + current_prices_per_metric_ton: z.record(s_climate_removals_products_price), + delivery_year: z.coerce.number().nullable().optional(), + id: z.string(), + livemode: z.coerce.boolean(), + metric_tons_available: z.string(), + name: z.string(), + object: z.enum(["climate.product"]), + suppliers: z.array(s_climate_supplier), +}) + +export const s_climate_removals_order_deliveries = z.object({ + delivered_at: z.coerce.number(), + location: s_climate_removals_location.nullable().optional(), + metric_tons: z.string(), + registry_url: z.string().nullable().optional(), + supplier: s_climate_supplier, +}) + +export const s_confirmation_tokens_resource_mandate_data = z.object({ + customer_acceptance: + s_confirmation_tokens_resource_mandate_data_resource_customer_acceptance, +}) + +export const s_connect_embedded_account_session_create_components = z.object({ + account_onboarding: s_connect_embedded_account_config, + documents: s_connect_embedded_base_config_claim, + payment_details: s_connect_embedded_payments_config, + payments: s_connect_embedded_payments_config, + payouts: s_connect_embedded_payouts_config, +}) + export const s_country_spec = z.object({ default_currency: z.string(), id: z.string(), @@ -7378,6 +8137,22 @@ export const s_customer_balance_resource_cash_balance_transaction_resource_funde s_customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer, }) +export const s_forwarding_request = z.object({ + config: z.string(), + created: z.coerce.number(), + id: z.string(), + livemode: z.coerce.boolean(), + object: z.enum(["forwarding.request"]), + payment_method: z.string(), + replacements: z.array( + z.enum(["card_cvc", "card_expiry", "card_number", "cardholder_name"]), + ), + request_context: s_forwarded_request_context.nullable().optional(), + request_details: s_forwarded_request_details.nullable().optional(), + response_details: s_forwarded_response_details.nullable().optional(), + url: z.string().nullable().optional(), +}) + export const s_funding_instructions_bank_transfer = z.object({ country: z.string(), financial_addresses: z.array( @@ -7387,31 +8162,36 @@ export const s_funding_instructions_bank_transfer = z.object({ }) export const s_identity_verification_report = z.object({ + client_reference_id: z.string().nullable().optional(), created: z.coerce.number(), document: s_gelato_document_report.optional(), + email: s_gelato_email_report.optional(), id: z.string(), id_number: s_gelato_id_number_report.optional(), livemode: z.coerce.boolean(), object: z.enum(["identity.verification_report"]), options: s_gelato_verification_report_options.optional(), + phone: s_gelato_phone_report.optional(), selfie: s_gelato_selfie_report.optional(), - type: z.enum(["document", "id_number"]).optional(), + type: z.enum(["document", "id_number", "verification_flow"]), + verification_flow: z.string().optional(), verification_session: z.string().nullable().optional(), }) -export const s_inbound_transfers = z.object({ - billing_details: s_treasury_shared_resource_billing_details, - type: z.enum(["us_bank_account"]), - us_bank_account: - s_inbound_transfers_payment_method_details_us_bank_account.optional(), -}) - export const s_invoice_payment_method_options_customer_balance = z.object({ bank_transfer: s_invoice_payment_method_options_customer_balance_bank_transfer.optional(), funding_type: z.enum(["bank_transfer"]).nullable().optional(), }) +export const s_issuing_network_token_network_data = z.object({ + device: s_issuing_network_token_device.optional(), + mastercard: s_issuing_network_token_mastercard.optional(), + type: z.enum(["mastercard", "visa"]), + visa: s_issuing_network_token_visa.optional(), + wallet_provider: s_issuing_network_token_wallet_provider.optional(), +}) + export const s_issuing_transaction_purchase_details = z.object({ flight: s_issuing_transaction_flight_data.nullable().optional(), fuel: s_issuing_transaction_fuel_data.nullable().optional(), @@ -7420,22 +8200,6 @@ export const s_issuing_transaction_purchase_details = z.object({ reference: z.string().nullable().optional(), }) -export const s_outbound_payments_payment_method_details = z.object({ - billing_details: s_treasury_shared_resource_billing_details, - financial_account: - s_outbound_payments_payment_method_details_financial_account.optional(), - type: z.enum(["financial_account", "us_bank_account"]), - us_bank_account: - s_outbound_payments_payment_method_details_us_bank_account.optional(), -}) - -export const s_outbound_transfers_payment_method_details = z.object({ - billing_details: s_treasury_shared_resource_billing_details, - type: z.enum(["us_bank_account"]), - us_bank_account: - s_outbound_transfers_payment_method_details_us_bank_account.optional(), -}) - export const s_payment_intent_next_action_display_bank_transfer_instructions = z.object({ amount_remaining: z.coerce.number().nullable().optional(), @@ -7484,10 +8248,17 @@ export const s_payment_intent_payment_method_options_card = z.object({ ]) .nullable() .optional(), + request_extended_authorization: z.enum(["if_available", "never"]).optional(), + request_incremental_authorization: z + .enum(["if_available", "never"]) + .optional(), + request_multicapture: z.enum(["if_available", "never"]).optional(), + request_overcapture: z.enum(["if_available", "never"]).optional(), request_three_d_secure: z - .enum(["any", "automatic", "challenge_only"]) + .enum(["any", "automatic", "challenge"]) .nullable() .optional(), + require_cvc_recollection: z.coerce.boolean().optional(), setup_future_usage: z.enum(["none", "off_session", "on_session"]).optional(), statement_descriptor_suffix_kana: z.string().optional(), statement_descriptor_suffix_kanji: z.string().optional(), @@ -7502,6 +8273,7 @@ export const s_payment_intent_type_specific_payment_method_options_client = z.object({ capture_method: z.enum(["manual", "manual_preferred"]).optional(), installments: s_payment_flows_installment_options.optional(), + require_cvc_recollection: z.coerce.boolean().optional(), setup_future_usage: z .enum(["none", "off_session", "on_session"]) .optional(), @@ -7511,14 +8283,12 @@ export const s_payment_intent_type_specific_payment_method_options_client = }) export const s_payment_links_resource_custom_fields = z.object({ - dropdown: s_payment_links_resource_custom_fields_dropdown - .nullable() - .optional(), + dropdown: s_payment_links_resource_custom_fields_dropdown.optional(), key: z.string(), label: s_payment_links_resource_custom_fields_label, - numeric: s_payment_links_resource_custom_fields_numeric.nullable().optional(), + numeric: s_payment_links_resource_custom_fields_numeric.optional(), optional: z.coerce.boolean(), - text: s_payment_links_resource_custom_fields_text.nullable().optional(), + text: s_payment_links_resource_custom_fields_text.optional(), type: z.enum(["dropdown", "numeric", "text"]), }) @@ -7567,6 +8337,8 @@ export const s_payment_method_configuration = z.object({ s_payment_method_config_resource_payment_method_properties.optional(), cashapp: s_payment_method_config_resource_payment_method_properties.optional(), + customer_balance: + s_payment_method_config_resource_payment_method_properties.optional(), eps: s_payment_method_config_resource_payment_method_properties.optional(), fpx: s_payment_method_config_resource_payment_method_properties.optional(), giropay: @@ -7576,8 +8348,6 @@ export const s_payment_method_configuration = z.object({ grabpay: s_payment_method_config_resource_payment_method_properties.optional(), id: z.string(), - id_bank_transfer: - s_payment_method_config_resource_payment_method_properties.optional(), ideal: s_payment_method_config_resource_payment_method_properties.optional(), is_default: z.coerce.boolean(), jcb: s_payment_method_config_resource_payment_method_properties.optional(), @@ -7586,29 +8356,25 @@ export const s_payment_method_configuration = z.object({ s_payment_method_config_resource_payment_method_properties.optional(), link: s_payment_method_config_resource_payment_method_properties.optional(), livemode: z.coerce.boolean(), - multibanco: - s_payment_method_config_resource_payment_method_properties.optional(), name: z.string(), - netbanking: - s_payment_method_config_resource_payment_method_properties.optional(), object: z.enum(["payment_method_configuration"]), oxxo: s_payment_method_config_resource_payment_method_properties.optional(), p24: s_payment_method_config_resource_payment_method_properties.optional(), parent: z.string().nullable().optional(), - pay_by_bank: - s_payment_method_config_resource_payment_method_properties.optional(), paynow: s_payment_method_config_resource_payment_method_properties.optional(), paypal: s_payment_method_config_resource_payment_method_properties.optional(), promptpay: s_payment_method_config_resource_payment_method_properties.optional(), + revolut_pay: + s_payment_method_config_resource_payment_method_properties.optional(), sepa_debit: s_payment_method_config_resource_payment_method_properties.optional(), sofort: s_payment_method_config_resource_payment_method_properties.optional(), - upi: s_payment_method_config_resource_payment_method_properties.optional(), us_bank_account: s_payment_method_config_resource_payment_method_properties.optional(), wechat_pay: s_payment_method_config_resource_payment_method_properties.optional(), + zip: s_payment_method_config_resource_payment_method_properties.optional(), }) export const s_payment_method_details_card_wallet = z.object({ @@ -7667,18 +8433,12 @@ export const s_payment_method_us_bank_account = z.object({ }) export const s_payment_pages_checkout_session_custom_fields = z.object({ - dropdown: s_payment_pages_checkout_session_custom_fields_dropdown - .nullable() - .optional(), + dropdown: s_payment_pages_checkout_session_custom_fields_dropdown.optional(), key: z.string(), label: s_payment_pages_checkout_session_custom_fields_label, - numeric: s_payment_pages_checkout_session_custom_fields_numeric - .nullable() - .optional(), + numeric: s_payment_pages_checkout_session_custom_fields_numeric.optional(), optional: z.coerce.boolean(), - text: s_payment_pages_checkout_session_custom_fields_text - .nullable() - .optional(), + text: s_payment_pages_checkout_session_custom_fields_text.optional(), type: z.enum(["dropdown", "numeric", "text"]), }) @@ -7687,7 +8447,6 @@ export const s_portal_features = z.object({ invoice_history: s_portal_invoice_list, payment_method_update: s_portal_payment_method_update, subscription_cancel: s_portal_subscription_cancel, - subscription_pause: s_portal_subscription_pause, subscription_update: s_portal_subscription_update, }) @@ -7703,7 +8462,9 @@ export const s_refund_next_action = z.object({ export const s_setup_attempt_payment_method_details_card = z.object({ brand: z.string().nullable().optional(), - checks: s_payment_method_details_card_checks.nullable().optional(), + checks: s_setup_attempt_payment_method_details_card_checks + .nullable() + .optional(), country: z.string().nullable().optional(), exp_month: z.coerce.number().nullable().optional(), exp_year: z.coerce.number().nullable().optional(), @@ -7735,6 +8496,12 @@ export const s_setup_intent_payment_method_options = z.object({ ]) .optional(), card: s_setup_intent_payment_method_options_card.optional(), + card_present: z + .union([ + s_setup_intent_payment_method_options_card_present, + s_setup_intent_type_specific_payment_method_options_client, + ]) + .optional(), link: z .union([ s_setup_intent_payment_method_options_link, @@ -7804,6 +8571,58 @@ export const s_tax_calculation_line_item = z.object({ tax_code: z.string(), }) +export const s_tax_product_registrations_resource_country_options = z.object({ + ae: s_tax_product_registrations_resource_country_options_default.optional(), + at: s_tax_product_registrations_resource_country_options_europe.optional(), + au: s_tax_product_registrations_resource_country_options_default.optional(), + be: s_tax_product_registrations_resource_country_options_europe.optional(), + bg: s_tax_product_registrations_resource_country_options_europe.optional(), + ca: s_tax_product_registrations_resource_country_options_canada.optional(), + ch: s_tax_product_registrations_resource_country_options_default.optional(), + cl: s_tax_product_registrations_resource_country_options_simplified.optional(), + co: s_tax_product_registrations_resource_country_options_simplified.optional(), + cy: s_tax_product_registrations_resource_country_options_europe.optional(), + cz: s_tax_product_registrations_resource_country_options_europe.optional(), + de: s_tax_product_registrations_resource_country_options_europe.optional(), + dk: s_tax_product_registrations_resource_country_options_europe.optional(), + ee: s_tax_product_registrations_resource_country_options_europe.optional(), + es: s_tax_product_registrations_resource_country_options_europe.optional(), + fi: s_tax_product_registrations_resource_country_options_europe.optional(), + fr: s_tax_product_registrations_resource_country_options_europe.optional(), + gb: s_tax_product_registrations_resource_country_options_default.optional(), + gr: s_tax_product_registrations_resource_country_options_europe.optional(), + hr: s_tax_product_registrations_resource_country_options_europe.optional(), + hu: s_tax_product_registrations_resource_country_options_europe.optional(), + id: s_tax_product_registrations_resource_country_options_simplified.optional(), + ie: s_tax_product_registrations_resource_country_options_europe.optional(), + is: s_tax_product_registrations_resource_country_options_default.optional(), + it: s_tax_product_registrations_resource_country_options_europe.optional(), + jp: s_tax_product_registrations_resource_country_options_default.optional(), + kr: s_tax_product_registrations_resource_country_options_simplified.optional(), + lt: s_tax_product_registrations_resource_country_options_europe.optional(), + lu: s_tax_product_registrations_resource_country_options_europe.optional(), + lv: s_tax_product_registrations_resource_country_options_europe.optional(), + mt: s_tax_product_registrations_resource_country_options_europe.optional(), + mx: s_tax_product_registrations_resource_country_options_simplified.optional(), + my: s_tax_product_registrations_resource_country_options_simplified.optional(), + nl: s_tax_product_registrations_resource_country_options_europe.optional(), + no: s_tax_product_registrations_resource_country_options_default.optional(), + nz: s_tax_product_registrations_resource_country_options_default.optional(), + pl: s_tax_product_registrations_resource_country_options_europe.optional(), + pt: s_tax_product_registrations_resource_country_options_europe.optional(), + ro: s_tax_product_registrations_resource_country_options_europe.optional(), + sa: s_tax_product_registrations_resource_country_options_simplified.optional(), + se: s_tax_product_registrations_resource_country_options_europe.optional(), + sg: s_tax_product_registrations_resource_country_options_default.optional(), + si: s_tax_product_registrations_resource_country_options_europe.optional(), + sk: s_tax_product_registrations_resource_country_options_europe.optional(), + th: s_tax_product_registrations_resource_country_options_simplified.optional(), + tr: s_tax_product_registrations_resource_country_options_simplified.optional(), + us: s_tax_product_registrations_resource_country_options_united_states.optional(), + vn: s_tax_product_registrations_resource_country_options_simplified.optional(), + za: s_tax_product_registrations_resource_country_options_default.optional(), +}) + export const s_tax_product_resource_tax_calculation_shipping_cost = z.object({ amount: z.coerce.number(), amount_tax: z.coerce.number(), @@ -7903,10 +8722,19 @@ export const s_treasury_shared_resource_initiating_payment_method_details_initia s_treasury_shared_resource_initiating_payment_method_details_us_bank_account.optional(), }) +export const s_account_session = z.object({ + account: z.string(), + client_secret: z.string(), + components: s_connect_embedded_account_session_create_components, + expires_at: z.coerce.number(), + livemode: z.coerce.boolean(), + object: z.enum(["account_session"]), +}) + export const s_balance = z.object({ available: z.array(s_balance_amount), connect_reserved: z.array(s_balance_amount).optional(), - instant_available: z.array(s_balance_amount).optional(), + instant_available: z.array(s_balance_amount_net).optional(), issuing: s_balance_detail.optional(), livemode: z.coerce.boolean(), object: z.enum(["balance"]), @@ -7957,12 +8785,49 @@ export const s_checkout_session_payment_method_options = z.object({ oxxo: s_checkout_oxxo_payment_method_options.optional(), p24: s_checkout_p24_payment_method_options.optional(), paynow: s_checkout_paynow_payment_method_options.optional(), + paypal: s_checkout_paypal_payment_method_options.optional(), pix: s_checkout_pix_payment_method_options.optional(), + revolut_pay: s_checkout_revolut_pay_payment_method_options.optional(), sepa_debit: s_checkout_sepa_debit_payment_method_options.optional(), sofort: s_checkout_sofort_payment_method_options.optional(), + swish: s_checkout_swish_payment_method_options.optional(), us_bank_account: s_checkout_us_bank_account_payment_method_options.optional(), }) +export const s_climate_order = z.object({ + amount_fees: z.coerce.number(), + amount_subtotal: z.coerce.number(), + amount_total: z.coerce.number(), + beneficiary: s_climate_removals_beneficiary.optional(), + canceled_at: z.coerce.number().nullable().optional(), + cancellation_reason: z + .enum(["expired", "product_unavailable", "requested"]) + .nullable() + .optional(), + certificate: z.string().nullable().optional(), + confirmed_at: z.coerce.number().nullable().optional(), + created: z.coerce.number(), + currency: z.string(), + delayed_at: z.coerce.number().nullable().optional(), + delivered_at: z.coerce.number().nullable().optional(), + delivery_details: z.array(s_climate_removals_order_deliveries), + expected_delivery_year: z.coerce.number(), + id: z.string(), + livemode: z.coerce.boolean(), + metadata: z.record(z.string()), + metric_tons: z.string(), + object: z.enum(["climate.order"]), + product: z.union([z.string(), s_climate_product]), + product_substituted_at: z.coerce.number().nullable().optional(), + status: z.enum([ + "awaiting_funds", + "canceled", + "confirmed", + "delivered", + "open", + ]), +}) + export const s_funding_instructions = z.object({ bank_transfer: s_funding_instructions_bank_transfer, currency: z.string(), @@ -7972,6 +8837,7 @@ export const s_funding_instructions = z.object({ }) export const s_identity_verification_session = z.object({ + client_reference_id: z.string().nullable().optional(), client_secret: z.string().nullable().optional(), created: z.coerce.number(), id: z.string(), @@ -7984,10 +8850,12 @@ export const s_identity_verification_session = z.object({ metadata: z.record(z.string()), object: z.enum(["identity.verification_session"]), options: s_gelato_verification_session_options.nullable().optional(), + provided_details: s_gelato_provided_details.nullable().optional(), redaction: s_verification_session_redaction.nullable().optional(), status: z.enum(["canceled", "processing", "requires_input", "verified"]), - type: z.enum(["document", "id_number"]).nullable().optional(), + type: z.enum(["document", "id_number", "verification_flow"]), url: z.string().nullable().optional(), + verification_flow: z.string().optional(), verified_outputs: s_gelato_verified_outputs.nullable().optional(), }) @@ -7999,12 +8867,13 @@ export const s_invoices_payment_method_options = z.object({ .nullable() .optional(), konbini: s_invoice_payment_method_options_konbini.nullable().optional(), + sepa_debit: s_invoice_payment_method_options_sepa_debit.nullable().optional(), us_bank_account: s_invoice_payment_method_options_us_bank_account .nullable() .optional(), }) -export const s_invoices_shipping_cost = z.object({ +export const s_invoices_resource_shipping_cost = z.object({ amount_subtotal: z.coerce.number(), amount_tax: z.coerce.number(), amount_total: z.coerce.number(), @@ -8032,6 +8901,8 @@ export const s_payment_intent_next_action = z.object({ promptpay_display_qr_code: s_payment_intent_next_action_promptpay_display_qr_code.optional(), redirect_to_url: s_payment_intent_next_action_redirect_to_url.optional(), + swish_handle_redirect_or_display_qr_code: + s_payment_intent_next_action_swish_handle_redirect_or_display_qr_code.optional(), type: z.string(), use_stripe_sdk: z.object({}).optional(), verify_with_microdeposits: @@ -8177,6 +9048,12 @@ export const s_payment_intent_payment_method_options = z.object({ s_payment_intent_type_specific_payment_method_options_client, ]) .optional(), + mobilepay: z + .union([ + s_payment_intent_payment_method_options_mobilepay, + s_payment_intent_type_specific_payment_method_options_client, + ]) + .optional(), oxxo: z .union([ s_payment_method_options_oxxo, @@ -8213,6 +9090,12 @@ export const s_payment_intent_payment_method_options = z.object({ s_payment_intent_type_specific_payment_method_options_client, ]) .optional(), + revolut_pay: z + .union([ + s_payment_method_options_revolut_pay, + s_payment_intent_type_specific_payment_method_options_client, + ]) + .optional(), sepa_debit: z .union([ s_payment_intent_payment_method_options_sepa_debit, @@ -8225,6 +9108,12 @@ export const s_payment_intent_payment_method_options = z.object({ s_payment_intent_type_specific_payment_method_options_client, ]) .optional(), + swish: z + .union([ + s_payment_intent_payment_method_options_swish, + s_payment_intent_type_specific_payment_method_options_client, + ]) + .optional(), us_bank_account: z .union([ s_payment_intent_payment_method_options_us_bank_account, @@ -8251,22 +9140,32 @@ export const s_payment_links_resource_shipping_option = z.object({ }) export const s_payment_method_details_card = z.object({ + amount_authorized: z.coerce.number().nullable().optional(), brand: z.string().nullable().optional(), + capture_before: z.coerce.number().optional(), checks: s_payment_method_details_card_checks.nullable().optional(), country: z.string().nullable().optional(), exp_month: z.coerce.number(), exp_year: z.coerce.number(), + extended_authorization: + s_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization.optional(), fingerprint: z.string().nullable().optional(), funding: z.string().nullable().optional(), + incremental_authorization: + s_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization.optional(), installments: s_payment_method_details_card_installments .nullable() .optional(), last4: z.string().nullable().optional(), mandate: z.string().nullable().optional(), + multicapture: + s_payment_flows_private_payment_methods_card_details_api_resource_multicapture.optional(), network: z.string().nullable().optional(), network_token: s_payment_method_details_card_network_token .nullable() .optional(), + overcapture: + s_payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture.optional(), three_d_secure: s_three_d_secure_details_charge.nullable().optional(), wallet: s_payment_method_details_card_wallet.nullable().optional(), }) @@ -8370,6 +9269,7 @@ export const s_subscriptions_resource_payment_method_options = z.object({ .nullable() .optional(), konbini: s_invoice_payment_method_options_konbini.nullable().optional(), + sepa_debit: s_invoice_payment_method_options_sepa_debit.nullable().optional(), us_bank_account: s_invoice_payment_method_options_us_bank_account .nullable() .optional(), @@ -8402,6 +9302,18 @@ export const s_tax_calculation = z.object({ tax_date: z.coerce.number(), }) +export const s_tax_registration = z.object({ + active_from: z.coerce.number(), + country: z.string(), + country_options: s_tax_product_registrations_resource_country_options, + created: z.coerce.number(), + expires_at: z.coerce.number().nullable().optional(), + id: z.string(), + livemode: z.coerce.boolean(), + object: z.enum(["tax.registration"]), + status: z.enum(["active", "expired", "scheduled"]), +}) + export const s_treasury_financial_account_features = z.object({ card_issuing: s_treasury_financial_accounts_resource_toggle_settings.optional(), @@ -8503,12 +9415,14 @@ export const s_invoices_payment_settings = z.object({ "card", "cashapp", "customer_balance", + "eps", "fpx", "giropay", "grabpay", "ideal", "konbini", "link", + "p24", "paynow", "paypal", "promptpay", @@ -8554,12 +9468,14 @@ export const s_subscriptions_resource_payment_settings = z.object({ "card", "cashapp", "customer_balance", + "eps", "fpx", "giropay", "grabpay", "ideal", "konbini", "link", + "p24", "paynow", "paypal", "promptpay", @@ -8769,6 +9685,7 @@ export const s_card: z.ZodType = z.object({ last4: z.string(), metadata: z.record(z.string()).nullable().optional(), name: z.string().nullable().optional(), + networks: s_token_card_networks.optional(), object: z.enum(["card"]), status: z.string().nullable().optional(), tokenization_method: z.string().nullable().optional(), @@ -8776,6 +9693,7 @@ export const s_card: z.ZodType = z.object({ export const s_person: z.ZodType = z.object({ account: z.string(), + additional_tos_acceptances: s_person_additional_tos_acceptances.optional(), address: s_address.optional(), address_kana: s_legal_entity_japan_address.nullable().optional(), address_kanji: s_legal_entity_japan_address.nullable().optional(), @@ -8895,22 +9813,23 @@ export const s_balance_transaction: z.ZodType = z.object( "application_fee", "application_fee_refund", "charge", + "climate_order_purchase", + "climate_order_refund", "connect_collection_transfer", "contribution", "issuing_authorization_hold", "issuing_authorization_release", "issuing_dispute", "issuing_transaction", - "obligation_inbound", "obligation_outbound", - "obligation_payout", - "obligation_payout_failure", "obligation_reversal_inbound", - "obligation_reversal_outbound", "payment", "payment_failure_refund", + "payment_network_reserve_hold", + "payment_network_reserve_release", "payment_refund", "payment_reversal", + "payment_unreconciled", "payout", "payout_cancel", "payout_failure", @@ -9059,6 +9978,7 @@ export const s_refund: z.ZodType = z.object({ created: z.coerce.number(), currency: z.string(), description: z.string().optional(), + destination_details: s_refund_destination_details.optional(), failure_balance_transaction: z .union([z.string(), z.lazy(() => s_balance_transaction)]) .optional(), @@ -9100,13 +10020,14 @@ export const s_checkout_session: z.ZodType = z.object({ allow_promotion_codes: z.coerce.boolean().nullable().optional(), amount_subtotal: z.coerce.number().nullable().optional(), amount_total: z.coerce.number().nullable().optional(), - automatic_tax: s_payment_pages_checkout_session_automatic_tax, + automatic_tax: z.lazy(() => s_payment_pages_checkout_session_automatic_tax), billing_address_collection: z .enum(["auto", "required"]) .nullable() .optional(), cancel_url: z.string().nullable().optional(), client_reference_id: z.string().nullable().optional(), + client_secret: z.string().nullable().optional(), consent: s_payment_pages_checkout_session_consent.nullable().optional(), consent_collection: s_payment_pages_checkout_session_consent_collection .nullable() @@ -9218,6 +10139,8 @@ export const s_checkout_session: z.ZodType = z.object({ phone_number_collection: s_payment_pages_checkout_session_phone_number_collection.optional(), recovered_from: z.string().nullable().optional(), + redirect_on_completion: z.enum(["always", "if_required", "never"]).optional(), + return_url: z.string().optional(), setup_intent: z .union([z.string(), z.lazy(() => s_setup_intent)]) .nullable() @@ -9243,6 +10166,7 @@ export const s_checkout_session: z.ZodType = z.object({ total_details: z.lazy(() => s_payment_pages_checkout_session_total_details.nullable().optional(), ), + ui_mode: z.enum(["embedded", "hosted"]).nullable().optional(), url: z.string().nullable().optional(), }) @@ -9261,6 +10185,29 @@ export const s_item: z.ZodType = z.object({ taxes: z.array(s_line_items_tax_amount).optional(), }) +export const s_confirmation_token: z.ZodType = z.object({ + created: z.coerce.number(), + expires_at: z.coerce.number().nullable().optional(), + id: z.string(), + livemode: z.coerce.boolean(), + mandate_data: s_confirmation_tokens_resource_mandate_data + .nullable() + .optional(), + object: z.enum(["confirmation_token"]), + payment_intent: z.string().nullable().optional(), + payment_method_preview: z.lazy(() => + s_confirmation_tokens_resource_payment_method_preview.nullable().optional(), + ), + return_url: z.string().nullable().optional(), + setup_future_usage: z + .enum(["off_session", "on_session"]) + .nullable() + .optional(), + setup_intent: z.string().nullable().optional(), + shipping: s_confirmation_tokens_resource_shipping.nullable().optional(), + use_stripe_sdk: z.coerce.boolean(), +}) + export const s_credit_note: z.ZodType = z.object({ amount: z.coerce.number(), amount_shipping: z.coerce.number(), @@ -9297,7 +10244,7 @@ export const s_credit_note: z.ZodType = z.object({ .union([z.string(), z.lazy(() => s_refund)]) .nullable() .optional(), - shipping_cost: s_invoices_shipping_cost.nullable().optional(), + shipping_cost: s_invoices_resource_shipping_cost.nullable().optional(), status: z.enum(["issued", "void"]), subtotal: z.coerce.number(), subtotal_excluding_tax: z.coerce.number().nullable().optional(), @@ -9330,6 +10277,16 @@ export const s_credit_note_line_item: z.ZodType = unit_amount_excluding_tax: z.string().nullable().optional(), }) +export const s_customer_session: z.ZodType = z.object({ + client_secret: z.string(), + components: s_customer_session_resource_components.optional(), + created: z.coerce.number(), + customer: z.union([z.string(), z.lazy(() => s_customer)]), + expires_at: z.coerce.number(), + livemode: z.coerce.boolean(), + object: z.enum(["customer_session"]), +}) + export const s_customer: z.ZodType = z.object({ address: s_address.nullable().optional(), balance: z.coerce.number().optional(), @@ -9457,6 +10414,9 @@ export const s_customer_cash_balance_transaction: z.ZodType s_customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction.optional(), ), + transferred_to_balance: z.lazy(() => + s_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance.optional(), + ), type: z.enum([ "adjusted_for_overdraft", "applied_to_payment", @@ -9465,6 +10425,7 @@ export const s_customer_cash_balance_transaction: z.ZodType @@ -9490,6 +10451,7 @@ export const s_deleted_discount: z.ZodType = z.object({ .optional(), start: z.coerce.number(), subscription: z.string().nullable().optional(), + subscription_item: z.string().nullable().optional(), }) export const s_discount: z.ZodType = z.object({ @@ -9510,6 +10472,7 @@ export const s_discount: z.ZodType = z.object({ .optional(), start: z.coerce.number(), subscription: z.string().nullable().optional(), + subscription_item: z.string().nullable().optional(), }) export const s_payment_method: z.ZodType = z.object({ @@ -9544,6 +10507,7 @@ export const s_payment_method: z.ZodType = z.object({ link: s_payment_method_link.optional(), livemode: z.coerce.boolean(), metadata: z.record(z.string()).nullable().optional(), + mobilepay: s_payment_method_mobilepay.optional(), object: z.enum(["payment_method"]), oxxo: s_payment_method_oxxo.optional(), p24: s_payment_method_p24.optional(), @@ -9552,8 +10516,10 @@ export const s_payment_method: z.ZodType = z.object({ pix: s_payment_method_pix.optional(), promptpay: s_payment_method_promptpay.optional(), radar_options: s_radar_radar_options.optional(), + revolut_pay: s_payment_method_revolut_pay.optional(), sepa_debit: z.lazy(() => s_payment_method_sepa_debit.optional()), sofort: s_payment_method_sofort.optional(), + swish: s_payment_method_swish.optional(), type: z.enum([ "acss_debit", "affirm", @@ -9577,14 +10543,17 @@ export const s_payment_method: z.ZodType = z.object({ "klarna", "konbini", "link", + "mobilepay", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", + "revolut_pay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", "zip", @@ -9600,8 +10569,10 @@ export const s_subscription: z.ZodType = z.object({ .nullable() .optional(), application_fee_percent: z.coerce.number().nullable().optional(), - automatic_tax: s_subscription_automatic_tax, + automatic_tax: z.lazy(() => s_subscription_automatic_tax), billing_cycle_anchor: z.coerce.number(), + billing_cycle_anchor_config: + s_subscriptions_resource_billing_cycle_anchor_config.nullable().optional(), billing_thresholds: s_subscription_billing_thresholds.nullable().optional(), cancel_at: z.coerce.number().nullable().optional(), cancel_at_period_end: z.coerce.boolean(), @@ -9630,6 +10601,7 @@ export const s_subscription: z.ZodType = z.object({ default_tax_rates: z.array(s_tax_rate).nullable().optional(), description: z.string().nullable().optional(), discount: z.lazy(() => s_discount.nullable().optional()), + discounts: z.array(z.union([z.string(), z.lazy(() => s_discount)])), ended_at: z.coerce.number().nullable().optional(), id: z.string(), items: z.object({ @@ -9705,6 +10677,7 @@ export const s_tax_id: z.ZodType = z.object({ id: z.string(), livemode: z.coerce.boolean(), object: z.enum(["tax_id"]), + owner: z.lazy(() => s_tax_i_ds_owner.nullable().optional()), type: z.enum([ "ad_nrt", "ae_trn", @@ -9751,6 +10724,7 @@ export const s_tax_id: z.ZodType = z.object({ "my_itn", "my_sst", "no_vat", + "no_voec", "nz_gst", "pe_ruc", "ph_tin", @@ -9867,9 +10841,16 @@ export const s_financial_connections_account: z.ZodType = @@ -9893,7 +10874,7 @@ export const s_financial_connections_session: z.ZodType = z.object({ attempt_count: z.coerce.number(), attempted: z.coerce.boolean(), auto_advance: z.coerce.boolean().optional(), - automatic_tax: s_automatic_tax, + automatic_tax: z.lazy(() => s_automatic_tax), billing_reason: z .enum([ "automatic_pending_invoice_item_invoice", @@ -10011,24 +10992,24 @@ export const s_invoice: z.ZodType = z.object({ default_tax_rates: z.array(s_tax_rate), description: z.string().nullable().optional(), discount: z.lazy(() => s_discount.nullable().optional()), - discounts: z - .array( - z.union([ - z.string(), - z.lazy(() => s_discount), - z.lazy(() => s_deleted_discount), - ]), - ) - .nullable() - .optional(), + discounts: z.array( + z.union([ + z.string(), + z.lazy(() => s_discount), + z.lazy(() => s_deleted_discount), + ]), + ), due_date: z.coerce.number().nullable().optional(), effective_at: z.coerce.number().nullable().optional(), ending_balance: z.coerce.number().nullable().optional(), footer: z.string().nullable().optional(), - from_invoice: z.lazy(() => s_invoices_from_invoice.nullable().optional()), + from_invoice: z.lazy(() => + s_invoices_resource_from_invoice.nullable().optional(), + ), hosted_invoice_url: z.string().nullable().optional(), id: z.string().optional(), invoice_pdf: z.string().nullable().optional(), + issuer: z.lazy(() => s_connect_account_reference), last_finalization_error: z.lazy(() => s_api_errors.nullable().optional()), latest_revision: z .union([z.string(), z.lazy(() => s_invoice)]) @@ -10065,9 +11046,8 @@ export const s_invoice: z.ZodType = z.object({ .nullable() .optional(), receipt_number: z.string().nullable().optional(), - rendering: s_invoices_invoice_rendering.nullable().optional(), - rendering_options: s_invoice_setting_rendering_options.nullable().optional(), - shipping_cost: s_invoices_shipping_cost.nullable().optional(), + rendering: s_invoices_resource_invoice_rendering.nullable().optional(), + shipping_cost: s_invoices_resource_shipping_cost.nullable().optional(), shipping_details: s_shipping.nullable().optional(), starting_balance: z.coerce.number(), statement_descriptor: z.string().nullable().optional(), @@ -10075,7 +11055,7 @@ export const s_invoice: z.ZodType = z.object({ .enum(["draft", "open", "paid", "uncollectible", "void"]) .nullable() .optional(), - status_transitions: s_invoices_status_transitions, + status_transitions: s_invoices_resource_status_transitions, subscription: z .union([z.string(), z.lazy(() => s_subscription)]) .nullable() @@ -10111,11 +11091,9 @@ export const s_line_item: z.ZodType = z.object({ .nullable() .optional(), discountable: z.coerce.boolean(), - discounts: z - .array(z.union([z.string(), z.lazy(() => s_discount)])) - .nullable() - .optional(), + discounts: z.array(z.union([z.string(), z.lazy(() => s_discount)])), id: z.string(), + invoice: z.string().nullable().optional(), invoice_item: z.union([z.string(), z.lazy(() => s_invoiceitem)]).optional(), livemode: z.coerce.boolean(), metadata: z.record(z.string()), @@ -10175,6 +11153,10 @@ export const s_issuing_authorization: z.ZodType = .optional(), request_history: z.array(s_issuing_authorization_request), status: z.enum(["closed", "pending", "reversed"]), + token: z + .union([z.string(), z.lazy(() => s_issuing_token)]) + .nullable() + .optional(), transactions: z.array(z.lazy(() => s_issuing_transaction)), treasury: s_issuing_authorization_treasury.nullable().optional(), verification_data: s_issuing_authorization_verification_data, @@ -10226,6 +11208,10 @@ export const s_issuing_card: z.ZodType = z.object({ metadata: z.record(z.string()), number: z.string().optional(), object: z.enum(["issuing.card"]), + personalization_design: z + .union([z.string(), z.lazy(() => s_issuing_personalization_design)]) + .nullable() + .optional(), replaced_by: z .union([z.string(), z.lazy(() => s_issuing_card)]) .nullable() @@ -10263,6 +11249,45 @@ export const s_issuing_dispute: z.ZodType = z.object({ treasury: s_issuing_dispute_treasury.nullable().optional(), }) +export const s_issuing_personalization_design: z.ZodType = + z.object({ + card_logo: z + .union([z.string(), z.lazy(() => s_file)]) + .nullable() + .optional(), + carrier_text: s_issuing_personalization_design_carrier_text + .nullable() + .optional(), + created: z.coerce.number(), + id: z.string(), + livemode: z.coerce.boolean(), + lookup_key: z.string().nullable().optional(), + metadata: z.record(z.string()), + name: z.string().nullable().optional(), + object: z.enum(["issuing.personalization_design"]), + physical_bundle: z.union([z.string(), s_issuing_physical_bundle]), + preferences: s_issuing_personalization_design_preferences, + rejection_reasons: s_issuing_personalization_design_rejection_reasons, + status: z.enum(["active", "inactive", "rejected", "review"]), + }) + +export const s_issuing_token: z.ZodType = z.object({ + card: z.union([z.string(), z.lazy(() => s_issuing_card)]), + created: z.coerce.number(), + device_fingerprint: z.string().nullable().optional(), + id: z.string(), + last4: z.string().optional(), + livemode: z.coerce.boolean(), + network: z.enum(["mastercard", "visa"]), + network_data: s_issuing_network_token_network_data.optional(), + network_updated_at: z.coerce.number(), + object: z.enum(["issuing.token"]), + status: z.enum(["active", "deleted", "requested", "suspended"]), + wallet_provider: z + .enum(["apple_pay", "google_pay", "samsung_pay"]) + .optional(), +}) + export const s_issuing_transaction: z.ZodType = z.object( { amount: z.coerce.number(), @@ -10292,10 +11317,15 @@ export const s_issuing_transaction: z.ZodType = z.object( merchant_currency: z.string(), merchant_data: s_issuing_authorization_merchant_data, metadata: z.record(z.string()), + network_data: s_issuing_transaction_network_data.nullable().optional(), object: z.enum(["issuing.transaction"]), purchase_details: s_issuing_transaction_purchase_details .nullable() .optional(), + token: z + .union([z.string(), z.lazy(() => s_issuing_token)]) + .nullable() + .optional(), treasury: s_issuing_transaction_treasury.nullable().optional(), type: z.enum(["capture", "refund"]), wallet: z @@ -10419,7 +11449,7 @@ export const s_payment_link: z.ZodType = z.object({ .optional(), application_fee_amount: z.coerce.number().nullable().optional(), application_fee_percent: z.coerce.number().nullable().optional(), - automatic_tax: s_payment_links_resource_automatic_tax, + automatic_tax: z.lazy(() => s_payment_links_resource_automatic_tax), billing_address_collection: z.enum(["auto", "required"]), consent_collection: s_payment_links_resource_consent_collection .nullable() @@ -10429,6 +11459,7 @@ export const s_payment_link: z.ZodType = z.object({ custom_text: s_payment_links_resource_custom_text, customer_creation: z.enum(["always", "if_required"]), id: z.string(), + inactive_message: z.string().nullable().optional(), invoice_creation: z.lazy(() => s_payment_links_resource_invoice_creation.nullable().optional(), ), @@ -10480,6 +11511,7 @@ export const s_payment_link: z.ZodType = z.object({ "promptpay", "sepa_debit", "sofort", + "swish", "us_bank_account", "wechat_pay", ]), @@ -10487,13 +11519,14 @@ export const s_payment_link: z.ZodType = z.object({ .nullable() .optional(), phone_number_collection: s_payment_links_resource_phone_number_collection, + restrictions: s_payment_links_resource_restrictions.nullable().optional(), shipping_address_collection: s_payment_links_resource_shipping_address_collection.nullable().optional(), shipping_options: z.array(s_payment_links_resource_shipping_option), submit_type: z.enum(["auto", "book", "donate", "pay"]), - subscription_data: s_payment_links_resource_subscription_data - .nullable() - .optional(), + subscription_data: z.lazy(() => + s_payment_links_resource_subscription_data.nullable().optional(), + ), tax_id_collection: s_payment_links_resource_tax_id_collection, transfer_data: z.lazy(() => s_payment_links_resource_transfer_data.nullable().optional(), @@ -10564,6 +11597,7 @@ export const s_plan: z.ZodType = z.object({ interval_count: z.coerce.number(), livemode: z.coerce.boolean(), metadata: z.record(z.string()).nullable().optional(), + meter: z.string().nullable().optional(), nickname: z.string().nullable().optional(), object: z.enum(["plan"]), product: z @@ -10612,7 +11646,7 @@ export const s_product: z.ZodType = z.object({ .nullable() .optional(), description: z.string().nullable().optional(), - features: z.array(s_product_feature), + features: z.array(s_product_marketing_feature), id: z.string(), images: z.array(z.string()), livemode: z.coerce.boolean(), @@ -10656,7 +11690,7 @@ export const s_quote: z.ZodType = z.object({ .optional(), application_fee_amount: z.coerce.number().nullable().optional(), application_fee_percent: z.coerce.number().nullable().optional(), - automatic_tax: s_quotes_resource_automatic_tax, + automatic_tax: z.lazy(() => s_quotes_resource_automatic_tax), collection_method: z.enum(["charge_automatically", "send_invoice"]), computed: z.lazy(() => s_quotes_resource_computed), created: z.coerce.number(), @@ -10677,7 +11711,7 @@ export const s_quote: z.ZodType = z.object({ .union([z.string(), z.lazy(() => s_invoice), s_deleted_invoice]) .nullable() .optional(), - invoice_settings: s_invoice_setting_quote_setting.nullable().optional(), + invoice_settings: z.lazy(() => s_invoice_setting_quote_setting), line_items: z .object({ data: z.array(z.lazy(() => s_item)), @@ -10883,6 +11917,7 @@ export const s_subscription_item: z.ZodType = z.object({ .nullable() .optional(), created: z.coerce.number(), + discounts: z.array(z.union([z.string(), z.lazy(() => s_discount)])), id: z.string(), metadata: z.record(z.string()), object: z.enum(["subscription_item"]), @@ -10943,7 +11978,10 @@ export const s_terminal_configuration: z.ZodType = id: z.string(), is_account_default: z.coerce.boolean().nullable().optional(), livemode: z.coerce.boolean(), + name: z.string().nullable().optional(), object: z.enum(["terminal.configuration"]), + offline: + s_terminal_configuration_configuration_resource_offline_config.optional(), tipping: s_terminal_configuration_configuration_resource_tipping.optional(), verifone_p400: z.lazy(() => s_terminal_configuration_configuration_resource_device_type_specific_config.optional(), @@ -10959,6 +11997,7 @@ export const s_terminal_reader: z.ZodType = z.object({ "bbpos_chipper2x", "bbpos_wisepad3", "bbpos_wisepos_e", + "mobile_phone_reader", "simulated_wisepos_e", "stripe_m2", "verifone_P400", @@ -10971,7 +12010,7 @@ export const s_terminal_reader: z.ZodType = z.object({ metadata: z.record(z.string()), object: z.enum(["terminal.reader"]), serial_number: z.string(), - status: z.string().nullable().optional(), + status: z.enum(["offline", "online"]).nullable().optional(), }) export const s_treasury_inbound_transfer: z.ZodType = @@ -10993,7 +12032,9 @@ export const s_treasury_inbound_transfer: z.ZodType metadata: z.record(z.string()), object: z.enum(["treasury.inbound_transfer"]), origin_payment_method: z.string(), - origin_payment_method_details: s_inbound_transfers.nullable().optional(), + origin_payment_method_details: z.lazy(() => + s_inbound_transfers.nullable().optional(), + ), returned: z.coerce.boolean().nullable().optional(), statement_descriptor: z.string(), status: z.enum(["canceled", "failed", "processing", "succeeded"]), @@ -11014,8 +12055,9 @@ export const s_treasury_outbound_payment: z.ZodType customer: z.string().nullable().optional(), description: z.string().nullable().optional(), destination_payment_method: z.string().nullable().optional(), - destination_payment_method_details: + destination_payment_method_details: z.lazy(() => s_outbound_payments_payment_method_details.nullable().optional(), + ), end_user_details: s_treasury_outbound_payments_resource_outbound_payment_resource_end_user_details .nullable() @@ -11047,8 +12089,9 @@ export const s_treasury_outbound_transfer: z.ZodType s_outbound_transfers_payment_method_details, + ), expected_arrival_date: z.coerce.number(), financial_account: z.string(), hosted_regulatory_receipt_url: z.string().nullable().optional(), @@ -11386,6 +12429,7 @@ export const s_legal_entity_company: z.ZodType = "public_company", "public_corporation", "public_partnership", + "registered_charity", "single_member_llc", "sole_establishment", "sole_proprietorship", @@ -11409,6 +12453,7 @@ export const s_account_settings: z.ZodType = z.object({ card_issuing: s_account_card_issuing_settings.optional(), card_payments: s_account_card_payments_settings, dashboard: s_account_dashboard_settings, + invoices: z.lazy(() => s_account_invoices_settings.optional()), payments: s_account_payments_settings, payouts: s_account_payout_settings.optional(), sepa_debit_payments: s_account_sepa_debit_payments_settings.optional(), @@ -11488,6 +12533,7 @@ export const s_payment_method_details: z.ZodType = klarna: s_payment_method_details_klarna.optional(), konbini: s_payment_method_details_konbini.optional(), link: s_payment_method_details_link.optional(), + mobilepay: s_payment_method_details_mobilepay.optional(), multibanco: s_payment_method_details_multibanco.optional(), oxxo: s_payment_method_details_oxxo.optional(), p24: s_payment_method_details_p24.optional(), @@ -11495,11 +12541,15 @@ export const s_payment_method_details: z.ZodType = paypal: s_payment_method_details_paypal.optional(), pix: s_payment_method_details_pix.optional(), promptpay: s_payment_method_details_promptpay.optional(), + revolut_pay: s_payment_method_details_revolut_pay.optional(), sepa_debit: s_payment_method_details_sepa_debit.optional(), sofort: z.lazy(() => s_payment_method_details_sofort.optional()), stripe_account: s_payment_method_details_stripe_account.optional(), + swish: s_payment_method_details_swish.optional(), type: z.string(), - us_bank_account: s_payment_method_details_us_bank_account.optional(), + us_bank_account: z.lazy(() => + s_payment_method_details_us_bank_account.optional(), + ), wechat: s_payment_method_details_wechat.optional(), wechat_pay: s_payment_method_details_wechat_pay.optional(), zip: s_payment_method_details_zip.optional(), @@ -11568,6 +12618,16 @@ export const s_dispute_evidence: z.ZodType = z.object({ uncategorized_text: z.string().nullable().optional(), }) +export const s_payment_pages_checkout_session_automatic_tax: z.ZodType = + z.object({ + enabled: z.coerce.boolean(), + liability: z.lazy(() => s_connect_account_reference.nullable().optional()), + status: z + .enum(["complete", "failed", "requires_location_inputs"]) + .nullable() + .optional(), + }) + export const s_payment_pages_checkout_session_invoice_creation: z.ZodType = z.object({ enabled: z.coerce.boolean(), @@ -11589,6 +12649,85 @@ export const s_payment_pages_checkout_session_total_details: z.ZodType = z.object({ amount: z.coerce.number(), discount: z.lazy(() => s_discount) }) +export const s_confirmation_tokens_resource_payment_method_preview: z.ZodType = + z.object({ + acss_debit: s_payment_method_acss_debit.optional(), + affirm: s_payment_method_affirm.optional(), + afterpay_clearpay: s_payment_method_afterpay_clearpay.optional(), + alipay: s_payment_flows_private_payment_methods_alipay.optional(), + au_becs_debit: s_payment_method_au_becs_debit.optional(), + bacs_debit: s_payment_method_bacs_debit.optional(), + bancontact: s_payment_method_bancontact.optional(), + billing_details: s_billing_details, + blik: s_payment_method_blik.optional(), + boleto: s_payment_method_boleto.optional(), + card: z.lazy(() => s_payment_method_card.optional()), + card_present: s_payment_method_card_present.optional(), + cashapp: s_payment_method_cashapp.optional(), + customer_balance: s_payment_method_customer_balance.optional(), + eps: s_payment_method_eps.optional(), + fpx: s_payment_method_fpx.optional(), + giropay: s_payment_method_giropay.optional(), + grabpay: s_payment_method_grabpay.optional(), + ideal: s_payment_method_ideal.optional(), + interac_present: s_payment_method_interac_present.optional(), + klarna: s_payment_method_klarna.optional(), + konbini: s_payment_method_konbini.optional(), + link: s_payment_method_link.optional(), + mobilepay: s_payment_method_mobilepay.optional(), + oxxo: s_payment_method_oxxo.optional(), + p24: s_payment_method_p24.optional(), + paynow: s_payment_method_paynow.optional(), + paypal: s_payment_method_paypal.optional(), + pix: s_payment_method_pix.optional(), + promptpay: s_payment_method_promptpay.optional(), + revolut_pay: s_payment_method_revolut_pay.optional(), + sepa_debit: z.lazy(() => s_payment_method_sepa_debit.optional()), + sofort: s_payment_method_sofort.optional(), + swish: s_payment_method_swish.optional(), + type: z.enum([ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "klarna", + "konbini", + "link", + "mobilepay", + "oxxo", + "p24", + "paynow", + "paypal", + "pix", + "promptpay", + "revolut_pay", + "sepa_debit", + "sofort", + "swish", + "us_bank_account", + "wechat_pay", + "zip", + ]), + us_bank_account: s_payment_method_us_bank_account.optional(), + wechat_pay: s_payment_method_wechat_pay.optional(), + zip: s_payment_method_zip.optional(), + }) + export const s_discounts_resource_discount_amount: z.ZodType = z.object({ amount: z.coerce.number(), @@ -11635,6 +12774,14 @@ export const s_customer_balance_resource_cash_balance_transaction_resource_appli export const s_customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction: z.ZodType = z.object({ refund: z.union([z.string(), z.lazy(() => s_refund)]) }) +export const s_customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance: z.ZodType = + z.object({ + balance_transaction: z.union([ + z.string(), + z.lazy(() => s_balance_transaction), + ]), + }) + export const s_customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction: z.ZodType = z.object({ payment_intent: z.union([z.string(), z.lazy(() => s_payment_intent)]), @@ -11645,6 +12792,7 @@ export const s_payment_method_card: z.ZodType = z.object( brand: z.string(), checks: s_payment_method_card_checks.nullable().optional(), country: z.string().nullable().optional(), + display_brand: z.string().nullable().optional(), exp_month: z.coerce.number(), exp_year: z.coerce.number(), fingerprint: z.string().nullable().optional(), @@ -11671,6 +12819,12 @@ export const s_payment_method_sepa_debit: z.ZodType last4: z.string().nullable().optional(), }) +export const s_subscription_automatic_tax: z.ZodType = + z.object({ + enabled: z.coerce.boolean(), + liability: z.lazy(() => s_connect_account_reference.nullable().optional()), + }) + export const s_subscriptions_resource_pending_update: z.ZodType = z.object({ billing_cycle_anchor: z.coerce.number().nullable().optional(), @@ -11689,6 +12843,13 @@ export const s_subscription_transfer_data: z.ZodType s_account)]), }) +export const s_tax_i_ds_owner: z.ZodType = z.object({ + account: z.union([z.string(), z.lazy(() => s_account)]).optional(), + application: z.union([z.string(), s_application]).optional(), + customer: z.union([z.string(), z.lazy(() => s_customer)]).optional(), + type: z.enum(["account", "application", "customer", "self"]), +}) + export const s_bank_connections_resource_accountholder: z.ZodType = z.object({ account: z.union([z.string(), z.lazy(() => s_account)]).optional(), @@ -11696,12 +12857,27 @@ export const s_bank_connections_resource_accountholder: z.ZodType = +export const s_automatic_tax: z.ZodType = z.object({ + enabled: z.coerce.boolean(), + liability: z.lazy(() => s_connect_account_reference.nullable().optional()), + status: z + .enum(["complete", "failed", "requires_location_inputs"]) + .nullable() + .optional(), +}) + +export const s_invoices_resource_from_invoice: z.ZodType = z.object({ action: z.string(), invoice: z.union([z.string(), z.lazy(() => s_invoice)]), }) +export const s_connect_account_reference: z.ZodType = + z.object({ + account: z.union([z.string(), z.lazy(() => s_account)]).optional(), + type: z.enum(["account", "self"]), + }) + export const s_invoice_transfer_data: z.ZodType = z.object({ amount: z.coerce.number().nullable().optional(), @@ -11750,6 +12926,12 @@ export const s_transfer_data: z.ZodType = z.object({ destination: z.union([z.string(), z.lazy(() => s_account)]), }) +export const s_payment_links_resource_automatic_tax: z.ZodType = + z.object({ + enabled: z.coerce.boolean(), + liability: z.lazy(() => s_connect_account_reference.nullable().optional()), + }) + export const s_payment_links_resource_invoice_creation: z.ZodType = z.object({ enabled: z.coerce.boolean(), @@ -11758,12 +12940,35 @@ export const s_payment_links_resource_invoice_creation: z.ZodType = + z.object({ + description: z.string().nullable().optional(), + invoice_settings: z.lazy( + () => s_payment_links_resource_subscription_data_invoice_settings, + ), + metadata: z.record(z.string()), + trial_period_days: z.coerce.number().nullable().optional(), + trial_settings: s_subscriptions_trials_resource_trial_settings + .nullable() + .optional(), + }) + export const s_payment_links_resource_transfer_data: z.ZodType = z.object({ amount: z.coerce.number().nullable().optional(), destination: z.union([z.string(), z.lazy(() => s_account)]), }) +export const s_quotes_resource_automatic_tax: z.ZodType = + z.object({ + enabled: z.coerce.boolean(), + liability: z.lazy(() => s_connect_account_reference.nullable().optional()), + status: z + .enum(["complete", "failed", "requires_location_inputs"]) + .nullable() + .optional(), + }) + export const s_quotes_resource_computed: z.ZodType = z.object({ recurring: z.lazy(() => s_quotes_resource_recurring.nullable().optional()), @@ -11776,6 +12981,12 @@ export const s_quotes_resource_from_quote: z.ZodType s_quote)]), }) +export const s_invoice_setting_quote_setting: z.ZodType = + z.object({ + days_until_due: z.coerce.number().nullable().optional(), + issuer: z.lazy(() => s_connect_account_reference), + }) + export const s_quotes_resource_total_details: z.ZodType = z.object({ amount_discount: z.coerce.number(), @@ -11826,8 +13037,9 @@ export const s_setup_attempt_payment_method_details: z.ZodType = z.object({ application_fee_percent: z.coerce.number().nullable().optional(), - automatic_tax: + automatic_tax: z.lazy(() => s_subscription_schedules_resource_default_settings_automatic_tax.optional(), + ), billing_cycle_anchor: z.enum(["automatic", "phase_start"]), billing_thresholds: s_subscription_billing_thresholds.nullable().optional(), collection_method: z @@ -11839,9 +13051,9 @@ export const s_subscription_schedules_resource_default_settings: z.ZodType s_invoice_setting_subscription_schedule_setting, + ), on_behalf_of: z .union([z.string(), z.lazy(() => s_account)]) .nullable() @@ -11857,7 +13069,7 @@ export const s_subscription_schedule_phase_configuration: z.ZodType s_subscription_schedule_add_invoice_item), ), application_fee_percent: z.coerce.number().nullable().optional(), - automatic_tax: s_schedules_phase_automatic_tax.optional(), + automatic_tax: z.lazy(() => s_schedules_phase_automatic_tax.optional()), billing_cycle_anchor: z .enum(["automatic", "phase_start"]) .nullable() @@ -11878,10 +13090,13 @@ export const s_subscription_schedule_phase_configuration: z.ZodType s_discounts_resource_stackable_discount)), end_date: z.coerce.number(), - invoice_settings: s_invoice_setting_subscription_schedule_phase_setting - .nullable() - .optional(), + invoice_settings: z.lazy(() => + s_invoice_setting_subscription_schedule_phase_setting + .nullable() + .optional(), + ), items: z.array(z.lazy(() => s_subscription_schedule_configuration_item)), metadata: z.record(z.string()).nullable().optional(), on_behalf_of: z @@ -11925,6 +13140,25 @@ export const s_terminal_reader_reader_resource_reader_action: z.ZodType = z.object({ + billing_details: s_treasury_shared_resource_billing_details, + type: z.enum(["us_bank_account"]), + us_bank_account: z.lazy(() => + s_inbound_transfers_payment_method_details_us_bank_account.optional(), + ), +}) + +export const s_outbound_payments_payment_method_details: z.ZodType = + z.object({ + billing_details: s_treasury_shared_resource_billing_details, + financial_account: + s_outbound_payments_payment_method_details_financial_account.optional(), + type: z.enum(["financial_account", "us_bank_account"]), + us_bank_account: z.lazy(() => + s_outbound_payments_payment_method_details_us_bank_account.optional(), + ), + }) + export const s_treasury_outbound_payments_resource_returned_status: z.ZodType = z.object({ code: z.enum([ @@ -11942,6 +13176,15 @@ export const s_treasury_outbound_payments_resource_returned_status: z.ZodType s_treasury_transaction)]), }) +export const s_outbound_transfers_payment_method_details: z.ZodType = + z.object({ + billing_details: s_treasury_shared_resource_billing_details, + type: z.enum(["us_bank_account"]), + us_bank_account: z.lazy(() => + s_outbound_transfers_payment_method_details_us_bank_account.optional(), + ), + }) + export const s_treasury_outbound_transfers_resource_returned_details: z.ZodType = z.object({ code: z.enum([ @@ -12015,6 +13258,14 @@ export const s_account_branding_settings: z.ZodType secondary_color: z.string().nullable().optional(), }) +export const s_account_invoices_settings: z.ZodType = + z.object({ + default_account_tax_ids: z + .array(z.union([z.string(), z.lazy(() => s_tax_id)])) + .nullable() + .optional(), + }) + export const s_legal_entity_person_verification_document: z.ZodType = z.object({ back: z @@ -12059,6 +13310,7 @@ export const s_payment_method_details_ideal: z.ZodType = + z.object({ + account_holder_type: z + .enum(["company", "individual"]) + .nullable() + .optional(), + account_type: z.enum(["checking", "savings"]).nullable().optional(), + bank_name: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + mandate: z.union([z.string(), z.lazy(() => s_mandate)]).optional(), + payment_reference: z.string().nullable().optional(), + routing_number: z.string().nullable().optional(), + }) + export const s_payment_pages_checkout_session_invoice_settings: z.ZodType = z.object({ account_tax_ids: z @@ -12136,6 +13404,7 @@ export const s_payment_pages_checkout_session_invoice_settings: z.ZodType s_connect_account_reference.nullable().optional()), metadata: z.record(z.string()).nullable().optional(), rendering_options: s_invoice_setting_rendering_options .nullable() @@ -12293,12 +13562,16 @@ export const s_payment_links_resource_invoice_settings: z.ZodType s_connect_account_reference.nullable().optional()), metadata: z.record(z.string()).nullable().optional(), rendering_options: s_invoice_setting_rendering_options .nullable() .optional(), }) +export const s_payment_links_resource_subscription_data_invoice_settings: z.ZodType = + z.object({ issuer: z.lazy(() => s_connect_account_reference) }) + export const s_quotes_resource_recurring: z.ZodType = z.object({ amount_subtotal: z.coerce.number(), @@ -12353,6 +13626,9 @@ export const s_setup_attempt_payment_method_details_card_present: z.ZodType s_payment_method)]) .nullable() .optional(), + offline: s_payment_method_details_card_present_offline + .nullable() + .optional(), }) export const s_setup_attempt_payment_method_details_ideal: z.ZodType = @@ -12367,6 +13643,7 @@ export const s_setup_attempt_payment_method_details_ideal: z.ZodType = + z.object({ + enabled: z.coerce.boolean(), + liability: z.lazy(() => s_connect_account_reference.nullable().optional()), + }) + +export const s_invoice_setting_subscription_schedule_setting: z.ZodType = + z.object({ + account_tax_ids: z + .array(z.union([z.string(), z.lazy(() => s_tax_id), s_deleted_tax_id])) + .nullable() + .optional(), + days_until_due: z.coerce.number().nullable().optional(), + issuer: z.lazy(() => s_connect_account_reference), + }) + export const s_subscription_schedule_add_invoice_item: z.ZodType = z.object({ + discounts: z.array(z.lazy(() => s_discounts_resource_stackable_discount)), price: z.union([z.string(), z.lazy(() => s_price), s_deleted_price]), quantity: z.coerce.number().nullable().optional(), tax_rates: z.array(s_tax_rate).nullable().optional(), }) +export const s_schedules_phase_automatic_tax: z.ZodType = + z.object({ + enabled: z.coerce.boolean(), + liability: z.lazy(() => s_connect_account_reference.nullable().optional()), + }) + +export const s_discounts_resource_stackable_discount: z.ZodType = + z.object({ + coupon: z.union([z.string(), s_coupon]).nullable().optional(), + discount: z + .union([z.string(), z.lazy(() => s_discount)]) + .nullable() + .optional(), + promotion_code: z + .union([z.string(), z.lazy(() => s_promotion_code)]) + .nullable() + .optional(), + }) + +export const s_invoice_setting_subscription_schedule_phase_setting: z.ZodType = + z.object({ + account_tax_ids: z + .array(z.union([z.string(), z.lazy(() => s_tax_id), s_deleted_tax_id])) + .nullable() + .optional(), + days_until_due: z.coerce.number().nullable().optional(), + issuer: z.lazy(() => s_connect_account_reference.nullable().optional()), + }) + export const s_subscription_schedule_configuration_item: z.ZodType = z.object({ billing_thresholds: s_subscription_item_billing_thresholds .nullable() .optional(), + discounts: z.array(z.lazy(() => s_discounts_resource_stackable_discount)), metadata: z.record(z.string()).nullable().optional(), price: z.union([z.string(), z.lazy(() => s_price), s_deleted_price]), quantity: z.coerce.number().optional(), @@ -12473,9 +13798,56 @@ export const s_terminal_reader_reader_resource_refund_payment_action: z.ZodType< .optional(), refund: z.union([z.string(), z.lazy(() => s_refund)]).optional(), refund_application_fee: z.coerce.boolean().optional(), + refund_payment_config: + s_terminal_reader_reader_resource_refund_payment_config.optional(), reverse_transfer: z.coerce.boolean().optional(), }) +export const s_inbound_transfers_payment_method_details_us_bank_account: z.ZodType = + z.object({ + account_holder_type: z + .enum(["company", "individual"]) + .nullable() + .optional(), + account_type: z.enum(["checking", "savings"]).nullable().optional(), + bank_name: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + mandate: z.union([z.string(), z.lazy(() => s_mandate)]).optional(), + network: z.enum(["ach"]), + routing_number: z.string().nullable().optional(), + }) + +export const s_outbound_payments_payment_method_details_us_bank_account: z.ZodType = + z.object({ + account_holder_type: z + .enum(["company", "individual"]) + .nullable() + .optional(), + account_type: z.enum(["checking", "savings"]).nullable().optional(), + bank_name: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + mandate: z.union([z.string(), z.lazy(() => s_mandate)]).optional(), + network: z.enum(["ach", "us_domestic_wire"]), + routing_number: z.string().nullable().optional(), + }) + +export const s_outbound_transfers_payment_method_details_us_bank_account: z.ZodType = + z.object({ + account_holder_type: z + .enum(["company", "individual"]) + .nullable() + .optional(), + account_type: z.enum(["checking", "savings"]).nullable().optional(), + bank_name: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + last4: z.string().nullable().optional(), + mandate: z.union([z.string(), z.lazy(() => s_mandate)]).optional(), + network: z.enum(["ach", "us_domestic_wire"]), + routing_number: z.string().nullable().optional(), + }) + export const s_treasury_received_credits_resource_source_flows_details: z.ZodType = z.object({ credit_reversal: z.lazy(() => s_treasury_credit_reversal.optional()),